[v4,4/6] build: add core and NUMA counts to cross files
diff mbox series

Message ID 1603464488-25493-5-git-send-email-juraj.linkes@pantheon.tech
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • Arm build options rework
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš Oct. 23, 2020, 2:48 p.m. UTC
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.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm64_armada_linux_gcc    |  2 ++
 config/arm/arm64_armv8_linux_gcc     |  6 ++++++
 config/arm/arm64_bluefield_linux_gcc |  2 ++
 config/arm/arm64_dpaa_linux_gcc      |  2 ++
 config/arm/arm64_emag_linux_gcc      |  2 ++
 config/arm/arm64_n1sdp_linux_gcc     |  2 ++
 config/arm/arm64_octeontx2_linux_gcc |  2 ++
 config/arm/arm64_stingray_linux_gcc  |  2 ++
 config/arm/arm64_thunderx2_linux_gcc |  2 ++
 config/arm/arm64_thunderx_linux_gcc  |  2 ++
 config/arm/meson.build               | 20 ++++++++++++++++++++
 11 files changed, 44 insertions(+)

Patch
diff mbox series

diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc
index 52c5f4476..36100c594 100644
--- a/config/arm/arm64_armada_linux_gcc
+++ b/config/arm/arm64_armada_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 
 [properties]
 implementer_id = '0x56'
+max_numa_nodes = 1
+max_lcores = 16
diff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc
index 13ee8b223..779333199 100644
--- a/config/arm/arm64_armv8_linux_gcc
+++ b/config/arm/arm64_armv8_linux_gcc
@@ -26,3 +26,9 @@  implementer_id = 'generic'
 # '0xd0a':   cortex-a75
 # '0xd0b':   cortex-a76
 part_number = 'generic'
+
+# Supported extra configuration
+# max_numa_nodes = n  # will set RTE_MAX_NUMA_NODES
+# max_lcores = n      # will set RTE_MAX_LCORE
+max_lcores = 256
+max_numa_nodes = 4
diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc
index b79389d85..7ff6fd309 100644
--- a/config/arm/arm64_bluefield_linux_gcc
+++ b/config/arm/arm64_bluefield_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementer_id = '0x41'
 part_number = '0xd08'
+max_numa_nodes = 1
+max_lcores = 16
diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc
index 573ae7e42..adae86f57 100644
--- a/config/arm/arm64_dpaa_linux_gcc
+++ b/config/arm/arm64_dpaa_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 
 [properties]
 implementer_id = 'dpaa'
+max_numa_nodes = 1
+max_lcores = 16
diff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc
index 24f3d533e..3cccca901 100644
--- a/config/arm/arm64_emag_linux_gcc
+++ b/config/arm/arm64_emag_linux_gcc
@@ -14,3 +14,5 @@  endian = 'little'
 
 [properties]
 implementer_id = '0x50'
+max_numa_nodes = 1
+max_lcores = 32
diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc
index 6fb3f02ea..3a8b46812 100644
--- a/config/arm/arm64_n1sdp_linux_gcc
+++ b/config/arm/arm64_n1sdp_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementer_id = '0x41'
 part_number = '0xd0c'
+max_numa_nodes = 1
+max_lcores = 4
diff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc
index ac1042806..2baf95a2a 100644
--- a/config/arm/arm64_octeontx2_linux_gcc
+++ b/config/arm/arm64_octeontx2_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementer_id = '0x43'
 part_number = '0xb2'
+max_numa_nodes = 1
+max_lcores = 36
diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc
index b79389d85..7ff6fd309 100644
--- a/config/arm/arm64_stingray_linux_gcc
+++ b/config/arm/arm64_stingray_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementer_id = '0x41'
 part_number = '0xd08'
+max_numa_nodes = 1
+max_lcores = 16
diff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc
index dd257745e..07440fe5f 100644
--- a/config/arm/arm64_thunderx2_linux_gcc
+++ b/config/arm/arm64_thunderx2_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementer_id = '0x43'
 part_number = '0xaf'
+max_numa_nodes = 2
+max_lcores = 256
diff --git a/config/arm/arm64_thunderx_linux_gcc b/config/arm/arm64_thunderx_linux_gcc
index 670764437..16ba78fd6 100644
--- a/config/arm/arm64_thunderx_linux_gcc
+++ b/config/arm/arm64_thunderx_linux_gcc
@@ -14,3 +14,5 @@  endian = 'little'
 
 [properties]
 implementer_id = '0x43'
+max_numa_nodes = 1
+max_lcores = 96
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 6c31ab167..b5a62f89d 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -38,12 +38,14 @@  flags_common_default = [
 flags_generic = [
 	['RTE_MACHINE', '"armv8a"'],
 	['RTE_MAX_LCORE', 256],
+	['RTE_MAX_NUMA_NODES', 4],
 	['RTE_USE_C11_MEM_MODEL', true],
 	['RTE_CACHE_LINE_SIZE', 128]
 ]
 flags_arm = [
 	['RTE_MACHINE', '"armv8a"'],
 	['RTE_MAX_LCORE', 16],
+	['RTE_MAX_NUMA_NODES', 1],
 	['RTE_USE_C11_MEM_MODEL', true],
 	['RTE_CACHE_LINE_SIZE', 64]
 ]
@@ -214,6 +216,24 @@  else
 		dpdk_flags += part_number_config[1]
 	endif
 
+	# apply cross-specific options
+	if meson.is_cross_build()
+		# configure RTE_MAX_NUMA_NODES and RTE_MAX_LCORE from cross file
+		cross_max_numa_nodes = meson.get_cross_property('max_numa_nodes', 0)
+		if cross_max_numa_nodes != 0
+			dpdk_flags += [
+				['RTE_MAX_NUMA_NODES', cross_max_numa_nodes]
+			]
+		endif
+		cross_max_lcores = meson.get_cross_property('max_lcores', 0)
+		if cross_max_lcores != 0
+			message('Setting RTE_MAX_LCORE from cross file')
+			dpdk_flags += [
+				['RTE_MAX_LCORE', cross_max_lcores]
+			]
+		endif
+	endif
+
 	machine_args = [] # Clear previous machine args
 	foreach flag: part_number_config[0]
 		if cc.has_argument(flag)