diff mbox series

[v9,10/14] build: add core and NUMA counts to cross files

Message ID 1605100718-7991-11-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series Arm build options rework | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš Nov. 11, 2020, 1:18 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 to Arm config.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm64_armada_linux_gcc                 |  2 ++
 config/arm/arm64_armv8_linux_gcc                  |  2 ++
 config/arm/arm64_bluefield_linux_gcc              |  2 ++
 config/arm/arm64_dpaa_linux_gcc                   |  2 ++
 config/arm/arm64_emag_linux_gcc                   |  2 ++
 config/arm/arm64_graviton2_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_thunderxt88_linux_gcc            |  2 ++
 config/arm/meson.build                            |  6 ++++--
 config/meson.build                                | 15 +++++++++++++++
 .../linux_gsg/cross_build_dpdk_for_arm64.rst      |  9 +++++++++
 14 files changed, 50 insertions(+), 2 deletions(-)

Comments

Honnappa Nagarahalli Nov. 13, 2020, 5:53 a.m. UTC | #1
<snip>

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

> ---
>  config/arm/arm64_armada_linux_gcc                 |  2 ++
>  config/arm/arm64_armv8_linux_gcc                  |  2 ++
>  config/arm/arm64_bluefield_linux_gcc              |  2 ++
>  config/arm/arm64_dpaa_linux_gcc                   |  2 ++
>  config/arm/arm64_emag_linux_gcc                   |  2 ++
>  config/arm/arm64_graviton2_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_thunderxt88_linux_gcc            |  2 ++
>  config/arm/meson.build                            |  6 ++++--
>  config/meson.build                                | 15 +++++++++++++++
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst      |  9 +++++++++
>  14 files changed, 50 insertions(+), 2 deletions(-)
> 
> diff --git a/config/arm/arm64_armada_linux_gcc
> b/config/arm/arm64_armada_linux_gcc
> index 52c5f4476..73945fbb4 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_lcores = 16
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_armv8_linux_gcc
> b/config/arm/arm64_armv8_linux_gcc
> index 0099f5ca2..5451a01da 100644
> --- a/config/arm/arm64_armv8_linux_gcc
> +++ b/config/arm/arm64_armv8_linux_gcc
> @@ -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
> diff --git a/config/arm/arm64_bluefield_linux_gcc
> b/config/arm/arm64_bluefield_linux_gcc
> index b79389d85..4f56790c5 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_lcores = 16
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_dpaa_linux_gcc
> b/config/arm/arm64_dpaa_linux_gcc index 573ae7e42..00101962b 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_lcores = 16
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_emag_linux_gcc
> b/config/arm/arm64_emag_linux_gcc index c675954fc..7cbb05510 100644
> --- a/config/arm/arm64_emag_linux_gcc
> +++ b/config/arm/arm64_emag_linux_gcc
> @@ -15,3 +15,5 @@ endian = 'little'
>  [properties]
>  implementer_id = '0x50'
>  part_number = '0x0'
> +max_lcores = 32
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_graviton2_linux_gcc
> b/config/arm/arm64_graviton2_linux_gcc
> index 022e06303..d0bfec87d 100644
> --- a/config/arm/arm64_graviton2_linux_gcc
> +++ b/config/arm/arm64_graviton2_linux_gcc
> @@ -15,3 +15,5 @@ endian = 'little'
>  [properties]
>  implementor_id = '0x41'
>  implementor_pn = '0xd0c'
> +max_lcores = 64
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_n1sdp_linux_gcc
> b/config/arm/arm64_n1sdp_linux_gcc
> index 6fb3f02ea..138ae08c3 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_lcores = 4
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_octeontx2_linux_gcc
> b/config/arm/arm64_octeontx2_linux_gcc
> index ac1042806..26cf471ad 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_lcores = 36
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_stingray_linux_gcc
> b/config/arm/arm64_stingray_linux_gcc
> index b79389d85..4f56790c5 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_lcores = 16
> +max_numa_nodes = 1
> diff --git a/config/arm/arm64_thunderx2_linux_gcc
> b/config/arm/arm64_thunderx2_linux_gcc
> index dd257745e..c06dcdc2b 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_lcores = 256
> +max_numa_nodes = 2
> diff --git a/config/arm/arm64_thunderxt88_linux_gcc
> b/config/arm/arm64_thunderxt88_linux_gcc
> index 758966262..3ba1528e4 100644
> --- a/config/arm/arm64_thunderxt88_linux_gcc
> +++ b/config/arm/arm64_thunderxt88_linux_gcc
> @@ -15,3 +15,5 @@ endian = 'little'
>  [properties]
>  implementer_id = '0x43'
>  part_number = '0xa1'
> +max_lcores = 96
> +max_numa_nodes = 1
> diff --git a/config/arm/meson.build b/config/arm/meson.build index
> cdbdcee85..fdc402898 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -38,7 +38,8 @@ implementer_generic = {
>  		['RTE_MACHINE', '"armv8a"'],
>  		['RTE_USE_C11_MEM_MODEL', true],
>  		['RTE_CACHE_LINE_SIZE', 128],
> -		['RTE_MAX_LCORE', 256]
> +		['RTE_MAX_LCORE', 256],
> +		['RTE_MAX_NUMA_NODES', 4]
>  	],
>  	'part_number_config': {
>  		'generic': {'machine_args': ['-march=armv8-a+crc', @@ -76,7
> +77,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  } diff --git
> a/config/meson.build b/config/meson.build index ce0abe49b..208d1ea01
> 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -249,6 +249,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
> +
>  max_lcores = get_option('max_lcores')
>  if max_lcores > 0
>  	# Overwrite the default value from arch_subdir with user input 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 6a883b030..4e65b271c 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -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
> --
> 2.20.1
diff mbox series

Patch

diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc
index 52c5f4476..73945fbb4 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_lcores = 16
+max_numa_nodes = 1
diff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc
index 0099f5ca2..5451a01da 100644
--- a/config/arm/arm64_armv8_linux_gcc
+++ b/config/arm/arm64_armv8_linux_gcc
@@ -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
diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc
index b79389d85..4f56790c5 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_lcores = 16
+max_numa_nodes = 1
diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc
index 573ae7e42..00101962b 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_lcores = 16
+max_numa_nodes = 1
diff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc
index c675954fc..7cbb05510 100644
--- a/config/arm/arm64_emag_linux_gcc
+++ b/config/arm/arm64_emag_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementer_id = '0x50'
 part_number = '0x0'
+max_lcores = 32
+max_numa_nodes = 1
diff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc
index 022e06303..d0bfec87d 100644
--- a/config/arm/arm64_graviton2_linux_gcc
+++ b/config/arm/arm64_graviton2_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementor_id = '0x41'
 implementor_pn = '0xd0c'
+max_lcores = 64
+max_numa_nodes = 1
diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc
index 6fb3f02ea..138ae08c3 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_lcores = 4
+max_numa_nodes = 1
diff --git a/config/arm/arm64_octeontx2_linux_gcc b/config/arm/arm64_octeontx2_linux_gcc
index ac1042806..26cf471ad 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_lcores = 36
+max_numa_nodes = 1
diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc
index b79389d85..4f56790c5 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_lcores = 16
+max_numa_nodes = 1
diff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc
index dd257745e..c06dcdc2b 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_lcores = 256
+max_numa_nodes = 2
diff --git a/config/arm/arm64_thunderxt88_linux_gcc b/config/arm/arm64_thunderxt88_linux_gcc
index 758966262..3ba1528e4 100644
--- a/config/arm/arm64_thunderxt88_linux_gcc
+++ b/config/arm/arm64_thunderxt88_linux_gcc
@@ -15,3 +15,5 @@  endian = 'little'
 [properties]
 implementer_id = '0x43'
 part_number = '0xa1'
+max_lcores = 96
+max_numa_nodes = 1
diff --git a/config/arm/meson.build b/config/arm/meson.build
index cdbdcee85..fdc402898 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -38,7 +38,8 @@  implementer_generic = {
 		['RTE_MACHINE', '"armv8a"'],
 		['RTE_USE_C11_MEM_MODEL', true],
 		['RTE_CACHE_LINE_SIZE', 128],
-		['RTE_MAX_LCORE', 256]
+		['RTE_MAX_LCORE', 256],
+		['RTE_MAX_NUMA_NODES', 4]
 	],
 	'part_number_config': {
 		'generic': {'machine_args': ['-march=armv8-a+crc',
@@ -76,7 +77,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
 }
diff --git a/config/meson.build b/config/meson.build
index ce0abe49b..208d1ea01 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -249,6 +249,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
+
 max_lcores = get_option('max_lcores')
 if max_lcores > 0
 	# Overwrite the default value from arch_subdir with user input
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 6a883b030..4e65b271c 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -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