]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: show only relevant ethtool stats for a TX or RX ring
authorRajesh Ravi <rajesh.ravi@broadcom.com>
Mon, 4 May 2020 08:50:41 +0000 (04:50 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2020 17:44:11 +0000 (10:44 -0700)
commit470ac13c77334706b608d01c41e53e9304ce7f85
tree5cd513c790597e34345baa4535ffd10c360ed773
parent1d2c0a1a0dff7e50e0d5b14a1821a9283f6b141c
bnxt_en: show only relevant ethtool stats for a TX or RX ring

Currently, ethtool -S shows all TX/RX ring counters whether the
channel is combined, RX, or TX.  The unused counters will always be
zero.  Improve it by showing only the relevant counters if the channel
is RX or TX.  If the channel is combined, the counters will be shown
exactly the same as before.

[ MChan: Lots of cleanups and simplifications on Rajesh's original
code]

Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c