lkml.org 
[lkml]   [2001]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRE: [PATCH] /proc/net/dev counter fix, linux-2.5.0
Date
--- linux-2.5.0or/include/linux/netdevice.h	Thu Nov 22 21:47:09 2001
+++ linux/include/linux/netdevice.h Tue Dec 11 21:24:54 2001
@@ -97,8 +97,9 @@
{
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 */
+ /* rx and tx counters fixed up to 64-bit */
+ long long rx_bytes; /* total bytes received
*/
+ long long tx_bytes; /* total bytes transmitted
*/


It is better to define these as unsigned long long, you are anyway
printing them as unsigned long long. Its about time this was fixed,
I have Gigabit cards and it is very easy to produce an overflow.
I think the MAINTAINER for ifconfig(8) should be made aware of these
changes as well.

Balbir
-------------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:mailadmin@wipro.com and delete this mail
from your records.
----------------------------------------------------------------------------------------------------------------------
\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.039 / U:22.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site