From a50b228d2d1cc2174e73cc632ebf925f6dd530ef Mon Sep 17 00:00:00 2001 From: Thinh Tran Date: Wed, 9 Mar 2022 14:49:00 -0500 Subject: [PATCH] net/mlx5: fix CPU socket ID for Rx queue creation [ upstream commit 9011af71bbd1787870b77a9bf34681f1ab1198b6 ] The default CPU socket ID was used while creating the Rx queue and this caused creation failure in case if hardware was not resided on the default socket. The patch sets the correct CPU socket ID for the mlx5_rxq_ctrl before calling the mlx5_rxq_create_devx_rq_resources() which eventually calls mlx5_devx_rq_create() with correct CPU socket ID. Fixes: bc5bee028ebc ("net/mlx5: create drop queue using DevX") Signed-off-by: Thinh Tran Reviewed-by: David Christensen Acked-by: Viacheslav Ovsiienko Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_devx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c index 91243f684f..abf6a48086 100644 --- a/drivers/net/mlx5/mlx5_devx.c +++ b/drivers/net/mlx5/mlx5_devx.c @@ -931,6 +931,8 @@ mlx5_rxq_devx_obj_drop_create(struct rte_eth_dev *dev) rte_errno = ENOMEM; goto error; } + /* set the CPU socket ID where the rxq_ctrl was allocated */ + rxq_ctrl->socket = socket_id; rxq_obj->rxq_ctrl = rxq_ctrl; rxq_ctrl->type = MLX5_RXQ_TYPE_STANDARD; rxq_ctrl->sh = priv->sh;