From: Dmitry Kozlyuk Date: Wed, 4 Aug 2021 08:03:01 +0000 (+0300) Subject: bus: clarify log for non-NUMA-aware devices X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e9b3d79b0696cd983ace8e6f65532b240f43a1bb;p=dpdk.git bus: clarify log for non-NUMA-aware devices PCI, vmbus, and auxiliary drivers printed a warning when NUMA node had been reported as (-1) or not reported by OS: EAL: Invalid NUMA socket, default to 0 This message and its level might confuse users because the configuration is valid and nothing happens that requires attention or intervention. It was also printed without the device identification and with an indent (PCI only), which is confusing unless DEBUG logging is on to print the header message with the device name. Reduce level to INFO, reword the message, and suppress it when there is only one NUMA node because NUMA awareness does not matter in this case. Also, remove the indent for PCI. 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 Reviewed-by: Viacheslav Ovsiienko Reviewed-by: Xueming Li Acked-by: Andrew Rybchenko --- diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst index 63951098ea..92b1858e7a 100644 --- a/doc/guides/nics/ena.rst +++ b/doc/guides/nics/ena.rst @@ -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 0000:00:06.0 is not NUMA-aware, defaulting socket to 0 EAL: probe driver: 1d0f:ec20 net_ena Interactive-mode selected diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c index 89e653c54e..603b6fdc02 100644 --- a/drivers/bus/auxiliary/auxiliary_common.c +++ b/drivers/bus/auxiliary/auxiliary_common.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -106,7 +107,9 @@ 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 %s is not NUMA-aware, defaulting socket to 0", + dev->name); dev->device.numa_node = 0; } diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 35d7d092d1..79a6fcffbd 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -190,7 +191,9 @@ 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 %s is not NUMA-aware, defaulting socket to 0\n", + dev->name); dev->device.numa_node = 0; } diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c index d25fd14ef5..519ca9c6fe 100644 --- a/drivers/bus/vmbus/vmbus_common.c +++ b/drivers/bus/vmbus/vmbus_common.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -112,7 +113,9 @@ 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 %s is not NUMA-aware, defaulting socket to 0", + guid); dev->device.numa_node = 0; }