net: rx_dropped accounting

Under load, netif_rx() can drop incoming packets but administrators dont
have a chance to spot which device needs some tuning (RPS activation for
example)

This patch adds rx_dropped accounting in vlans and tunnels.

Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Eric Dumazet 2010-09-20 00:12:11 +00:00 • committed by David S. Miller
commit 8990f468ae
7 changed files with 28 additions and 8 deletions

View file

@ -725,7 +725,10 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol,
skb_tunnel_rx(skb, t->dev);
dscp_ecn_decapsulate(t, ipv6h, skb);
netif_rx(skb);
if (netif_rx(skb) == NET_RX_DROP)
t->dev->stats.rx_dropped++;
rcu_read_unlock();
return 0;
}

View file

@ -666,7 +666,9 @@ static int pim6_rcv(struct sk_buff *skb)
skb_tunnel_rx(skb, reg_dev);
netif_rx(skb);
if (netif_rx(skb) == NET_RX_DROP)
reg_dev->stats.rx_dropped++;
dev_put(reg_dev);
return 0;
drop:

View file

@ -564,7 +564,10 @@ static int ipip6_rcv(struct sk_buff *skb)
skb_tunnel_rx(skb, tunnel->dev);
ipip6_ecn_decapsulate(iph, skb);
netif_rx(skb);
if (netif_rx(skb) == NET_RX_DROP)
tunnel->dev->stats.rx_dropped++;
rcu_read_unlock();
return 0;
}