netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mv643xx_eth: Fix ethtool stats
@ 2006-10-03 16:42 Maxime Bizon
  2006-10-03 17:27 ` Dale Farnsworth
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Bizon @ 2006-10-03 16:42 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Dale Farnsworth, Manish Lachwani, netdev


Some stats reported by ethtool -S on mv643xx_eth device are cleared
between each call.

Is it the wanted behaviour ? If not, the attached patch fixes it.


Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

--- linux-2.6.18/drivers/net/mv643xx_eth.c.orig	2006-10-03 18:29:14.000000000 +0200
+++ linux-2.6.18/drivers/net/mv643xx_eth.c	2006-10-03 18:29:42.000000000 +0200
@@ -2156,7 +2156,7 @@
 	for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
 			offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
 			offset += 4)
-		*(u32 *)((char *)p + offset) = read_mib(mp, offset);
+		*(u32 *)((char *)p + offset) += read_mib(mp, offset);
 
 	p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
 	p->good_octets_sent +=
@@ -2165,7 +2165,7 @@
 	for (offset = ETH_MIB_GOOD_FRAMES_SENT;
 			offset <= ETH_MIB_LATE_COLLISION;
 			offset += 4)
-		*(u32 *)((char *)p + offset) = read_mib(mp, offset);
+		*(u32 *)((char *)p + offset) += read_mib(mp, offset);
 }
 
 /*


-- 
Maxime

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

* [PATCH] mv643xx_eth: Fix ethtool stats
  2006-10-03 16:42 [PATCH] mv643xx_eth: Fix ethtool stats Maxime Bizon
@ 2006-10-03 17:27 ` Dale Farnsworth
  2006-10-05 10:43   ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Dale Farnsworth @ 2006-10-03 17:27 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: Jeff Garzik, Dale Farnsworth, Manish Lachwani, netdev

From: Maxime Bizon <mbizon@freebox.fr>

Some stats reported by ethtool -S on mv643xx_eth device are cleared
between each call.  This patch fixes it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>

---

Thanks Maxime.

--- linux-2.6.18/drivers/net/mv643xx_eth.c.orig	2006-10-03 18:29:14.000000000 +0200
+++ linux-2.6.18/drivers/net/mv643xx_eth.c	2006-10-03 18:29:42.000000000 +0200
@@ -2156,7 +2156,7 @@
 	for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
 			offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
 			offset += 4)
-		*(u32 *)((char *)p + offset) = read_mib(mp, offset);
+		*(u32 *)((char *)p + offset) += read_mib(mp, offset);
 
 	p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
 	p->good_octets_sent +=
@@ -2165,7 +2165,7 @@
 	for (offset = ETH_MIB_GOOD_FRAMES_SENT;
 			offset <= ETH_MIB_LATE_COLLISION;
 			offset += 4)
-		*(u32 *)((char *)p + offset) = read_mib(mp, offset);
+		*(u32 *)((char *)p + offset) += read_mib(mp, offset);
 }
 
 /*

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

* Re: [PATCH] mv643xx_eth: Fix ethtool stats
  2006-10-03 17:27 ` Dale Farnsworth
@ 2006-10-05 10:43   ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2006-10-05 10:43 UTC (permalink / raw)
  To: Dale Farnsworth; +Cc: Maxime Bizon, Manish Lachwani, netdev

applied to #upstream-fixes


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

end of thread, other threads:[~2006-10-05 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-03 16:42 [PATCH] mv643xx_eth: Fix ethtool stats Maxime Bizon
2006-10-03 17:27 ` Dale Farnsworth
2006-10-05 10:43   ` Jeff Garzik

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).