From 32b7e50e284a816389831bef142de4f7d2d691ee Mon Sep 17 00:00:00 2001 From: Gal Pressman Date: Mon, 4 May 2026 21:37:04 +0300 Subject: [PATCH] net/mlx5e: Report stop and wake TX queue stats Report TX queue stop and wake statistics via the netdev queue stats API by mapping the existing stopped and wake counters to the stop and wake fields. Signed-off-by: Gal Pressman Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20260504183704.272322-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 6fc354a7c5c6..469e066dc432 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -5529,6 +5529,9 @@ static void mlx5e_get_queue_stats_tx(struct net_device *dev, int i, stats->hw_gso_bytes = sq_stats->tso_bytes + sq_stats->tso_inner_bytes; stats->csum_none = sq_stats->csum_none; + + stats->stop = sq_stats->stopped; + stats->wake = sq_stats->wake; } static void mlx5e_get_base_stats(struct net_device *dev, @@ -5580,6 +5583,8 @@ static void mlx5e_get_base_stats(struct net_device *dev, tx->hw_gso_packets = 0; tx->hw_gso_bytes = 0; tx->csum_none = 0; + tx->stop = 0; + tx->wake = 0; for (i = 0; i < priv->stats_nch; i++) { struct mlx5e_channel_stats *channel_stats = priv->channel_stats[i]; @@ -5611,6 +5616,8 @@ static void mlx5e_get_base_stats(struct net_device *dev, tx->hw_gso_bytes += sq_stats->tso_bytes + sq_stats->tso_inner_bytes; tx->csum_none += sq_stats->csum_none; + tx->stop += sq_stats->stopped; + tx->wake += sq_stats->wake; } } @@ -5634,6 +5641,8 @@ static void mlx5e_get_base_stats(struct net_device *dev, tx->hw_gso_bytes += sq_stats->tso_bytes + sq_stats->tso_inner_bytes; tx->csum_none += sq_stats->csum_none; + tx->stop += sq_stats->stopped; + tx->wake += sq_stats->wake; } } }