diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-07-12 22:09:18 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-12 22:09:18 -0700 |
commit | 1e75896294d282ecd5b1717fcb3f6aa2908d5946 (patch) | |
tree | e4e886bf5852fde01f085af272cd280e37f0843a /drivers/net/benet/be_main.c | |
parent | c2fed9965c60e1f989f57889357c557f7b907ab7 (diff) |
be2net: account for skb allocation failures
If we cannot allocate new skbs in RX completion handler, we should
increase netdevice rx_dropped counter, not spam console messages.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r-- | drivers/net/benet/be_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 4ebd7000b0c..f7d6d9de6a0 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -431,6 +431,7 @@ void netdev_stats_update(struct be_adapter *adapter) pkts += rx_stats(rxo)->rx_pkts; bytes += rx_stats(rxo)->rx_bytes; mcast += rx_stats(rxo)->rx_mcast_pkts; + drops += rx_stats(rxo)->rx_dropped; /* no space in linux buffers: best possible approximation */ if (adapter->generation == BE_GEN3) { if (!(lancer_chip(adapter))) { @@ -1181,8 +1182,7 @@ static void be_rx_compl_process(struct be_adapter *adapter, skb = netdev_alloc_skb_ip_align(netdev, BE_HDR_LEN); if (unlikely(!skb)) { - if (net_ratelimit()) - dev_warn(&adapter->pdev->dev, "skb alloc failed\n"); + rxo->stats.rx_dropped++; be_rx_compl_discard(adapter, rxo, rxcp); return; } |