[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260112070324.38819-2-k@mgml.me>
Date: Mon, 12 Jan 2026 16:03:24 +0900
From: Kenta Akagi <k@...l.me>
To: Saeed Mahameed <saeedm@...dia.com>, Tariq Toukan <tariqt@...dia.com>,
Mark Bloch <mbloch@...dia.com>, Leon Romanovsky <leon@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, Kenta Akagi <k@...l.me>
Subject: [PATCH RFC mlx5-next 1/1] net/mlx5e: Expose physical received bits counters to ethtool
rx_bits_phy is documented but not shown in ethtool --statistics.
Make this value available via ethtool.
rx_bits_phy is needed to calculate the Bit Error Ratio from
rx_pcs_symbol_err_phy or 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 layer in the strict sense (i.e. traffic based).
Signed-off-by: Kenta Akagi <k@...l.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
Powered by blists - more mailing lists