patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Tal Shnaiderman <talshn@nvidia.com>
Cc: dev@dpdk.org, stable@dpdk.org, pallavi.kadam@intel.com,
	dmitry.kozliuk@gmail.com, navasile@linux.microsoft.com,
	dmitrym@microsoft.com, odia@nvidia.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe
Date: Tue, 05 Jan 2021 23:01:04 +0100	[thread overview]
Message-ID: <76662169.ZHu4aoMZnK@thomas> (raw)
In-Reply-To: <20201213141604.12560-1-talshn@nvidia.com>

13/12/2020 15:16, Tal Shnaiderman:
> On older processors, NUMA isn't bound to PCIe locality.
> those cases return ERROR_NOT_FOUND in response to the
> SetupDiGetDevicePropertyW call with DEVPKEY_Device_Numa_Node
> attribute.
> 
> This error fails the probe process for the PCIe device.
> this commit will ignore such failure and will set the
> numa_node to 0.
> 
> Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
> Cc: stable@dpdk.org
> 
> Reported-by: Odi Assli <odia@nvidia.com>
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
> --- a/drivers/bus/pci/windows/pci.c
> +++ b/drivers/bus/pci/windows/pci.c
> @@ -234,6 +234,15 @@ get_device_resource_info(HDEVINFO dev_info,
>  		&DEVPKEY_Device_Numa_Node, &property_type,
>  		(BYTE *)&numa_node, sizeof(numa_node), NULL, 0);
>  	if (!res) {
> +		DWORD error = GetLastError();
> +		if (error == ERROR_NOT_FOUND) {
> +			/* On older CPUs, NUMA isn't bound to PCIe locality
> +			 * We do not want to fail the probing process
> +			 * Setting 0 for numa_node and returnng ERROR_SUCCESS.
> +			 */

The last 2 lines of comment are rephrasing the 2 lines of code below,
so it can be removed.

> +			dev->device.numa_node = 0;
> +			return ERROR_SUCCESS;
> +		}

Applied with smaller comment, thanks.



      parent reply	other threads:[~2021-01-05 22:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13 14:16 Tal Shnaiderman
2020-12-13 14:20 ` Odi Assli
2020-12-13 17:20 ` Dmitry Kozlyuk
2020-12-14 20:35 ` [dpdk-stable] [dpdk-dev] " Ranjit Menon
2021-01-05 22:01 ` Thomas Monjalon [this message]

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=76662169.ZHu4aoMZnK@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=odia@nvidia.com \
    --cc=pallavi.kadam@intel.com \
    --cc=stable@dpdk.org \
    --cc=talshn@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).