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š <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
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_octeontx2_linux_gcc | 1 +
config/arm/arm64_stingray_linux_gcc | 1 +
config/arm/meson.build | 2 --
config/meson.build | 19 +++++++++++++------
.../linux_gsg/cross_build_dpdk_for_arm64.rst | 4 ++++
10 files changed, 24 insertions(+), 8 deletions(-)
@@ -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']
@@ -17,3 +17,4 @@ implementer_id = '0x41'
part_number = '0xd08'
max_lcores = 16
max_numa_nodes = 1
+numa = false
@@ -18,3 +18,4 @@ implementer_id = 'dpaa'
part_number = '0xd08'
max_lcores = 16
max_numa_nodes = 1
+numa = false
@@ -17,3 +17,4 @@ implementor_id = '0x41'
implementor_pn = '0xd0c'
max_lcores = 64
max_numa_nodes = 1
+numa = false
@@ -17,3 +17,4 @@ implementer_id = '0x41'
part_number = '0xd0c'
max_lcores = 4
max_numa_nodes = 1
+numa = false
@@ -17,3 +17,4 @@ implementer_id = '0x43'
part_number = '0xb2'
max_lcores = 36
max_numa_nodes = 1
+numa = false
@@ -17,3 +17,4 @@ implementer_id = '0x41'
part_number = '0xd08'
max_lcores = 16
max_numa_nodes = 1
+numa = false
@@ -62,8 +62,6 @@ part_number_config_arm = {
['RTE_MACHINE', '"neoverse-n1"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_USE_C11_MEM_MODEL', true],
- ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
- ['RTE_LIBRTE_VHOST_NUMA', false],
['RTE_MAX_MEM_MB', 1048576],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 64],
@@ -143,12 +143,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
+ check_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
@@ -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