The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e424e632535539a72604c651d071e2e8bf6eadbb
commit e424e632535539a72604c651d071e2e8bf6eadbb Author: Hans Petter Selasky <[email protected]> AuthorDate: 2020-10-12 08:18:48 +0000 Commit: Hans Petter Selasky <[email protected]> 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; _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
