aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cisco
diff options
context:
space:
mode:
authorCorinna Vinschen <vinschen@redhat.com>2015-08-24 12:52:39 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-25 16:02:35 -0700
commit6e85d5ad36a26debc23a9a865c029cbe242b2dc8 (patch)
tree84accf6cb374c0a22f1abfb6524c141707ab7fdb /drivers/net/ethernet/cisco
parentrds: Fix improper gfp_t usage. (diff)
downloadlinux-dev-6e85d5ad36a26debc23a9a865c029cbe242b2dc8.tar.xz
linux-dev-6e85d5ad36a26debc23a9a865c029cbe242b2dc8.zip
r8169: Add values missing in @get_stats64 from HW counters
The r8169 driver collects statistical information returned by @get_stats64 by counting them in the driver itself, even though many (but not all) of the values are already collected by tally counters (TCs) in the NIC. Some of these TC values are not returned by @get_stats64. Especially the received multicast packages are missing from /proc/net/dev. Rectify this by fetching the TCs and returning them from rtl8169_get_stats64. The counters collected in the driver obviously disappear as soon as the driver is unloaded so after a driver is loaded the counters always start at 0. The TCs on the other hand are only reset by a power cycle. Without further considerations the values collected by the driver would not match up against the TC values. This patch introduces a new function rtl8169_reset_counters which resets the TCs. Also, since rtl8169_reset_counters shares most of its code with rtl8169_update_counters, refactor the shared code into two new functions rtl8169_map_counters and rtl8169_unmap_counters. Unfortunately chip versions prior to RTL_GIGA_MAC_VER_19 don't allow to reset the TCs programatically. Therefore introduce an addition to the rtl8169_private struct and a function rtl8169_init_counter_offsets to store the TCs at first rtl_open. Use these values as offsets in rtl8169_get_stats64. Propagate a failure to reset *and* update the counters up to rtl_open and emit a warning message, if so. Signed-off-by: Corinna Vinschen <vinschen@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco')
0 files changed, 0 insertions, 0 deletions