summaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge
diff options
context:
space:
mode:
authorBrice Goglin <brice@myri.com>2008-11-20 10:50:04 +0100
committerDavid S. Miller <davem@davemloft.net>2008-11-20 10:50:04 +0100
commitd6279c88f246adf94b7f7a014c5f19d527bc785b (patch)
treedd26d8052e5613c25c3f6f08a4e91b067e1d622f /drivers/net/myri10ge
parentnetdev/smc91x: unify Blackfin code a bit and use proper read/write functions (diff)
downloadlinux-d6279c88f246adf94b7f7a014c5f19d527bc785b.tar.xz
linux-d6279c88f246adf94b7f7a014c5f19d527bc785b.zip
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 <brice@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/myri10ge')
-rw-r--r--drivers/net/myri10ge/myri10ge.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 56c6f876042c..cd856d7ce9f1 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1309,7 +1309,7 @@ myri10ge_rx_done(struct myri10ge_slice_state *ss, struct myri10ge_rx_buf *rx,
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);
@@ -2926,6 +2926,7 @@ static int myri10ge_sw_tso(struct sk_buff *skb, struct net_device *dev)
{
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);
@@ -2952,8 +2953,9 @@ static int myri10ge_sw_tso(struct sk_buff *skb, struct net_device *dev)
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;
}