From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Mike McLagan <mike.mclagan@linux.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dlci: update last_rx after netif_rx
Date: Mon, 26 Feb 2001 23:30:55 -0300 [thread overview]
Message-ID: <20010226233055.H8692@conectiva.com.br> (raw)
In-Reply-To: <20010226221151.X8692@conectiva.com.br> <3A9B174D.6B9A3C9C@mandrakesoft.com>
In-Reply-To: <3A9B174D.6B9A3C9C@mandrakesoft.com>; from jgarzik@mandrakesoft.com on Mon, Feb 26, 2001 at 09:56:13PM -0500
Em Mon, Feb 26, 2001 at 09:56:13PM -0500, Jeff Garzik escreveu:
> Arnaldo Carvalho de Melo wrote:
> > --- linux-2.4.2/drivers/net/wan/dlci.c Tue Feb 13 19:15:05 2001
> > +++ linux-2.4.2.acme/drivers/net/wan/dlci.c Mon Feb 26 23:43:25 2001
> > @@ -229,6 +229,7 @@
> > skb_pull(skb, header);
> > netif_rx(skb);
> > dlp->stats.rx_packets++;
> > + dev->last_rx = jiffies;
>
> You need to update dlp->stats.rx_bytes too.
thanks, updated patch, there was no previous variable with the pkt lenght,
so I've added one, hope is ok.
- Arnaldo
--- linux-2.4.2/drivers/net/wan/dlci.c Tue Feb 13 19:15:05 2001
+++ linux-2.4.2.acme/drivers/net/wan/dlci.c Tue Feb 27 00:03:05 2001
@@ -205,7 +205,7 @@
case FRAD_P_IP:
header = sizeof(hdr->control) + sizeof(hdr->IP_NLPID);
- skb->protocol = htons(ETH_P_IP);
+ skb->protocol = __constant_htons(ETH_P_IP);
process = 1;
break;
@@ -224,11 +224,14 @@
if (process)
{
+ int pktlen = skb->len;
/* we've set up the protocol, so discard the header */
skb->mac.raw = skb->data;
skb_pull(skb, header);
netif_rx(skb);
dlp->stats.rx_packets++;
+ dlp->stats.rx_bytes += pktlen;
+ dev->last_rx = jiffies;
}
else
dev_kfree_skb(skb);
prev parent reply other threads:[~2001-02-27 4:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-27 1:11 [PATCH] dlci: update last_rx after netif_rx Arnaldo Carvalho de Melo
2001-02-27 2:56 ` Jeff Garzik
2001-02-27 2:30 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010226233055.H8692@conectiva.com.br \
--to=acme@conectiva.com.br \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.mclagan@linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).