public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cycx_x25: update last_rx after netif_rx
Date: Mon, 26 Feb 2001 21:54:27 -0500	[thread overview]
Message-ID: <3A9B16E3.CB4CECAE@mandrakesoft.com> (raw)
In-Reply-To: <20010226220620.W8692@conectiva.com.br>

Arnaldo Carvalho de Melo wrote:
> --- linux-2.4.2/drivers/net/wan/cycx_x25.c      Tue Feb 13 19:15:05 2001
> +++ linux-2.4.2.acme/drivers/net/wan/cycx_x25.c Mon Feb 26 23:38:48 2001
> @@ -812,7 +812,6 @@
>         if (bitm)
>                 return; /* more data is coming */
> 
> -       dev->last_rx = jiffies;         /* timestamp */
>         chan->rx_skb = NULL;            /* dequeue packet */
> 
>         ++chan->ifstats.rx_packets;
> @@ -820,6 +819,7 @@
> 
>         skb->mac.raw = skb->data;
>         netif_rx(skb);
> +       dev->last_rx = jiffies;         /* timestamp */
>  }
> 
>  /* Connect interrupt handler. */

looks ok


> @@ -1454,11 +1454,12 @@
>          *ptr = event;
> 
>          skb->dev = dev;
> -        skb->protocol = htons(ETH_P_X25);
> +        skb->protocol = __constant_htons(ETH_P_X25);

The kernel definition for the htons macro should cover this..


>          skb->mac.raw = skb->data;
>          skb->pkt_type = PACKET_HOST;
> 
>          netif_rx(skb);
> +       dev->last_rx = jiffies;         /* timestamp */

I wonder about this... For this function it is sending an event, not
really a packet.  So should we really timestamp it like a real packet? 
If so, you should increase rx_packets and rx_bytes stats too, as well as
update last_rx here.

	Jeff



-- 
Jeff Garzik       | "You see, in this world there's two kinds of
Building 1024     |  people, my friend: Those with loaded guns
MandrakeSoft      |  and those who dig. You dig."  --Blondie

      reply	other threads:[~2001-02-27  2:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27  1:06 [PATCH] cycx_x25: update last_rx after netif_rx Arnaldo Carvalho de Melo
2001-02-27  2:54 ` Jeff Garzik [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=3A9B16E3.CB4CECAE@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=acme@conectiva.com.br \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.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