Commit
8a04cb612589 ("pci: set default numa node for broken systems")
added logic to default to NUMA node 0 when sysfs numa_node information
was wrong or not available.
Unfortunately there are many devices with wrong NUMA node information
that DPDK does not care about but still show warnings for them.
Instead, only check for invalid NUMA node information for devices
managed by the DPDK.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
return 1;
}
+ if (dev->device.numa_node < 0) {
+ RTE_LOG(WARNING, EAL, " Invalid NUMA socket, default to 0\n");
+ dev->device.numa_node = 0;
+ }
+
RTE_LOG(INFO, EAL, " probe driver: %x:%x %s\n", dev->id.vendor_id,
dev->id.device_id, dr->driver.name);
snprintf(filename, sizeof(filename), "%s/numa_node",
dirname);
- if (eal_parse_sysfs_value(filename, &tmp) == 0 &&
- tmp < RTE_MAX_NUMA_NODES)
+ if (eal_parse_sysfs_value(filename, &tmp) == 0)
dev->device.numa_node = tmp;
- else {
- RTE_LOG(WARNING, EAL,
- "numa_node is invalid or not present. "
- "Set it 0 as default\n");
- dev->device.numa_node = 0;
- }
+ else
+ dev->device.numa_node = -1;
pci_name_set(dev);