From: Juraj Linkeš Date: Fri, 15 Jan 2021 13:26:08 +0000 (+0100) Subject: config/arm: disable libnuma in cross builds X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=05a732f7f78d6be13c7e593f67040cf0e55e503d;p=dpdk.git config/arm: disable libnuma in cross builds Some Arm SoCs are not NUMA systems. Add the capability to disable NUMA for cross build and disable NUMA in Arm cross files. Signed-off-by: Juraj Linkeš Reviewed-by: Honnappa Nagarahalli Acked-by: Jerin Jacob Tested-by: Jerin Jacob Tested-by: Pavan Nikhilesh Tested-by: Vimal Chungath Tested-by: Dharmik Thakkar --- diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc index 2ecc4604c0..9958db6692 100644 --- a/config/arm/arm64_armada_linux_gcc +++ b/config/arm/arm64_armada_linux_gcc @@ -18,3 +18,4 @@ implementer_id = '0x56' part_number = '0xd08' max_lcores = 16 max_numa_nodes = 1 +numa = false diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc index 4f56790c5a..6bef87fbd4 100644 --- a/config/arm/arm64_bluefield_linux_gcc +++ b/config/arm/arm64_bluefield_linux_gcc @@ -17,3 +17,4 @@ implementer_id = '0x41' part_number = '0xd08' max_lcores = 16 max_numa_nodes = 1 +numa = false diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc index 8641fee63c..37398c7628 100644 --- a/config/arm/arm64_dpaa_linux_gcc +++ b/config/arm/arm64_dpaa_linux_gcc @@ -18,3 +18,4 @@ implementer_id = 'dpaa' part_number = '0xd08' max_lcores = 16 max_numa_nodes = 1 +numa = false diff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc index d0bfec87d6..cfe2397975 100644 --- a/config/arm/arm64_graviton2_linux_gcc +++ b/config/arm/arm64_graviton2_linux_gcc @@ -17,3 +17,4 @@ implementor_id = '0x41' implementor_pn = '0xd0c' max_lcores = 64 max_numa_nodes = 1 +numa = false diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc index 138ae08c3c..b00f2d1ef7 100644 --- a/config/arm/arm64_n1sdp_linux_gcc +++ b/config/arm/arm64_n1sdp_linux_gcc @@ -17,3 +17,4 @@ implementer_id = '0x41' part_number = '0xd0c' max_lcores = 4 max_numa_nodes = 1 +numa = false diff --git a/config/arm/arm64_n2_linux_gcc b/config/arm/arm64_n2_linux_gcc index d249ccf913..817b8ee28e 100644 --- a/config/arm/arm64_n2_linux_gcc +++ b/config/arm/arm64_n2_linux_gcc @@ -17,3 +17,4 @@ implementer_id = '0x41' part_number = '0xd49' max_lcores = 64 max_numa_nodes = 1 +numa = false diff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc index 26cf471adb..5937697098 100644 --- a/config/arm/arm64_octeontx2_linux_gcc +++ b/config/arm/arm64_octeontx2_linux_gcc @@ -17,3 +17,4 @@ implementer_id = '0x43' part_number = '0xb2' max_lcores = 36 max_numa_nodes = 1 +numa = false diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc index 4f56790c5a..6bef87fbd4 100644 --- a/config/arm/arm64_stingray_linux_gcc +++ b/config/arm/arm64_stingray_linux_gcc @@ -17,3 +17,4 @@ implementer_id = '0x41' part_number = '0xd08' max_lcores = 16 max_numa_nodes = 1 +numa = false diff --git a/config/arm/meson.build b/config/arm/meson.build index d397471ebe..f207e5a288 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -59,8 +59,6 @@ part_number_config_arm = { 'flags': [ ['RTE_MACHINE', '"neoverse-n1"'], ['RTE_ARM_FEATURE_ATOMICS', true], - ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false], - ['RTE_LIBRTE_VHOST_NUMA', false], ['RTE_MAX_MEM_MB', 1048576], ['RTE_MAX_LCORE', 80] ] @@ -70,8 +68,6 @@ part_number_config_arm = { 'flags': [ ['RTE_MACHINE', '"neoverse-n2"'], ['RTE_ARM_FEATURE_ATOMICS', true], - ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false], - ['RTE_LIBRTE_VHOST_NUMA', false], ['RTE_MAX_LCORE', 64] ] } diff --git a/config/meson.build b/config/meson.build index 19c7430913..f3d61b170b 100644 --- a/config/meson.build +++ b/config/meson.build @@ -142,12 +142,19 @@ endif # check for libraries used in multiple places in DPDK has_libnuma = 0 -numa_dep = cc.find_library('numa', required: false) -if numa_dep.found() and cc.has_header('numaif.h') - dpdk_conf.set10('RTE_HAS_LIBNUMA', true) - has_libnuma = 1 - add_project_link_arguments('-lnuma', language: 'c') - dpdk_extra_ldflags += '-lnuma' +find_libnuma = true +if meson.is_cross_build() and not meson.get_cross_property('numa', true) + # don't look for libnuma if explicitly disabled in cross build + find_libnuma = false +endif +if find_libnuma + numa_dep = cc.find_library('numa', required: false) + if numa_dep.found() and cc.has_header('numaif.h') + dpdk_conf.set10('RTE_HAS_LIBNUMA', true) + has_libnuma = 1 + add_project_link_arguments('-lnuma', language: 'c') + dpdk_extra_ldflags += '-lnuma' + endif endif has_libfdt = 0 diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst index 4e65b271c0..d0d346c83c 100644 --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst @@ -143,3 +143,7 @@ There are other options you may specify in a cross file to tailor the build:: Supported extra configuration max_numa_nodes = n # will set RTE_MAX_NUMA_NODES max_lcores = n # will set RTE_MAX_LCORE + + numa = false # set to false to force building for a non-NUMA system + # if not set or set to true, the build system will build for a NUMA + # system only if libnuma is installed