lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110620184635.GA18577@myri.com>
Date:	Mon, 20 Jun 2011 13:46:36 -0500
From:	Jon Mason <jon.mason@...i.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev <netdev@...r.kernel.org>,
	Andrew Gallatin <gallatin@...i.com>,
	Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH] myri10ge: 64bit slice stats

There is a potential issue of internal 32bit stats wrapping before
updating the external 64bit stats, thus leading to incorrect stats.
Since there is no hardware necessity for these counters to be 32bit,
change them to be 64bit to avoid this issue.

Patch suggested by Eric Dumazet.

Signed-off-by: Jon Mason <mason@...i.com>
---
 drivers/net/myri10ge/myri10ge.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 04e10f4..2a51de1 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -170,12 +170,12 @@ struct myri10ge_rx_done {
 };
 
 struct myri10ge_slice_netstats {
-	unsigned long rx_packets;
-	unsigned long tx_packets;
-	unsigned long rx_bytes;
-	unsigned long tx_bytes;
-	unsigned long rx_dropped;
-	unsigned long tx_dropped;
+	u64 rx_packets;
+	u64 tx_packets;
+	u64 rx_bytes;
+	u64 tx_bytes;
+	u64 rx_dropped;
+	u64 tx_dropped;
 };
 
 struct myri10ge_slice_state {
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ