[PATCH 20.11] net/mlx5: fix typo in queue counter query

Matan Azrad matan at nvidia.com
Sun Jul 31 16:34:15 CEST 2022


The backport commit of the imissed statistics fix for 20.11 includes a
typo issue and use a wrong pointer in DevX command to query queue
counters.

Set the correct pointer points to the created queue counter object
instead of the context pointer used wrongly in this query API.

Fixes: ede02cfc4783 ("net/mlx5: fix imissed statistics")
Cc: stable at dpdk.org

Signed-off-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index f98cf90dd8..05f47127c9 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2589,7 +2589,7 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
 	if (priv->sh) {
 		if (priv->q_counters != NULL &&
 		    strcmp(ctr_name, "out_of_buffer") == 0)
-			return mlx5_devx_cmd_queue_counter_query(priv->sh->ctx,
+			return mlx5_devx_cmd_queue_counter_query(priv->q_counters,
 							   0, (uint32_t *)stat);
 		MKSTR(path, "%s/ports/%d/hw_counters/%s",
 		      priv->sh->ibdev_path,
-- 
2.25.1



More information about the stable mailing list