]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Make all MAC statistics consistently 64 bits wide
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 12 Oct 2011 16:20:25 +0000 (17:20 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 27 Jan 2012 00:10:59 +0000 (00:10 +0000)
commit618a0e8098eec3f4bde1b71a7f5487060a73c12b
treec72369c2abde3d502d2ddbaeb5828f0778fbcce5
parent302ffff57582f478e5b939862f8006f996a495aa
sfc: Make all MAC statistics consistently 64 bits wide

Currently we use type u64 for byte counts, which can very quickly
exceed 2^32, and unsigned long for packet counts, which do not.  But
it can still take only 20-something minutes to send or receive 2^32
packets, and not all tools properly handle overflow even if they
sample more often than this.

The MAC statistics are all updated synchronously, so it costs very
little to make them all 64-bit regardless of native word size.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/ethtool.c
drivers/net/ethernet/sfc/net_driver.h