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 <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
[...]
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
#include <rte_memory.h>
#include <rte_eal.h>
#include <rte_eal_paging.h>
+#include <rte_lcore.h>
#include <rte_string_fns.h>
#include <rte_common.h>
#include <rte_devargs.h>
}
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;
}
#include <rte_bus.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
+#include <rte_lcore.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_eal.h>
}
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;
}
#include <rte_eal.h>
#include <rte_tailq.h>
#include <rte_devargs.h>
+#include <rte_lcore.h>
#include <rte_malloc.h>
#include <rte_errno.h>
#include <rte_memory.h>
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;
}