Disabling NUMA warnings on non-NUMA systems. "EAL: eal_parse_sysfs_value(): cannot open sysfs value /sys/bus/pci/devices/0000:00:00.0/numa_node EAL: numa_node is invalid or not present. Set it 0 as default EAL: cannot open /proc/self/numa_maps, consider that all memory is in socket_id 0"
Signed-off-by: Hemant Agrawal <hemant.agra...@nxp.com> --- lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++++---- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 040f24a..44e7e4e 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -595,6 +595,7 @@ unmap_all_hugepages_orig(struct hugepage_file *hugepg_tbl, struct hugepage_info return 0; } +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES /* * Parse /proc/self/numa_maps to get the NUMA socket ID for each huge * page. @@ -662,11 +663,9 @@ find_numasocket(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi) if (hugepg_tbl[i].orig_va == va) { hugepg_tbl[i].socket_id = socket_id; hp_count++; -#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES RTE_LOG(DEBUG, EAL, "Hugepage %s is on socket %d\n", hugepg_tbl[i].filepath, socket_id); -#endif } } } @@ -681,6 +680,7 @@ find_numasocket(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi) fclose(f); return -1; } +#endif static int cmp_physaddr(const void *a, const void *b) @@ -1160,13 +1160,13 @@ rte_eal_hugepage_init(void) goto fail; } } - +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES if (find_numasocket(&tmp_hp[hp_offset], hpi) < 0){ RTE_LOG(DEBUG, EAL, "Failed to find NUMA socket for %u MB pages\n", (unsigned)(hpi->hugepage_sz / 0x100000)); goto fail; } - +#endif qsort(&tmp_hp[hp_offset], hpi->num_pages[0], sizeof(struct hugepage_file), cmp_physaddr); diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 7d9e1a9..688b052 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -310,6 +310,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) dev->max_vfs = (uint16_t)tmp; } +#ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES /* get numa node, default to 0 if not present */ snprintf(filename, sizeof(filename), "%s/numa_node", dirname); @@ -323,6 +324,9 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) "Set it 0 as default\n"); dev->device.numa_node = 0; } +#else + dev->device.numa_node = 0; +#endif rte_pci_device_name(addr, dev->name, sizeof(dev->name)); dev->device.name = dev->name; -- 2.7.4