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 8990f468 (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>
Showing
- drivers/net/loopback.c 1 addition, 7 deletionsdrivers/net/loopback.c
- include/linux/netdevice.h 3 additions, 0 deletionsinclude/linux/netdevice.h
- net/8021q/vlan.h 0 additions, 2 deletionsnet/8021q/vlan.h
- net/8021q/vlan_core.c 2 additions, 0 deletionsnet/8021q/vlan_core.c
- net/8021q/vlan_dev.c 4 additions, 7 deletionsnet/8021q/vlan_dev.c
- net/core/dev.c 11 additions, 8 deletionsnet/core/dev.c
- net/ipv4/ip_gre.c 1 addition, 2 deletionsnet/ipv4/ip_gre.c
- net/ipv4/ipip.c 1 addition, 2 deletionsnet/ipv4/ipip.c
- net/ipv6/ip6_tunnel.c 1 addition, 2 deletionsnet/ipv6/ip6_tunnel.c
- net/ipv6/ip6mr.c 1 addition, 2 deletionsnet/ipv6/ip6mr.c
- net/ipv6/sit.c 1 addition, 2 deletionsnet/ipv6/sit.c
Loading
Please register or sign in to comment