* [PATCH] net/mlx5e: Expose physical received bits counters to ethtool
@ 2026-01-06 7:02 Kenta Akagi
0 siblings, 0 replies; only message in thread
From: Kenta Akagi @ 2026-01-06 7:02 UTC (permalink / raw)
To: Saeed Mahameed, Tariq Toukan, Mark Bloch, Leon Romanovsky,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: netdev, linux-rdma, linux-kernel, Kenta Akagi
rx_bits_phy is documented but not shown in ethtool --statistics.
Make this value available via ethtool.
According to existing documentation, rx_bits_phy is needed to calculate the
error rate from rx_pcs_symbol_err_phy and rx_corrected_bits_phy. The
existing rx_bytes_phy cannot be used for this calculation as it appears
to be a counter above the PHY in the strict sense (i.e. traffic based).
To avoid confusion, it might be better to use a different name (e.g.,
rx_bits_pcs), but for now, I will submit the patch as per the
documentation.
Signed-off-by: Kenta Akagi <k@mgml.me>
---
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
index a2802cfc9b98..e167355daad5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
@@ -1226,6 +1226,7 @@ static const struct counter_desc pport_phy_layer_cntrs_stats_desc[] = {
MLX5_BYTE_OFF(ppcnt_reg, \
counter_set.phys_layer_statistical_cntrs.c##_high)
static const struct counter_desc pport_phy_statistical_stats_desc[] = {
+ { "rx_bits_phy", PPORT_PHY_STATISTICAL_OFF(phy_received_bits) },
{ "rx_pcs_symbol_err_phy", PPORT_PHY_STATISTICAL_OFF(phy_symbol_errors) },
{ "rx_corrected_bits_phy", PPORT_PHY_STATISTICAL_OFF(phy_corrected_bits) },
};
--
2.50.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-06 7:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-06 7:02 [PATCH] net/mlx5e: Expose physical received bits counters to ethtool Kenta Akagi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®