From: Tal Shnaiderman Date: Sun, 13 Dec 2020 14:16:04 +0000 (+0200) Subject: bus/pci: ignore missing NUMA node on Windows X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ac7c98d04f2c5c8d57c4f87799a669dca9ca9605;p=dpdk.git bus/pci: ignore missing NUMA node on Windows 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 Signed-off-by: Tal Shnaiderman Tested-by: Odi Assli Acked-by: Dmitry Kozlyuk Acked-by: Ranjit Menon --- diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c index fbf0785fdb..f662584528 100644 --- a/drivers/bus/pci/windows/pci.c +++ b/drivers/bus/pci/windows/pci.c @@ -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;