netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] myri10ge: fix per-slice rx/tx_dropped counters
@ 2008-11-18 20:10 Brice Goglin
  2008-11-20  9:50 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Brice Goglin @ 2008-11-18 20:10 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev

Properly attribute transmit and receive drops by incrementing the
per-slice counter.

Signed-off-by: Brice Goglin <brice@myri.com>
---
 drivers/net/myri10ge/myri10ge.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: net-next-2.6/drivers/net/myri10ge/myri10ge.c
===================================================================
--- net-next-2.6.orig/drivers/net/myri10ge/myri10ge.c	2008-11-11 21:51:11.000000000 +0100
+++ net-next-2.6/drivers/net/myri10ge/myri10ge.c	2008-11-18 21:02:12.000000000 +0100
@@ -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;
 }
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] myri10ge: fix per-slice rx/tx_dropped counters
  2008-11-18 20:10 [PATCH net-next] myri10ge: fix per-slice rx/tx_dropped counters Brice Goglin
@ 2008-11-20  9:50 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-11-20  9:50 UTC (permalink / raw)
  To: brice; +Cc: jeff, netdev

From: Brice Goglin <brice@myri.com>
Date: Tue, 18 Nov 2008 21:10:56 +0100

> Properly attribute transmit and receive drops by incrementing the
> per-slice counter.
> 
> Signed-off-by: Brice Goglin <brice@myri.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-20  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18 20:10 [PATCH net-next] myri10ge: fix per-slice rx/tx_dropped counters Brice Goglin
2008-11-20  9:50 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).