Thread (8 messages) 8 messages, 3 authors, 2026-02-05
STALE143d REVIEWED: 1 (1M)
Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH net-next 5/5] net/mlx5e: Report stop and wake TX queue stats

From: Tariq Toukan <tariqt@nvidia.com>
Date: 2026-02-04 19:34:29
Also in: linux-rdma, lkml
Subsystem: mellanox ethernet driver (mlx5e), mellanox mlx5 core vpi driver, networking drivers, the rest · Maintainers: Saeed Mahameed, Tariq Toukan, Mark Bloch, Leon Romanovsky, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Gal Pressman <redacted>

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 <redacted>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 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 036587123a6a..4ed0449a27bd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -5570,6 +5570,9 @@ static void mlx5e_get_queue_stats_tx(struct net_device *dev, int i,
 	stats->csum_none = sq_stats->csum_none;
 	stats->needs_csum =
 		sq_stats->csum_partial + sq_stats->csum_partial_inner;
+
+	stats->stop = sq_stats->stopped;
+	stats->wake = sq_stats->wake;
 }
 
 static void mlx5e_get_base_stats(struct net_device *dev,
@@ -5630,6 +5633,8 @@ static void mlx5e_get_base_stats(struct net_device *dev,
 	tx->hw_gso_bytes = 0;
 	tx->csum_none = 0;
 	tx->needs_csum = 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];
@@ -5663,6 +5668,8 @@ static void mlx5e_get_base_stats(struct net_device *dev,
 			tx->csum_none += sq_stats->csum_none;
 			tx->needs_csum += sq_stats->csum_partial +
 					  sq_stats->csum_partial_inner;
+			tx->stop += sq_stats->stopped;
+			tx->wake += sq_stats->wake;
 		}
 	}
 
@@ -5688,6 +5695,8 @@ static void mlx5e_get_base_stats(struct net_device *dev,
 			tx->csum_none += sq_stats->csum_none;
 			tx->needs_csum += sq_stats->csum_partial +
 					  sq_stats->csum_partial_inner;
+			tx->stop += sq_stats->stopped;
+			tx->wake += sq_stats->wake;
 		}
 	}
 }
-- 
2.44.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help