public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [NET] 64 bit byte counter for 2.6.3
@ 2004-02-18 16:51 Markus Hästbacka
  2004-02-18 18:17 ` Stephen Hemminger
  2004-02-22 17:36 ` Pavel Machek
  0 siblings, 2 replies; 12+ messages in thread
From: Markus Hästbacka @ 2004-02-18 16:51 UTC (permalink / raw)
  To: Kernel Mailinglist

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

Ok, Here's a patch for 64 bit byte counters for 2.6.3. For any intrested
users to try.

That means in english that the limit for RX bytes and TX bytes (in
ifconfig for example) is much higher than the old 4GB limit on 32 bit
systems.

Orginal patch by Miika Pekkarinen, ported forward from 2.5 by me.

Patch says 2.6.3-rc1, but patches cleanly on 2.6.3.

        Markus

[-- Attachment #2: rm-ifconfig-reset-2.6.3-rc1 --]
[-- Type: text/plain, Size: 1338 bytes --]

--- linux-2.6.3-rc1/net/core/dev.c	2004-02-08 01:07:55.000000000 +0200
+++ linux-2.6.3-rc1-b/net/core/dev.c	2004-02-07 15:29:32.000000000 +0200
@@ -2042,8 +2042,8 @@
 	if (dev->get_stats) {
 		struct net_device_stats *stats = dev->get_stats(dev);
 
-		seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
-				"%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
+		seq_printf(seq, "%6s:%14llu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
+				"%14llu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
 			   dev->name, stats->rx_bytes, stats->rx_packets,
 			   stats->rx_errors,
 			   stats->rx_dropped + stats->rx_missed_errors,
--- linux-2.6.3-rc1/include/linux/netdevice.h	2004-02-08 01:05:47.000000000 +0200
+++ linux-2.6.3-rc1-b/include/linux/netdevice.h	2004-02-07 15:21:26.000000000 +0200
@@ -103,8 +103,8 @@
 {
 	unsigned long	rx_packets;		/* total packets received	*/
 	unsigned long	tx_packets;		/* total packets transmitted	*/
-	unsigned long	rx_bytes;		/* total bytes received 	*/
-	unsigned long	tx_bytes;		/* total bytes transmitted	*/
+	unsigned long long rx_bytes;		/* total bytes received 	*/
+	unsigned long long tx_bytes;		/* total bytes transmitted	*/
 	unsigned long	rx_errors;		/* bad packets received		*/
 	unsigned long	tx_errors;		/* packet transmit problems	*/
 	unsigned long	rx_dropped;		/* no space in linux buffers	*/

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

end of thread, other threads:[~2004-02-23 12:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-18 16:51 [NET] 64 bit byte counter for 2.6.3 Markus Hästbacka
2004-02-18 18:17 ` Stephen Hemminger
2004-02-18 20:32   ` Richard B. Johnson
2004-02-18 20:43     ` Markus Hästbacka
2004-02-18 22:45       ` Richard B. Johnson
2004-02-18 22:57         ` Stephen Hemminger
2004-02-18 23:17           ` Jeff Garzik
2004-02-19  8:14   ` Meelis Roos
2004-02-19 17:27     ` Stephen Hemminger
2004-02-22 17:36 ` Pavel Machek
2004-02-23 11:34   ` Jeff Sipek
2004-02-23 12:38     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox