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š <juraj.linkes@pantheon.tech>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Tested-by: Vimal Chungath <vcchunga@amazon.com>
Tested-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
This commit is contained in:
Juraj Linkeš 2021-01-15 14:26:08 +01:00 committed by Thomas Monjalon
parent fe4ae32587
commit 05a732f7f7
11 changed files with 25 additions and 10 deletions

View File

@ -18,3 +18,4 @@ implementer_id = '0x56'
part_number = '0xd08'
max_lcores = 16
max_numa_nodes = 1
numa = false

View File

@ -17,3 +17,4 @@ implementer_id = '0x41'
part_number = '0xd08'
max_lcores = 16
max_numa_nodes = 1
numa = false

View File

@ -18,3 +18,4 @@ implementer_id = 'dpaa'
part_number = '0xd08'
max_lcores = 16
max_numa_nodes = 1
numa = false

View File

@ -17,3 +17,4 @@ implementor_id = '0x41'
implementor_pn = '0xd0c'
max_lcores = 64
max_numa_nodes = 1
numa = false

View File

@ -17,3 +17,4 @@ implementer_id = '0x41'
part_number = '0xd0c'
max_lcores = 4
max_numa_nodes = 1
numa = false

View File

@ -17,3 +17,4 @@ implementer_id = '0x41'
part_number = '0xd49'
max_lcores = 64
max_numa_nodes = 1
numa = false

View File

@ -17,3 +17,4 @@ implementer_id = '0x43'
part_number = '0xb2'
max_lcores = 36
max_numa_nodes = 1
numa = false

View File

@ -17,3 +17,4 @@ implementer_id = '0x41'
part_number = '0xd08'
max_lcores = 16
max_numa_nodes = 1
numa = false

View File

@ -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]
]
}

View File

@ -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')
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

View File

@ -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