DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe
@ 2020-12-13 14:16 Tal Shnaiderman
  2020-12-13 14:20 ` Odi Assli
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tal Shnaiderman @ 2020-12-13 14:16 UTC (permalink / raw)
  To: dev
  Cc: thomas, pallavi.kadam, dmitry.kozliuk, navasile, dmitrym, odia, stable

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>
---
 drivers/bus/pci/windows/pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 33a5fb1d83..62bac4b8ec 100644
--- 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.
+			 */
+			dev->device.numa_node = 0;
+			return ERROR_SUCCESS;
+		}
 		RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
 			"(DEVPKEY_Device_Numa_Node)");
 		return -1;
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe
  2020-12-13 14:16 [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe Tal Shnaiderman
@ 2020-12-13 14:20 ` Odi Assli
  2020-12-13 17:20 ` Dmitry Kozlyuk
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Odi Assli @ 2020-12-13 14:20 UTC (permalink / raw)
  To: Tal Shnaiderman, dev
  Cc: NBU-Contact-Thomas Monjalon, pallavi.kadam, dmitry.kozliuk,
	navasile, dmitrym, stable

> Subject: [PATCH] pci/windows: do not fail on missing NUMA node for PCIe
> 
> 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>
> ---
>  drivers/bus/pci/windows/pci.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
> index 33a5fb1d83..62bac4b8ec 100644
> --- 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.
> +			 */
> +			dev->device.numa_node = 0;
> +			return ERROR_SUCCESS;
> +		}
>  		RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
>  			"(DEVPKEY_Device_Numa_Node)");
>  		return -1;
> --
> 2.16.1.windows.4

Tested-by: Odi Assli <odia@nvidia.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe
  2020-12-13 14:16 [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe Tal Shnaiderman
  2020-12-13 14:20 ` Odi Assli
@ 2020-12-13 17:20 ` Dmitry Kozlyuk
  2020-12-14 20:35 ` Ranjit Menon
  2021-01-05 22:01 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  3 siblings, 0 replies; 5+ messages in thread
From: Dmitry Kozlyuk @ 2020-12-13 17:20 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, thomas, pallavi.kadam, navasile, dmitrym, odia, stable

On Sun, 13 Dec 2020 16:16:04 +0200, Tal Shnaiderman wrote:
> 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>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe
  2020-12-13 14:16 [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe Tal Shnaiderman
  2020-12-13 14:20 ` Odi Assli
  2020-12-13 17:20 ` Dmitry Kozlyuk
@ 2020-12-14 20:35 ` Ranjit Menon
  2021-01-05 22:01 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  3 siblings, 0 replies; 5+ messages in thread
From: Ranjit Menon @ 2020-12-14 20:35 UTC (permalink / raw)
  To: Tal Shnaiderman, dev
  Cc: thomas, pallavi.kadam, dmitry.kozliuk, navasile, dmitrym, odia, stable

On 12/13/2020 6:16 AM, Tal Shnaiderman wrote:
> 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>
> ---
>   drivers/bus/pci/windows/pci.c | 9 +++++++++
>   1 file changed, 9 insertions(+)

Acked-by: Ranjit Menon<ranjit.menon@intel.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe
  2020-12-13 14:16 [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe Tal Shnaiderman
                   ` (2 preceding siblings ...)
  2020-12-14 20:35 ` Ranjit Menon
@ 2021-01-05 22:01 ` Thomas Monjalon
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2021-01-05 22:01 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, stable, pallavi.kadam, dmitry.kozliuk, navasile, dmitrym,
	odia, stable

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-05 22:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-13 14:16 [dpdk-dev] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe Tal Shnaiderman
2020-12-13 14:20 ` Odi Assli
2020-12-13 17:20 ` Dmitry Kozlyuk
2020-12-14 20:35 ` Ranjit Menon
2021-01-05 22:01 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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).