From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8EE9A0A02; Fri, 15 Jan 2021 14:28:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CA181410C0; Fri, 15 Jan 2021 14:26:35 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 2FECA141099 for ; Fri, 15 Jan 2021 14:26:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id E9B82BF47B; Fri, 15 Jan 2021 14:26:31 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3In3cFXaoZaO; Fri, 15 Jan 2021 14:26:27 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id B035ABFD96; Fri, 15 Jan 2021 14:26:22 +0100 (CET) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: bruce.richardson@intel.com, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, Phil.Yang@arm.com, vcchunga@amazon.com, Dharmik.Thakkar@arm.com, jerinjacobk@gmail.com, hemant.agrawal@nxp.com, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, aboyer@pensando.io Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Date: Fri, 15 Jan 2021 14:26:08 +0100 Message-Id: <1610717170-31279-11-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610717170-31279-1-git-send-email-juraj.linkes@pantheon.tech> References: <1608724059-8562-1-git-send-email-juraj.linkes@pantheon.tech> <1610717170-31279-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v15 10/12] build: disable libnuma in cross builds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- config/arm/arm64_armada_linux_gcc | 1 + config/arm/arm64_bluefield_linux_gcc | 1 + config/arm/arm64_dpaa_linux_gcc | 1 + config/arm/arm64_graviton2_linux_gcc | 1 + config/arm/arm64_n1sdp_linux_gcc | 1 + config/arm/arm64_n2_linux_gcc | 1 + config/arm/arm64_octeontx2_linux_gcc | 1 + config/arm/arm64_stingray_linux_gcc | 1 + config/arm/meson.build | 4 ---- config/meson.build | 19 +++++++++++++------ .../linux_gsg/cross_build_dpdk_for_arm64.rst | 4 ++++ 11 files changed, 25 insertions(+), 10 deletions(-) diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc index e365f61d0..487cb2923 100644 --- a/config/arm/arm64_armada_linux_gcc +++ b/config/arm/arm64_armada_linux_gcc @@ -18,4 +18,5 @@ implementer_id = '0x56' part_number = '0xd08' max_lcores = 16 max_numa_nodes = 1 +numa = false disabled_drivers = ['bus/dpaa', 'bus/fslmc', 'common/dpaax'] diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc index 4f56790c5..6bef87fbd 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 8641fee63..37398c762 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 d0bfec87d..cfe239797 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 138ae08c3..b00f2d1ef 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 d249ccf91..817b8ee28 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 26cf471ad..593769709 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 4f56790c5..6bef87fbd 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 c6eecd14c..bf3adb2c6 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 19c743091..f3d61b170 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 210ad4508..063661ebf 100644 --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst @@ -147,3 +147,7 @@ There are other options you may specify in a cross file to tailor the build:: disabled_drivers = ['bus/dpaa', 'crypto'] # add disabled drivers # valid values are directories (optionally with their subdirs) # in the drivers directory + + 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 -- 2.20.1