[v3] bus: clarify log for non-NUMA-aware devices
Checks
Commit Message
PCI, vmbus, and auxiliary drivers printed a warning
when NUMA node had beed reported as (-1) or not reported by OS:
EAL: Invalid NUMA socket, default to 0
This message and its level might confuse users, because configuration
is valid and nothing happens that requires attention or intervention.
Reduce level to INFO, reword the message, and suppress it when there is
only one NUMA node, bacause NUMA-awareness does not matter in this case.
Fixes: f0e0e86aa35d ("pci: move NUMA node check from scan to probe")
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
---
v3: keep resetting device NUMA node to 0 (Andrew).
doc/guides/nics/ena.rst | 2 +-
drivers/bus/auxiliary/auxiliary_common.c | 3 ++-
drivers/bus/pci/pci_common.c | 3 ++-
drivers/bus/vmbus/vmbus_common.c | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
@@ -246,7 +246,7 @@ Example output:
[...]
EAL: PCI device 0000:00:06.0 on NUMA socket -1
- EAL: Invalid NUMA socket, default to 0
+ EAL: Device is not NUMA-aware, defaulting socket to 0
EAL: probe driver: 1d0f:ec20 net_ena
Interactive-mode selected
@@ -106,7 +106,8 @@ rte_auxiliary_probe_one_driver(struct rte_auxiliary_driver *drv,
}
if (dev->device.numa_node < 0) {
- AUXILIARY_LOG(INFO, "Device is not NUMA-aware, defaulting NUMA node to 0");
+ if (rte_socket_count() > 1)
+ AUXILIARY_LOG(INFO, " Device is not NUMA-aware, defaulting socket to 0");
dev->device.numa_node = 0;
}
@@ -190,7 +190,8 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
}
if (dev->device.numa_node < 0) {
- RTE_LOG(WARNING, EAL, " Invalid NUMA socket, default to 0\n");
+ if (rte_socket_count() > 1)
+ RTE_LOG(INFO, EAL, " Device is not NUMA-aware, defaulting socket to 0\n");
dev->device.numa_node = 0;
}
@@ -112,7 +112,8 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
dev->driver = dr;
if (dev->device.numa_node < 0) {
- VMBUS_LOG(WARNING, " Invalid NUMA socket, default to 0");
+ if (rte_socket_count() > 1)
+ VMBUS_LOG(INFO, " Device is not NUMA-aware, defaulting socket to 0");
dev->device.numa_node = 0;
}