[dpdk-dev] [dpdk-stable] [PATCH] pci/windows: do not fail on missing NUMA node for PCIe

Thomas Monjalon thomas at monjalon.net
Tue Jan 5 23:01:04 CET 2021


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 at dpdk.org
> 
> Reported-by: Odi Assli <odia at nvidia.com>
> Signed-off-by: Tal Shnaiderman <talshn at 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.




More information about the dev mailing list