Skip to contentSkip to conversation

net/mlx5: small debugging improvements

PATCH In review Dariusz Sosnowski 2 participants 4 messages Mar 24 – Mar 25 Network drivers

lore
Share & tools
lore
#0 lore raw

cover net/mlx5: small debugging improvements

Small debugging improvements for mlx5 PMD:

- Fix error logs generated on failure to modify SQ and RQ, so that verbose FW error is printed.
- Add reporting share group and share queue ID
in mlx5 implementation of rte_eth_rx_queue_info_get().

Dariusz Sosnowski (2):
common/mlx5: fix error logging for queue modify
net/mlx5: report share group and queue ID

 drivers/common/mlx5/mlx5_devx_cmds.c | 19 ++++++++-----------
 drivers/net/mlx5/mlx5_rx.c           |  4 ++++
 2 files changed, 12 insertions(+), 11 deletions(-)

--
2.47.3

#1 lore raw

PATCH 1/2 common/mlx5: fix error logging for queue modify

Add missing verbose log of FW errors when modifying SQ and RQ.

Fixes b0067860959d ("common/mlx5: update log for DevX general command failure")
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
drivers/common/mlx5/mlx5_devx_cmds.c +8 -11
index d12ebf8487..d46aa045df 100644
@@ -1672,13 +1672,11 @@ mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
 	}
 	ret = mlx5_glue->devx_obj_modify(rq->obj, in, sizeof(in),
 					 out, sizeof(out));
-
-	if (ret) {
-		DRV_LOG(ERR, "Failed to modify RQ using DevX");
-		rte_errno = errno;
-		return -errno;
+	if (ret || MLX5_FW_STATUS(out)) {
+		DEVX_DRV_LOG(ERR, out, "RQ modify", "rq_id", rq->id);
+		return MLX5_DEVX_ERR_RC(ret);
 	}
-	return ret;
+	return 0;
 }
 
 /*
@@ -2116,12 +2114,11 @@ mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq,
 	MLX5_SET(sqc, sq_ctx, hairpin_peer_vhca, sq_attr->hairpin_peer_vhca);
 	ret = mlx5_glue->devx_obj_modify(sq->obj, in, sizeof(in),
 					 out, sizeof(out));
-	if (ret) {
-		DRV_LOG(ERR, "Failed to modify SQ using DevX");
-		rte_errno = errno;
-		return -rte_errno;
+	if (ret || MLX5_FW_STATUS(out)) {
+		DEVX_DRV_LOG(ERR, out, "SQ modify", "sq_id", sq->id);
+		return MLX5_DEVX_ERR_RC(ret);
 	}
-	return ret;
+	return 0;
 }
 
 /*
Signature · 1 line
2.47.3
#2 lore raw

PATCH 2/2 net/mlx5: report share group and queue ID

In reply to Dariusz Sosnowski

Add missing share group and queue index to Rx queue info reported through rte_eth_rx_queue_info_get().

Fixes 09c2555303be ("net/mlx5: support shared Rx queue")
---
 drivers/net/mlx5/mlx5_rx.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/mlx5/mlx5_rx.c +4 -0
index bc0470e6af..1f818f3c83 100644
@@ -190,6 +190,10 @@ mlx5_rxq_info_get(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 		RTE_BIT32(rxq->elts_n);
 	qinfo->avail_thresh = rxq_priv ?
 		mlx5_rxq_lwm_to_percentage(rxq_priv) : 0;
+	if (rxq_ctrl != NULL) {
+		qinfo->conf.share_group = rxq_ctrl->share_group;
+		qinfo->conf.share_qid = rxq_ctrl->share_qid;
+	}
 }
 
 /**
Signature · 1 line
2.47.3
#3 lore raw
In reply to Dariusz Sosnowski

Hi,

Quoted 11 lines · Dariusz Sosnowski

Small debugging improvements for mlx5 PMD:

- Fix error logs generated on failure to modify SQ and RQ, so that verbose FW error is printed.
- Add reporting share group and share queue ID
in mlx5 implementation of rte_eth_rx_queue_info_get().

Dariusz Sosnowski (2):
common/mlx5: fix error logging for queue modify net/mlx5: report share group and queue ID

Quoted 7 lines
  drivers/common/mlx5/mlx5_devx_cmds.c | 19 ++++++++-----------
  drivers/net/mlx5/mlx5_rx.c           |  4 ++++
  2 files changed, 12 insertions(+), 11 deletions(-)

--
2.47.3

Series applied to next-net-mlx,

Kindest regards
Raslan Darawsheh