Skip to content

Commit

Permalink
net/mlx5: fix CPU socket ID for Rx queue creation
Browse files Browse the repository at this point in the history
[ upstream commit 9011af7 ]

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: bc5bee0 ("net/mlx5: create drop queue using DevX")

Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
  • Loading branch information
ThinhTrTran authored and kevintraynor committed Mar 16, 2022
1 parent 8db2867 commit a50b228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/mlx5/mlx5_devx.c
Expand Up @@ -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;
Expand Down

0 comments on commit a50b228

Please sign in to comment.