Skip to contentSkip to conversation

bnxt: report FEC block stats via standard interface

PATCH Applied Jakub Kicinski 3 participants 3 messages Nov 30, 2022 – Dec 2, 2022

Subsystems (3)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 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.

---
CC: [email protected]

---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +8 -0
index c2f663770a7f..cbf17fcfb7ab 100644
@@ -2007,6 +2007,14 @@ static void bnxt_get_fec_stats(struct net_device *dev,
 	rx = bp->rx_port_stats_ext.sw_stats;
 	fec_stats->corrected_bits.total =
 		*(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,
Signature · 1 line
2.38.1
#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Tue, 29 Nov 2022 17:31:08 -0800 you wrote:

I must have missed that these stats are only exposed via the unstructured ethtool -S when they got merged. Plumb in the structured form.

---
CC: [email protected]

[...]

Here is the summary with links:
- [net-next] bnxt: report FEC block stats via standard interface

    https://git.kernel.org/netdev/net-next/c/a802073d1c9c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html