]> git.baikalelectronics.ru Git - kernel.git/commit
net: add a core netdev->rx_dropped counter
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 30 Sep 2010 21:06:55 +0000 (21:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Oct 2010 21:47:55 +0000 (14:47 -0700)
commite1bfa424eca1691f2000b2f121d5163d57680265
tree5c0dfcf5a14c55501f9225835c83abddb8d1876e
parent5eca8f194a28911b4a5773afe1598d62ed08af8f
net: add a core netdev->rx_dropped counter

In various situations, a device provides a packet to our stack and we
drop it before it enters protocol stack :
- softnet backlog full (accounted in /proc/net/softnet_stat)
- bad vlan tag (not accounted)
- unknown/unregistered protocol (not accounted)

We can handle a per-device counter of such dropped frames at core level,
and automatically adds it to the device provided stats (rx_dropped), so
that standard tools can be used (ifconfig, ip link, cat /proc/net/dev)

This is a generalization of commit edf1b8a3c (net: rx_dropped
accounting), thus reverting it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/loopback.c
include/linux/netdevice.h
net/8021q/vlan.h
net/8021q/vlan_core.c
net/8021q/vlan_dev.c
net/core/dev.c
net/ipv4/ip_gre.c
net/ipv4/ipip.c
net/ipv6/ip6_tunnel.c
net/ipv6/ip6mr.c
net/ipv6/sit.c