git: e424e6325355 - stable/12 - MFC 9e7fa1e66c1e: Collect statistics from all rate-limit queues in mlx5en(4).
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Jan 12 16:51:02 UTC 2021
The branch stable/12 has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=e424e632535539a72604c651d071e2e8bf6eadbb
commit e424e632535539a72604c651d071e2e8bf6eadbb
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: 2021-01-12 16:47:00 +0000
MFC 9e7fa1e66c1e:
Collect statistics from all rate-limit queues in mlx5en(4).
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 ef500664cdef..b22f949fdb87 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -904,6 +904,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-all
mailing list