myri10ge: fix per-slice rx/tx_dropped counters
Subsystems (2)
PATCH 1/1 myri10ge: fix per-slice rx/tx_dropped counters
Properly attribute transmit and receive drops by incrementing the per-slice counter.
Signed-off-by Brice Goglin <[email protected]>
--- drivers/net/myri10ge/myri10ge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/myri10ge/myri10ge.c +4 -2
@@ -1309,7 +1309,7 @@ skb =netdev_alloc_skb (dev,MYRI10GE_HLEN +16 );if (unlikely (skb ==NULL )) { - mgp->stats.rx_dropped++; + ss->stats.rx_dropped++; do { i--; put_page(rx_frags[i].page);
@@ -2924,6 +2924,7 @@ {struct sk_buff *segs, *curr;struct myri10ge_priv *mgp =netdev_priv (dev); +struct myri10ge_slice_state *ss;int status; segs =skb_gso_segment (skb, dev->features & ~NETIF_F_TSO6 );
@@ -2950,8 +2951,9 @@return 0 ; drop: + ss = &mgp->ss[skb_get_queue_mapping (skb)];dev_kfree_skb_any (skb); - mgp->stats.tx_dropped +=1 ; + ss->stats.tx_dropped +=1 ;return 0 ; }
From: Brice Goglin <[email protected]>
Date: Tue, 18 Nov 2008 21:10:56 +0100
Quoted 4 lines
Properly attribute transmit and receive drops by incrementing the per-slice counter.
Signed-off-by Brice Goglin <[email protected]>
Applied.