patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thinh Tran <thinhtr@linux.vnet.ibm.com>
To: dev@dpdk.org
Cc: drc@linux.vnet.ibm.com, viacheslavo@nvidia.com,
	rasland@nvidia.com, dkozlyuk@nvidia.com,
	Thinh Tran <thinhtr@linux.vnet.ibm.com>,
	stable@dpdk.org
Subject: [PATCH v2] net/mlx5: fix CPU socket ID for Rx queue creation
Date: Wed,  9 Mar 2022 14:49:00 -0500	[thread overview]
Message-ID: <20220309194900.341944-1-thinhtr@linux.vnet.ibm.com> (raw)
In-Reply-To: <20220307225256.172328-1-thinhtr@linux.vnet.ibm.com>

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.

v2: change patch description, no code change

Fixes: bc5bee028ebc ("net/mlx5: create drop queue using DevX")
Cc: stable@dpdk.org


Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>

---
 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 af106bda50..5ab092a259 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -947,6 +947,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->is_hairpin = false;
 	rxq_ctrl->sh = priv->sh;
-- 
2.27.0


       reply	other threads:[~2022-03-09 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220307225256.172328-1-thinhtr@linux.vnet.ibm.com>
2022-03-09 19:49 ` Thinh Tran [this message]
2022-03-10  9:23   ` Slava Ovsiienko
2022-03-10  9:30     ` Raslan Darawsheh
2022-03-10 15:38   ` Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220309194900.341944-1-thinhtr@linux.vnet.ibm.com \
    --to=thinhtr@linux.vnet.ibm.com \
    --cc=dev@dpdk.org \
    --cc=dkozlyuk@nvidia.com \
    --cc=drc@linux.vnet.ibm.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).