All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Thinh Tran <thinhtr@linux.vnet.ibm.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "drc@linux.vnet.ibm.com" <drc@linux.vnet.ibm.com>
Subject: RE: [PATCH] net/mlx5: set correct CPU socket ID for mlx5_rxq_ctrl
Date: Tue, 8 Mar 2022 12:14:37 +0000	[thread overview]
Message-ID: <BYAPR12MB3078AC9AEF124B87B582F4DECF099@BYAPR12MB3078.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20220307225256.172328-1-thinhtr@linux.vnet.ibm.com>

Hi Thinh,

> -----Original Message-----
> From: Thinh Tran <thinhtr@linux.vnet.ibm.com>
> Sent: Tuesday, March 8, 2022 12:53 AM
> To: dev@dpdk.org
> Cc: drc@linux.vnet.ibm.com; Thinh Tran <thinhtr@linux.vnet.ibm.com>
> Subject: [PATCH] net/mlx5: set correct CPU socket ID for mlx5_rxq_ctrl
> 
This is a fix, so it's better to start commit title with a fix:
Something like this maybe:
"net/mlx5: fix CPU socket ID for mlx5_rxq_ctrl"
> I hit a failure during ports drop queue RQ creation when my adapters
> are on CPU socket ID 1 instead of socket ID 0:
> ....
> EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.0 (socket 1)
> EAL: set_mempolicy failed: Invalid argument
> mlx5_common: Failed to allocate memory for RQ.
> mlx5_net: Port 0 drop queue RQ creation failed.
> mlx5_net: Cannot create drop RX queue
> mlx5_net: probe of PCI device 0020:01:00.0 aborted after encountering an
> error: Success
> EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.1 (socket 1)
> EAL: set_mempolicy failed: Invalid argument
> mlx5_common: Failed to allocate memory for RQ.
> mlx5_net: Port 0 drop queue RQ creation failed.
> mlx5_net: Cannot create drop RX queue
> mlx5_net: probe of PCI device 0020:01:00.1 aborted after encountering an
> error: Success
> TELEMETRY: No legacy callbacks, legacy socket not created
> testpmd: No probed ethernet devices
> ...
It's better to describe the issue rather than showing an example alone,
Maybe something like this:

The socket ID is used to determine the socket where to allocate memory for
mlx5_rxq_ctrl, currently it's set to 0 by default which mistakenly leads to 
allocating the memory on socket 0 always.

> 
> 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.
> Result with this patch:

This sets the correct CPU socket ID before memory allocation to use the correct
socket ID.

> ......
> EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.0 (socket 1)
> EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.1 (socket 1)
> TELEMETRY: No legacy callbacks, legacy socket not created
> Interactive-mode selected
> ......
> Configuring Port 0 (socket 1)
> Port 0: 0C:42:A1:ED:C1:20
> Configuring Port 1 (socket 1)
> Port 1: 0C:42:A1:ED:C1:21
> Checking link statuses...
> Done
> 
Missing:
Fixes tag:

Fixes: 5ceb3a02b000 ("net/mlx5: move Rx queue DevX resource")
Cc: xuemingl@nvidia.com
Missing Cc stable for backport. 

Cc: stable@dpdk.org

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

Kindest regards,
Raslan Darawsheh

  parent reply	other threads:[~2022-03-08 12:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 22:52 [PATCH] net/mlx5: set correct CPU socket ID for mlx5_rxq_ctrl Thinh Tran
2022-03-08 10:23 ` Matan Azrad
2022-03-08 12:14 ` Raslan Darawsheh [this message]
2022-03-08 12:23   ` Dmitry Kozlyuk
2022-03-08 12:25     ` Raslan Darawsheh
2022-03-09  8:50       ` Slava Ovsiienko
2022-03-09 17:10         ` Thinh Tran
2022-03-09 19:49 ` [PATCH v2] net/mlx5: fix CPU socket ID for Rx queue creation Thinh Tran
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=BYAPR12MB3078AC9AEF124B87B582F4DECF099@BYAPR12MB3078.namprd12.prod.outlook.com \
    --to=rasland@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=drc@linux.vnet.ibm.com \
    --cc=thinhtr@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.