Skip to content

Commit

Permalink
bus/pci: ignore missing NUMA node on Windows
Browse files Browse the repository at this point in the history
[ upstream commit ac7c98d ]

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: b762221 ("bus/pci: support Windows with bifurcated drivers")

Reported-by: Odi Assli <odia@nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Tested-by: Odi Assli <odia@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
  • Loading branch information
Tal Shnaiderman authored and bluca committed Feb 2, 2021
1 parent 5740e51 commit ac97254
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/bus/pci/windows/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ 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 is not bound to PCIe locality. */
dev->device.numa_node = 0;
return ERROR_SUCCESS;
}
RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"
"(DEVPKEY_Device_Numa_Node)");
return -1;
Expand Down

0 comments on commit ac97254

Please sign in to comment.