-
Alessandro Rubini authored
By writing anything to a port file, you zero the counters for that port. By writing to "info" or "description" you zero counters for all ports. Zeroing is performed by copying the current values to a new array, and always subytracting that array to the current counter values. No zeroing is performed for network statistics, that still reads the "real" counters, featuring an overflow at 4G but no zeroing ever. To simplify a little the code, I turned the one-dimensional array with index arithmetics into a two-dimensional array, so the compiler makes the math for us, transparently. NOTE: the spinlock must be audited, we are not safe yet, not only because of this patch. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
5238b9d4
Name |
Last commit
|
Last update |
---|---|---|
binaries | ||
build | ||
configs | ||
doc | ||
hwinfo-sdb | ||
kernel | ||
patches | ||
robustness/coding | ||
scripts | ||
usb-loader | ||
userspace | ||
.gitignore | ||
.gitmodules | ||
COPYING | ||
Kconfig | ||
Makefile | ||
Makefile.kconfig | ||
README |