diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2009-04-17 22:03:10 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-20 02:25:26 -0700 |
commit | 7eebb0b28f755e297d355a205bb04945b256db6b (patch) | |
tree | ae09d5928a764f5cb58eb217ec0d910e5d332474 /net | |
parent | eb62efd287fe6e12d18083287e38e4a811c28256 (diff) | |
download | linux-7eebb0b28f755e297d355a205bb04945b256db6b.tar.gz linux-7eebb0b28f755e297d355a205bb04945b256db6b.tar.bz2 linux-7eebb0b28f755e297d355a205bb04945b256db6b.zip |
loopback: packet drops accounting
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:3228 dropped:3228 overruns:0 frame:0
TX packets:692562900 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2865674174 (2.6 GiB) TX bytes:2865674174 (2.6 GiB)
I initialy chose to reflect those errors only in tx_dropped/tx_errors, but David
convinced me that it was really RX errors, as loopback_xmit() really starts
a RX process. (calling eth_type_trans() for example, that itself pulls the ethernet header)
These errors are accounted in rx_dropped/rx_errors.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions