Bug 469
Summary: | /proc/net/dev byte counter wraps after 2^32 | ||
---|---|---|---|
Product: | Networking | Reporter: | Burton Windle (bwindle-kbt) |
Component: | Other | Assignee: | Jeff Sipek (jeffpc) |
Status: | REJECTED WILL_NOT_FIX | ||
Severity: | low | CC: | kernel, nacc, wbrana |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | --- | Bisected commit-id: | |
Attachments: |
Linux 2.6.9 64-bit net counters
Linux 2.4.27 64-bit net counters |
Description
Burton Windle
2003-03-18 07:51:21 UTC
There were couple of (relatively) short discussions on linux-kernel, and for now the verdict is "Do it in user space" --Linus. Note: The counters overflow every 2^32 bytes only on 32-bit architectures, 64-bit architectures handle the counters as 64-bits. Created attachment 4090 [details]
Linux 2.6.9 64-bit net counters
This patch avoids wraps after 4 GiB also on 32-bit anarchitectures.
Peter Kov
Created attachment 4091 [details]
Linux 2.4.27 64-bit net counters
This patch avoids wraps after 4 GiB also on 32-bit anarchitectures.
Peter Kov
It is not that easy. 64-bit operations are not atomic on 32-bit architectures. My implementation of a patch to solve it is on my website http://shells.gnugeneration.com/~jeffpc/. Jeff. Downstream bug report: http://bugs.gentoo.org/show_bug.cgi?id=67614 I just tried cat /proc/net/dev on my 2.6.17-rc2 x86_64 kernel. My eth0 rx bytes value: 15847163310; my eth0 tx bytes value: 11484555682. Both are larger than 2^32. I'm willing to say that the Gentoo report is invalid and close the bug. 32-bit kernels will be restricted to 32-bit values and 64-bit kernels will be restricted to 64-bit values. If you want better parsing, then, as Linus said, make a userspace tool handle it. Anyone have a problem with the bug being closed? No responses, closing bug. Yes, it is possible that the downstream bug was invalid, since there is no hard evidence there. |