[PATCH 048/227] bus/pci: use NUMA node terminology

Chengwen Feng chengwen.feng at linux.dev
Tue Nov 3 15:50:06 CET 2026


From: Chengwen Feng <fengchengwen at huawei.com>

Rename socket_id parameters, internal structure fields, variables
and comments to the NUMA node terminology, and switch calls to
the NUMA-named APIs.

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
---
 drivers/bus/pci/bsd/pci.c     | 2 +-
 drivers/bus/pci/linux/pci.c   | 2 +-
 drivers/bus/pci/pci_common.c  | 2 +-
 drivers/bus/pci/windows/pci.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c
index 2d29f8d2e2..57cc01cb70 100644
--- a/drivers/bus/pci/bsd/pci.c
+++ b/drivers/bus/pci/bsd/pci.c
@@ -257,7 +257,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
 	dev->max_vfs = 0;
 
 	/* FreeBSD has no NUMA support (yet) */
-	dev->device.numa_node = SOCKET_ID_ANY;
+	dev->device.numa_node = RTE_NUMA_ID_ANY;
 
 	pci_common_set(dev);
 
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 28949e3720..063fbbce0a 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -291,7 +291,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 	    eal_parse_sysfs_value(filename, &tmp) == 0)
 		dev->device.numa_node = tmp;
 	else
-		dev->device.numa_node = SOCKET_ID_ANY;
+		dev->device.numa_node = RTE_NUMA_ID_ANY;
 
 	pci_common_set(dev);
 
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 3770b4ad75..02edeb7e40 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -192,7 +192,7 @@ pci_probe_device(struct rte_driver *drv, struct rte_device *dev)
 		loc->domain, loc->bus, loc->devid, loc->function,
 		pci_dev->device.numa_node);
 
-	if (pci_dev->device.numa_node < 0 && rte_socket_count() > 1)
+	if (pci_dev->device.numa_node < 0 && rte_numa_count() > 1)
 		PCI_LOG(INFO, "Device %s is not NUMA-aware", pci_dev->name);
 
 	already_probed = (pci_dev->intr_handle != NULL);
diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 383c6bdc2f..aa328eb75f 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -286,7 +286,7 @@ get_device_resource_info(HDEVINFO dev_info,
 	}
 
 	/* Get NUMA node using DEVPKEY_Device_Numa_Node */
-	dev->device.numa_node = SOCKET_ID_ANY;
+	dev->device.numa_node = RTE_NUMA_ID_ANY;
 	res = SetupDiGetDevicePropertyW(dev_info, dev_info_data,
 		&DEVPKEY_Device_Numa_Node, &property_type,
 		(BYTE *)&numa_node, sizeof(numa_node), NULL, 0);
-- 
2.55.0



More information about the dev mailing list