Commit a802073d authored by Jakub Kicinski's avatar Jakub Kicinski

bnxt: report FEC block stats via standard interface

I must have missed that these stats are only exposed
via the unstructured ethtool -S when they got merged.
Plumb in the structured form.
Reviewed-by: default avatarMichael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20221130013108.90062-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5620768a
...@@ -2007,6 +2007,14 @@ static void bnxt_get_fec_stats(struct net_device *dev, ...@@ -2007,6 +2007,14 @@ static void bnxt_get_fec_stats(struct net_device *dev,
rx = bp->rx_port_stats_ext.sw_stats; rx = bp->rx_port_stats_ext.sw_stats;
fec_stats->corrected_bits.total = fec_stats->corrected_bits.total =
*(rx + BNXT_RX_STATS_EXT_OFFSET(rx_corrected_bits)); *(rx + BNXT_RX_STATS_EXT_OFFSET(rx_corrected_bits));
if (bp->fw_rx_stats_ext_size <= BNXT_RX_STATS_EXT_NUM_LEGACY)
return;
fec_stats->corrected_blocks.total =
*(rx + BNXT_RX_STATS_EXT_OFFSET(rx_fec_corrected_blocks));
fec_stats->uncorrectable_blocks.total =
*(rx + BNXT_RX_STATS_EXT_OFFSET(rx_fec_uncorrectable_blocks));
} }
static u32 bnxt_ethtool_forced_fec_to_fw(struct bnxt_link_info *link_info, static u32 bnxt_ethtool_forced_fec_to_fw(struct bnxt_link_info *link_info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment