From: Pallavi Kadam Date: Wed, 22 Sep 2021 21:19:06 +0000 (-0700) Subject: bus/pci: fix unknown NUMA node value on Windows X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bf7cf1f947bd;p=dpdk.git bus/pci: fix unknown NUMA node value on Windows On older CPUs, currently numa_node returns value only for socket 0. Instead, application should be able to make correct decision and also to keep consistent with the Linux code, replace the return value to -1. Fixes: ac7c98d04f2c ("bus/pci: ignore missing NUMA node on Windows") Cc: stable@dpdk.org Reported-by: Vipin Varghese Signed-off-by: Pallavi Kadam Acked-by: Tal Shnaiderman --- diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c index d39a7748b8..343ef6f33b 100644 --- a/drivers/bus/pci/windows/pci.c +++ b/drivers/bus/pci/windows/pci.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "private.h" #include "pci_netuio.h" @@ -243,7 +244,7 @@ get_device_resource_info(HDEVINFO dev_info, DWORD error = GetLastError(); if (error == ERROR_NOT_FOUND) { /* On older CPUs, NUMA is not bound to PCIe locality. */ - dev->device.numa_node = 0; + dev->device.numa_node = SOCKET_ID_ANY; return ERROR_SUCCESS; } RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"