]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix Priority Bytes and Packets counters in ethtool -S.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 22 Mar 2020 20:40:01 +0000 (16:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 04:42:48 +0000 (21:42 -0700)
commit1e495a23413d5fbd2b21464157af6ad2ec94312c
tree6b2b7581e62810085d3c5cf40662a8b3abd85a61
parent77857c3e0422dfcc1460ebd9fd8102350e85e49a
bnxt_en: Fix Priority Bytes and Packets counters in ethtool -S.

There is an indexing bug in determining these ethtool priority
counters.  Instead of using the queue ID to index, we need to
normalize by modulo 10 to get the index.  This index is then used
to obtain the proper CoS queue counter.  Rename bp->pri2cos to
bp->pri2cos_idx to make this more clear.

Fixes: 9c1b0ca9dde2 ("bnxt_en: Add ethtool -S priority counters.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c