bnxt_en: Display the ring error counters under ethtool -S
authorMichael Chan <michael.chan@broadcom.com>
Thu, 17 Aug 2023 23:19:10 +0000 (16:19 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 19 Aug 2023 02:13:59 +0000 (19:13 -0700)
commita080b47a04c503674c30dfe697b6fa1b98c3bb6b
tree28196bd886730cefd4a5e09feff3d2638fefb142
parent4c70dbe3c0087b439b9e5015057e3e378cf5d8b1
bnxt_en: Display the ring error counters under ethtool -S

The existing driver displays the sum of 4 ring counters under ethtool -S.
These counters are in the array bnxt_sw_func_stats.  These counters are
summed at the time of ethtool -S and will be lost when the device is reset.

Replace these counters with the new total ring error counters added in the
last patch.  These new counters are saved before reset.  ethtool -S will
now display the sum of the saved counters plus the current counters.

Link: https://lore.kernel.org/netdev/CACKFLimD-bKmJ1tGZOLYRjWzEwxkri-Mw7iFme1x2Dr0twdCeg@mail.gmail.com/
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20230817231911.165035-6-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c