summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/rx.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2014-07-15 14:58:12 +0400
committerDavid S. Miller <davem@davemloft.net>2014-07-16 09:53:34 +0400
commite4d112e4f9502083fd27f9ac1a4cd690e3f01421 (patch)
tree1e6d9f30d787d9df8214378923ea621af2afb0be /drivers/net/ethernet/sfc/rx.c
parentd762d038497c9df51c19fcbe69b094b3bf8e5568 (diff)
downloadlinux-e4d112e4f9502083fd27f9ac1a4cd690e3f01421.tar.xz
sfc: add extra RX drop counters for nodesc_trunc and noskb_drop
Added a counter rx_noskb_drop for failure to allocate an skb. Summed the per-channel rx_nodesc_trunc counters earlier so that they can be included in rx_dropped. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/rx.c')
-rw-r--r--drivers/net/ethernet/sfc/rx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index 48588ddf81b0..bf537a2a901f 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -480,8 +480,10 @@ static struct sk_buff *efx_rx_mk_skb(struct efx_channel *channel,
skb = netdev_alloc_skb(efx->net_dev,
efx->rx_ip_align + efx->rx_prefix_size +
hdr_len);
- if (unlikely(skb == NULL))
+ if (unlikely(skb == NULL)) {
+ atomic_inc(&efx->n_rx_noskb_drops);
return NULL;
+ }
EFX_BUG_ON_PARANOID(rx_buf->len < hdr_len);