aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTariq Toukan <[email protected]>2022-11-27 09:21:28 +0200
committerSaeed Mahameed <[email protected]>2022-12-28 11:38:50 -0800
commitf8c18a5749cf917096f75dd59885b7a0fe9298ba (patch)
treedf6a8b7d41c479b062d6845ffe7520d85a83c995
parentb12d581e83e3ae1080c32ab83f123005bd89a840 (diff)
net/mlx5e: Fix RX reporter for XSK RQs
RX reporter mistakenly reads from the regular (inactive) RQ when XSK RQ is active. Fix it here. Fixes: 3db4c85cde7a ("net/mlx5e: xsk: Use queue indices starting from 0 for XSK queues") Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
index 5f6f95ad6888..1ae15b8536a8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
@@ -459,7 +459,11 @@ static int mlx5e_rx_reporter_diagnose(struct devlink_health_reporter *reporter,
goto unlock;
for (i = 0; i < priv->channels.num; i++) {
- struct mlx5e_rq *rq = &priv->channels.c[i]->rq;
+ struct mlx5e_channel *c = priv->channels.c[i];
+ struct mlx5e_rq *rq;
+
+ rq = test_bit(MLX5E_CHANNEL_STATE_XSK, c->state) ?
+ &c->xskrq : &c->rq;
err = mlx5e_rx_reporter_build_diagnose_output(rq, fmsg);
if (err)