git: 9e7fa1e66c1e - main - Collect statistics from all rate-limit queues in mlx5en(4).
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Dec 28 13:41:25 UTC 2020
The branch main has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=9e7fa1e66c1e13d426e684bb24d07457522ef3d7
commit 9e7fa1e66c1e13d426e684bb24d07457522ef3d7
Author: Hans Petter Selasky <hps at selasky.org>
AuthorDate: 2020-10-12 08:18:48 +0000
Commit: Hans Petter Selasky <hselasky at FreeBSD.org>
CommitDate: 2020-12-28 13:39:51 +0000
Collect statistics from all rate-limit queues in mlx5en(4).
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
---
sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index 6fe04b260e4f..c23335eb712e 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -911,6 +911,30 @@ mlx5e_update_stats_locked(struct mlx5e_priv *priv)
}
}
+#ifdef RATELIMIT
+ /* Collect statistics from all rate-limit queues */
+ for (j = 0; j < priv->rl.param.tx_worker_threads_def; j++) {
+ struct mlx5e_rl_worker *rlw = priv->rl.workers + j;
+
+ for (i = 0; i < priv->rl.param.tx_channels_per_worker_def; i++) {
+ struct mlx5e_rl_channel *channel = rlw->channels + i;
+ struct mlx5e_sq *sq = channel->sq;
+
+ if (sq == NULL)
+ continue;
+
+ sq_stats = &sq->stats;
+
+ tso_packets += sq_stats->tso_packets;
+ tso_bytes += sq_stats->tso_bytes;
+ tx_queue_dropped += sq_stats->dropped;
+ tx_queue_dropped += sq_stats->enobuf;
+ tx_defragged += sq_stats->defragged;
+ tx_offload_none += sq_stats->csum_offload_none;
+ }
+ }
+#endif
+
/* update counters */
s->tso_packets = tso_packets;
s->tso_bytes = tso_bytes;
More information about the dev-commits-src-main
mailing list