]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: expose ring stats of inactive rings via ethtool
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 30 Jun 2018 00:04:34 +0000 (17:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 12:31:56 +0000 (21:31 +0900)
commitd4d6b7b620747de2568db876341869569c1f4e20
treee23437add3b22c667b5472a046bee9073f98746b
parent79ac9035064666c5c5bb169763bb3ed6d4a6e7e0
nfp: expose ring stats of inactive rings via ethtool

After user changes the ring count statistics for deactivated
rings disappear from ethtool -S output.  This causes loss of
information to the user and means that ethtool stats may not
add up to interface stats.  Always expose counters from all
the rings.  Note that we allocate at most num_possible_cpus()
rings so number of rings should be reasonable.

The alternative of only listing stats for rings which were
ever in use could be confusing.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c