All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] loopback: packet drops accounting
Date: Fri, 17 Apr 2009 11:27:53 +0200	[thread overview]
Message-ID: <49E84B99.1080502@cosmosbay.com> (raw)
In-Reply-To: <20090417.015914.09817926.davem@davemloft.net>

David Miller a écrit :
> From: Eric Dumazet <dada1@cosmosbay.com>
> Date: Fri, 17 Apr 2009 10:56:57 +0200
> 
>> We can in some situations drop packets in netif_rx()
>>
>> loopback driver does not report these (unlikely) drops to its stats,
>> and incorrectly change packets/bytes counts.
>>
>> After this patch applied, "ifconfig lo" can reports these drops as in :
>>
>> # ifconfig lo
>> lo        Link encap:Local Loopback
>>           inet addr:127.0.0.1  Mask:255.0.0.0
>>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>>           RX packets:692562900 errors:0 dropped:0 overruns:0 frame:0
>>           TX packets:692562900 errors:3228 dropped:3228 overruns:0 carrier:0
>>           collisions:0 txqueuelen:0
>>           RX bytes:2865674174 (2.6 GiB)  TX bytes:2865674174 (2.6 GiB)
>>
>> I chose to reflect those errors only in tx_dropped/tx_errors, and not mirror
>> these errors in rx_dropped/rx_errors.
>>
>> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
> 
> Well, logically the receive is what failed, not the transmit.
> 
> I think it's therefore misleading to count it as a TX drop.
> 
> Do you feel strongly about this?

Not at all, but my plan was to go a litle bit further, ie being able to 
return from loopback_xmit() with a non null value.

netif_rx() usage in loopback device is biased, since its really a transmit :)

Oh well...


  reply	other threads:[~2009-04-17  9:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 19:58 [PATCH 2.6.30] Network Drop Monitor: Make use of consume_skb() in af_can.c Oliver Hartkopp
2009-04-17  8:38 ` David Miller
2009-04-17  8:56   ` [PATCH] loopback: packet drops accounting Eric Dumazet
2009-04-17  8:59     ` David Miller
2009-04-17  9:27       ` Eric Dumazet [this message]
2009-04-17 10:06         ` [PATCH] loopback: better handling of packet drops Eric Dumazet
2009-04-17 10:33           ` Eric Dumazet
2009-04-17 10:51             ` David Miller
2009-04-17 12:22               ` Eric Dumazet
2009-04-17 14:58             ` Stephen Hemminger
2009-04-17 15:05               ` Eric Dumazet
2009-04-18  8:03         ` [PATCH] loopback: packet drops accounting Eric Dumazet
2009-04-20  9:26           ` David Miller

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=49E84B99.1080502@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=davem@davemloft.net \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.