config/arm: add core and NUMA counts to cross files
authorJuraj Linkeš <juraj.linkes@pantheon.tech>
Fri, 15 Jan 2021 13:26:06 +0000 (14:26 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 18 Jan 2021 21:42:56 +0000 (22:42 +0100)
Add support for setting core count and numa nodes in cross files. The
values specified in cross files will override the default values.
Also add missing default values to Arm config.

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>
15 files changed:
config/arm/arm64_armada_linux_gcc
config/arm/arm64_armv8_linux_gcc
config/arm/arm64_bluefield_linux_gcc
config/arm/arm64_dpaa_linux_gcc
config/arm/arm64_emag_linux_gcc
config/arm/arm64_graviton2_linux_gcc
config/arm/arm64_n1sdp_linux_gcc
config/arm/arm64_n2_linux_gcc
config/arm/arm64_octeontx2_linux_gcc
config/arm/arm64_stingray_linux_gcc
config/arm/arm64_thunderx2_linux_gcc
config/arm/arm64_thunderxt88_linux_gcc
config/arm/meson.build
config/meson.build
doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst

index 143a3c9..2ecc460 100644 (file)
@@ -16,3 +16,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x56'
 part_number = '0xd08'
+max_lcores = 16
+max_numa_nodes = 1
index 0099f5c..5451a01 100644 (file)
@@ -16,3 +16,5 @@ endian = 'little'
 # Generate binaries that are portable across all Armv8 machines
 implementer_id = 'generic'
 part_number = 'generic'
+max_lcores = 256
+max_numa_nodes = 4
index b79389d..4f56790 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x41'
 part_number = '0xd08'
+max_lcores = 16
+max_numa_nodes = 1
index c3c8a1e..8641fee 100644 (file)
@@ -16,3 +16,5 @@ endian = 'little'
 [properties]
 implementer_id = 'dpaa'
 part_number = '0xd08'
+max_lcores = 16
+max_numa_nodes = 1
index c675954..7cbb055 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x50'
 part_number = '0x0'
+max_lcores = 32
+max_numa_nodes = 1
index 022e063..d0bfec8 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementor_id = '0x41'
 implementor_pn = '0xd0c'
+max_lcores = 64
+max_numa_nodes = 1
index 6fb3f02..138ae08 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x41'
 part_number = '0xd0c'
+max_lcores = 4
+max_numa_nodes = 1
index 3de5a6e..d249ccf 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x41'
 part_number = '0xd49'
+max_lcores = 64
+max_numa_nodes = 1
index ac10428..26cf471 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x43'
 part_number = '0xb2'
+max_lcores = 36
+max_numa_nodes = 1
index b79389d..4f56790 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x41'
 part_number = '0xd08'
+max_lcores = 16
+max_numa_nodes = 1
index dd25774..c06dcdc 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x43'
 part_number = '0xaf'
+max_lcores = 256
+max_numa_nodes = 2
index 7589662..3ba1528 100644 (file)
@@ -15,3 +15,5 @@ endian = 'little'
 [properties]
 implementer_id = '0x43'
 part_number = '0xa1'
+max_lcores = 96
+max_numa_nodes = 1
index 9c33490..d397471 100644 (file)
@@ -36,7 +36,8 @@ implementer_generic = {
        'flags': [
                ['RTE_MACHINE', '"armv8a"'],
                ['RTE_USE_C11_MEM_MODEL', true],
-               ['RTE_MAX_LCORE', 256]
+               ['RTE_MAX_LCORE', 256],
+               ['RTE_MAX_NUMA_NODES', 4]
        ],
        'part_number_config': {
                'generic': {'machine_args': ['-march=armv8-a+crc',
@@ -61,8 +62,7 @@ part_number_config_arm = {
                        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
                        ['RTE_LIBRTE_VHOST_NUMA', false],
                        ['RTE_MAX_MEM_MB', 1048576],
-                       ['RTE_MAX_LCORE', 80],
-                       ['RTE_MAX_NUMA_NODES', 1]
+                       ['RTE_MAX_LCORE', 80]
                ]
        },
        '0xd49': {
@@ -82,7 +82,8 @@ implementer_arm = {
                ['RTE_MACHINE', '"armv8a"'],
                ['RTE_USE_C11_MEM_MODEL', true],
                ['RTE_CACHE_LINE_SIZE', 64],
-               ['RTE_MAX_LCORE', 16]
+               ['RTE_MAX_LCORE', 16],
+               ['RTE_MAX_NUMA_NODES', 1]
        ],
        'part_number_config': part_number_config_arm
 }
@@ -119,8 +120,7 @@ implementer_cavium = {
                                ['RTE_ARM_FEATURE_ATOMICS', true],
                                ['RTE_USE_C11_MEM_MODEL', true],
                                ['RTE_CACHE_LINE_SIZE', 64],
-                               ['RTE_MAX_LCORE', 256],
-                               ['RTE_MAX_NUMA_NODES', 2]
+                               ['RTE_MAX_LCORE', 256]
                        ]
                },
                '0xb2': {
index a3154e2..19c7430 100644 (file)
@@ -253,6 +253,21 @@ compile_time_cpuflags = []
 subdir(arch_subdir)
 dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
 
+# apply cross-specific options
+if meson.is_cross_build()
+       # configure RTE_MAX_LCORE and RTE_MAX_NUMA_NODES from cross file
+       cross_max_lcores = meson.get_cross_property('max_lcores', 0)
+       if cross_max_lcores != 0
+               message('Setting RTE_MAX_LCORE from cross file')
+               dpdk_conf.set('RTE_MAX_LCORE', cross_max_lcores)
+       endif
+       cross_max_numa_nodes = meson.get_cross_property('max_numa_nodes', 0)
+       if cross_max_numa_nodes != 0
+               message('Setting RTE_MAX_NUMA_NODES from cross file')
+               dpdk_conf.set('RTE_MAX_NUMA_NODES', cross_max_numa_nodes)
+       endif
+endif
+
 # set the install path for the drivers
 dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)
 
index 6a883b0..4e65b27 100644 (file)
@@ -134,3 +134,12 @@ you may use various combinations of implementer/part number::
 
    Supported part_numbers for 0x50:
       '0x0':     emag
+
+Other cross file options
+------------------------
+
+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