mk: introduce helper to check valid compiler argument
PATCH 1/3 mk: introduce helper to check valid compiler argument
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
--- mk/rte.helper.mk | 12 ++++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -Werror $(1) -c -x c /dev/null -o tmp$$ 2> /dev/null && rm -f tmp$$ && echo $(1) | xargs echo -n) +endef + +
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.20.1
PATCH 2/3 config: add thunderx2 machine config
Optimized configuration for Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.20.1
Re: [PATCH 2/3] config: add thunderx2 machine config
Hi Jerin,
06/01/2019 14:20, Jerin Jacob Kollanukkaran:
Quoted 10 lines
Optimized configuration for Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>--- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++
You should enable meson build at the same time.
Re: [EXT] Re: [PATCH 2/3] config: add thunderx2 machine config
Quoted 1 line · Thomas Monjalon
Hi Jerin,
Hi Thomas,
Quoted 7 lines
06/01/2019 14:20, Jerin Jacob Kollanukkaran:
Quoted 6 lines
Optimized configuration for Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Quoted 7 lines
Quoted 5 lines
Signed-off-by Jerin Jacob <[email protected]>--- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34+++++++++++++++++++
You should enable meson build at the same time.
OK. Will send the v2.
Quoted 3 lines
Re: [PATCH 2/3] config: add thunderx2 machine config
In reply to Jerin Jacob KollanukkaranQuoted 30 lines
-----Original Message-----
From: Jerin Jacob Kollanukkaran <[email protected]>
Sent: Sunday, January 6, 2019 9:20 PM
To: [email protected]
Cc: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH 2/3] config: add thunderx2 machine configOptimized configuration for Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>--- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mkconfig/defconfig_arm64-thunderx2-linuxapp-gcc new file +0
-0
config/defconfig_arm64-thunderx2-linuxapp-gcc line 9
Quoted 9 lines
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +9
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64
ThunderX is 128, ThunderX2 downsized the cache line?
Quoted 46 lines
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +2
-0+CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256mk/machine/thunderx2/rte.vars.mk new file +33
-0@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto)
+MACHINE_CFLAGS += $(callrte_cc_has_argument, -mcpu=thunderx2t99) --
2.20.1
Re: [EXT] RE: [PATCH 2/3] config: add thunderx2 machine config
Quoted 35 lines · Gavin Hu (Arm Technology China)
Quoted 35 lines
-----Original Message-----
From: Jerin Jacob Kollanukkaran <[email protected]>
Sent: Sunday, January 6, 2019 9:20 PM
To: [email protected]
Cc: [email protected]; Gavin Hu (Arm Technology China) <[email protected]Quoted 1 line
;
[email protected]
Subject: [dpdk-dev] [PATCH 2/3] config: add thunderx2 machine configOptimized configuration for Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>--- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mkconfig/defconfig_arm64-thunderx2-linuxapp-gcc new file +3
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +#
Quoted 8 lines
config/defconfig_arm64-thunderx2-linuxapp-gcc line 9
Quoted 6 lines
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +6
-0+ +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64ThunderX is 128, ThunderX2 downsized the cache line?
Yes. Tunned for server work load.
PATCH 3/3 config: add octeontx2 machine config
In reply to Jerin Jacob KollanukkaranOptimized configuration for Marvell octeontx2 SoC.
--- config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.20.1
PATCH v2 1/6 mk: introduce helper to check valid compiler argument
In reply to Jerin Jacob KollanukkaranFrom: Jerin Jacob Kollanukkaran <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
--- mk/rte.helper.mk | 12 ++++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -Werror $(1) -c -x c /dev/null -o tmp$$ 2> /dev/null && rm -f tmp$$ && echo $(1) | xargs echo -n) +endef + +
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.20.1
PATCH v2 2/6 config: add thunderx2 machine config
From: Jerin Jacob Kollanukkaran <[email protected]>
Optimized configuration for Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.20.1
PATCH v2 3/6 config: add octeontx2 machine config
In reply to Pavan Nikhilesh BhagavatulaFrom: Jerin Jacob Kollanukkaran <[email protected]>
Optimized configuration for Marvell octeontx2 SoC.
--- config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.20.1
PATCH v2 4/6 meson: add infra to support machine specific flags
In reply to Pavan Nikhilesh BhagavatulaFrom: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE.
Add support to set micro arch specific flags.
--- config/arm/meson.build | 53 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 21 deletions(-)
config/arm/meson.build +32 -21
@@ -7,23 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file
@@ -50,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -69,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -157,10 +159,19 @@ else foreach marg: machine[2] if marg[0] == impl_pn foreach f: marg[1] - machine_args += f + if cc.has_argument(f) + machine_args += f + endif endforeach endif endforeach + + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif + endforeach endif message(machine_args)
Signature · 1 line
2.20.1
PATCH v2 5/6 meson: add thunderx2 machine config
In reply to Pavan Nikhilesh BhagavatulaFrom: Pavan Nikhilesh <[email protected]>
Meson configuration for Marvell thunderx2 SoC.
--- config/arm/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
config/arm/meson.build +8 -1
@@ -54,6 +54,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -70,7 +76,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
Signature · 1 line
2.20.1
Re: [PATCH v2 5/6] meson: add thunderx2 machine config
07/01/2019 16:42, Pavan Nikhilesh Bhagavatula:
Quoted 8 lines
From: Pavan Nikhilesh <[email protected]>
Meson configuration for Marvell thunderx2 SoC.
Signed-off-by Pavan Nikhilesh <[email protected]>--- config/arm/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
I think it can be merged with the patch doing the same for make.
PATCH v2 6/6 meson: add octeontx2 machine config
In reply to Pavan Nikhilesh BhagavatulaFrom: Pavan Nikhilesh <[email protected]>
Meson configuration for Marvell octeontx2 SoC.
--- config/arm/meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
config/arm/meson.build +9 -1
@@ -60,6 +60,13 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false], + ['RTE_LIBRTE_VHOST_NUMA', false], + ['RTE_EAL_IGB_UIO', false]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -77,7 +84,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
Signature · 1 line
2.20.1
PATCH v3 1/4 mk: introduce helper to check valid compiler argument
In reply to Jerin Jacob KollanukkaranFrom: Jerin Jacob <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
--- mk/rte.helper.mk | 12 ++++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -Werror $(1) -c -x c /dev/null -o tmp$$ 2> /dev/null && rm -f tmp$$ && echo $(1) | xargs echo -n) +endef + +
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.20.1
PATCH v3 2/4 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE.
Add support to set micro arch specific flags.
---
v2 Changes:
- Add meson build support.
config/arm/meson.build | 53 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 21 deletions(-)
config/arm/meson.build +32 -21
@@ -7,23 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file
@@ -50,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -69,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -157,10 +159,19 @@ else foreach marg: machine[2] if marg[0] == impl_pn foreach f: marg[1] - machine_args += f + if cc.has_argument(f) + machine_args += f + endif endforeach endif endforeach + + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif + endforeach endif message(machine_args)
--
2.20.1
PATCH v3 3/4 config: add thunderx2 machine config
In reply to Pavan Nikhilesh BhagavatulaFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Update meson build to support Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
---
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/meson.build +8 -1
@@ -54,6 +54,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -70,7 +76,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
--
2.20.1
PATCH v3 4/4 config: add octeontx2 machine config
In reply to Pavan Nikhilesh BhagavatulaFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Update meson build to support Marvell octeontx2 SoC.
--- config/arm/meson.build | 10 +++++- config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/meson.build +9 -1
@@ -60,6 +60,13 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false], + ['RTE_LIBRTE_VHOST_NUMA', false], + ['RTE_EAL_IGB_UIO', false]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -77,7 +84,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.20.1
PATCH v3 5/5 meson: add cross build targets for thunderx2 and octeontx2
In reply to Pavan Nikhilesh BhagavatulaFrom: Pavan Nikhilesh <[email protected]>
Add Thunderx2 and Octeontx2 SoC cross build targets.
meson build --cross-file config/arm/arm64_<cpu>_<platform>_<compiler>
--- config/arm/arm64_octeontx2_linuxapp_gcc | 14 ++++++++++++++ config/arm/arm64_thunderx2_linuxapp_gcc | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 config/arm/arm64_octeontx2_linuxapp_gcc create mode 100644 config/arm/arm64_thunderx2_linuxapp_gcc
config/arm/arm64_octeontx2_linuxapp_gcc new file +14 -0
@@ -0,0 +1,14 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0xb2'
config/arm/arm64_thunderx2_linuxapp_gcc new file +14 -0
@@ -0,0 +1,14 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0xaf'
--
2.20.1
PATCH v4 1/5 mk: introduce helper to check valid compiler argument
In reply to Jerin Jacob KollanukkaranFrom: Jerin Jacob <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
---
v2 Changes:
- Add meson build support.
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
v4 Changes:
- Fix incorrect signoff marrvell -> marvell.
mk/rte.helper.mk | 12 ++++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -Werror $(1) -c -x c /dev/null -o tmp$$ 2> /dev/null && rm -f tmp$$ && echo $(1) | xargs echo -n) +endef + +
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
--
2.20.1
PATCH v4 2/5 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE.
Add support to set micro arch specific flags.
--- config/arm/meson.build | 53 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 21 deletions(-)
config/arm/meson.build +32 -21
@@ -7,23 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file
@@ -50,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -69,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -157,10 +159,19 @@ else foreach marg: machine[2] if marg[0] == impl_pn foreach f: marg[1] - machine_args += f + if cc.has_argument(f) + machine_args += f + endif endforeach endif endforeach + + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif + endforeach endif message(machine_args)
Signature · 1 line
2.20.1
Re: [PATCH v4 2/5] meson: add infra to support machine specific flags
09/01/2019 11:39, Pavan Nikhilesh Bhagavatula:
Quoted 18 lines
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE.
Add support to set micro arch specific flags.Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>---
flags_cavium= [config/arm/meson.build +1
-3- ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
[...]
Quoted 3 lines
config/arm/meson.build +3
-0+flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]]
[..]
config/arm/meson.build flags_dpaa2 = [ · line 73
Quoted 6 lines
config/arm/meson.build +6
-0+machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]
This patch is not only adding infra, it also change some Cavium config. What about splitting, and explaining the change of RTE_USE_C11_MEM_MODEL?
Re: [PATCH v4 2/5] meson: add infra to support machine specific flags
In reply to Pavan Nikhilesh BhagavatulaHi Pavan,
Quoted 100 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Pavan Nikhilesh Bhagavatula
Sent: Wednesday, January 9, 2019 6:40 PM
To: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; Pavan Nikhilesh Bhagavatula <[email protected]>
Subject: [dpdk-dev] [PATCH v4 2/5] meson: add infra to support machine specific flagsFrom: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>--- config/arm/meson.build | 53 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 21 deletions(-)config/arm/meson.build index renamed from config/arm/meson.build +0
-0
dae55d6b2..576363fc0100644config/arm/meson.build +0
-17@@ -7,23 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest)config/arm/meson.build +22
-3# to determine the best threshold in code. Refer to notes in source file@@ -50,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],@@ -69,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
impl_generic= ['Generic armv8',flags_generic,machine_args_generic] @@ - 157,10 +159,19 @@ elseconfig/arm/meson.build +3
-1foreach marg: machine[2] if marg[0] == impl_pn foreach f: marg[1] - machine_args += f + if cc.has_argument(f) + machine_args += f + endif
config/arm/meson.build else · line 174
Quoted 10 lines
config/arm/meson.build +7
-0endforeach endif endforeach + + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif + endforeach
I think this loop should put inside the 'if marg[0] == impl_pn' condition. The right logic should be:
If marg[0] == impl_pn
# update machine_args # Apply any extra machine specific flags endif
I tested this patch on thunderx2, but it set the octeontx2 extra flags into the rte_build_config.h. Because octeontx2 is the last item of 'machine_args_cavium' table.
Quoted 5 lines
endif
message(machine_args)--
2.20.1
Thanks,
Phil Yang.
Re: [EXT] RE: [PATCH v4 2/5] meson: add infra to support machine specific flags
Hi Phil,
Quoted 130 lines · Phil Yang (Arm Technology China)
External Email
-------------------------------------------------------------------
---
Hi Pavan,Quoted 109 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Pavan Nikhilesh Bhagavatula
Sent: Wednesday, January 9, 2019 6:40 PM
To: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; Pavan Nikhilesh Bhagavatula < [email protected]>
Subject: [dpdk-dev] [PATCH v4 2/5] meson: add infra to support machine specific
flagsFrom: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be
some micro arch specific differences from the same vendor eg.CACHE_LINESIZE.
Add support to set micro arch specific flags.Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>--- config/arm/meson.build | 53 +++++++++++++++++++++++++------------- ---- 1 file changed, 32 insertions(+), 21 deletions(-)config/arm/meson.build index renamed from config/arm/meson.build +0
-0
dae55d6b2..576363fc0100644config/arm/meson.build +0
-17@@ -7,23 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest)# to determine the best threshold in code. Refer to notes in source fileconfig/arm/meson.build +22
-3@@ -50,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],@@ -69,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7- 5321)
impl_generic= ['Generic armv8',flags_generic,machine_args_generic] @@ -
157,10 +159,19 @@ elseconfig/arm/meson.build +3
-1foreach marg: machine[2] if marg[0] == impl_pn foreach f: marg[1] - machine_args += f + if cc.has_argument(f) + machine_args += f + endifconfig/arm/meson.build else · line 174
Quoted 10 lines
config/arm/meson.build +7
-0endforeach endif endforeach + + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif + endforeachI think this loop should put inside the 'if marg[0] ==
impl_pn' condition.
The right logic should be:
If marg[0] ==impl_pn
Quoted 3 lines
# update machine_args # Apply any extra machine specific flags endif
Yes, you are correct I will modify this in the next version.
Thanks,
Pavan.
Quoted 13 lines
I tested this patch on thunderx2, but it set the octeontx2 extra flags into the
rte_build_config.h. Because octeontx2 is the last item of 'machine_args_cavium' table.Quoted 5 lines
endif
message(machine_args)--
2.20.1Thanks,
Phil Yang.
PATCH v4 3/5 config: add thunderx2 machine config
In reply to Pavan Nikhilesh BhagavatulaFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Update meson build to support Marvell thunderx2 SoC.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/meson.build +8 -1
@@ -54,6 +54,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -70,7 +76,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.20.1
PATCH v4 4/5 config: add octeontx2 machine config
In reply to Pavan Nikhilesh BhagavatulaFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Update meson build to support Marvell octeontx2 SoC.
--- config/arm/meson.build | 10 +++++- config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/meson.build +9 -1
@@ -60,6 +60,13 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false], + ['RTE_LIBRTE_VHOST_NUMA', false], + ['RTE_EAL_IGB_UIO', false]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -77,7 +84,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.20.1
Re: [PATCH v4 4/5] config: add octeontx2 machine config
Hi Jerin/Pavan,
Quoted 106 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Pavan Nikhilesh Bhagavatula
Sent: Wednesday, January 9, 2019 6:40 PM
To: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; Pavan Nikhilesh Bhagavatula <[email protected]>
Subject: [dpdk-dev] [PATCH v4 4/5] config: add octeontx2 machine configFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Update meson build to support Marvell octeontx2 SoC.
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>--- config/arm/meson.build | 10 +++++- config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mkconfig/arm/meson.build index renamed from config/arm/meson.build +0
-0
aca285b6a..8086357a1100644config/arm/meson.build +7
-0@@ -60,6 +60,13 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false], + ['RTE_LIBRTE_VHOST_NUMA', false], + ['RTE_EAL_IGB_UIO', false]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']], @@ -77,7 +84,8 @@
machine_args_cavium= [config/arm/meson.build +2
-1['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
impl_generic= ['Generic armv8',flags_generic,machine_args_generic] diff --git a/config/defconfig_arm64-octeontx2-linuxapp-gcc b/config/defconfig_arm64- octeontx2-linuxapp-gcc
new file mode 100644
index 000000000..9a99eada1config/defconfig_arm64-octeontx2-linuxapp-gcc new file +17
-0@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Marvell +International Ltd # + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=nmk/machine/octeontx2/rte.vars.mk new file +24
-0@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Marvell +International Ltd # + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS =
mk/machine/octeontx2/rte.vars.mk line 34
Quoted 10 lines
mk/machine/octeontx2/rte.vars.mk new file +10
-0+# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, +-march=armv8.2-a+crc+crypto+lse) MACHINE_CFLAGS += $(call +rte_cc_has_argument, -mcpu=octeontx2)
Why do you choose to expose armv8.2-a flag other than using armv8a combine with the extension flags here?
The value 'armv8.2-a' implies 'armv8.1-a' and enables compiler support for the ARMv8.2-A architecture extensions. And the 'lse' extension is the default feature for 'armv8.1-a'. So it seems there is no need to specify 'armv8.2-a' with 'lse'.
According to the meson build code, the default -march config for Cavium is 'armv8-a'. So I think it seems better to keep 'armv8-a' here and add flags for the specific extensions. The same for thunderx2 configuration.
Quoted 2 lines
--
2.20.1
Thanks,
Phil Yang
PATCH v4 5/5 meson: add cross build targets for thunderx2 and octeontx2
In reply to Pavan Nikhilesh BhagavatulaFrom: Pavan Nikhilesh <[email protected]>
Add Thunderx2 and Octeontx2 SoC cross build targets.
meson build --cross-file config/arm/arm64_<cpu>_<platform>_<compiler>
--- config/arm/arm64_octeontx2_linuxapp_gcc | 14 ++++++++++++++ config/arm/arm64_thunderx2_linuxapp_gcc | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 config/arm/arm64_octeontx2_linuxapp_gcc create mode 100644 config/arm/arm64_thunderx2_linuxapp_gcc
config/arm/arm64_octeontx2_linuxapp_gcc new file +14 -0
@@ -0,0 +1,14 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0xb2'
config/arm/arm64_thunderx2_linuxapp_gcc new file +14 -0
@@ -0,0 +1,14 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0xaf'
Signature · 1 line
2.20.1
Re: [PATCH v4 5/5] meson: add cross build targets for thunderx2 and octeontx2
09/01/2019 11:39, Pavan Nikhilesh Bhagavatula:
Quoted 10 lines
From: Pavan Nikhilesh <[email protected]>
Add Thunderx2 and Octeontx2 SoC cross build targets.
meson build --cross-file config/arm/arm64_<cpu>_<platform>_<compiler>Signed-off-by Pavan Nikhilesh <[email protected]>--- config/arm/arm64_octeontx2_linuxapp_gcc | 14 ++++++++++++++ config/arm/arm64_thunderx2_linuxapp_gcc | 14 ++++++++++++++ 2 files changed, 28 insertions(+)
Don't you think it could be merged in patches 3 & 4 for more clarity?
09/01/2019 11:39, Pavan Nikhilesh Bhagavatula:
Quoted 26 lines
From: Jerin Jacob <[email protected]>
Introduce
rte_cc_has_argument()Makefilehelper to check a given argument is support by the compiler.Example Usage:
include $(RTE_SDK)/mk/rte.helper.mk
MACHINE_CFLAGS+= $(callrte_cc_has_argument, -mcpu=octeontx2)This would allow adding -mcpu=octeontx2 in
MACHINE_CFLAGSif it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>---
mk/rte.helper.mk line 10
Quoted 10 lines
mk/rte.helper.mk new file +10
-0@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -Werror $(1) -c -x c /dev/null -o tmp$$ 2> /dev/null && rm -f tmp$$ && echo $(1) | xargs echo -n) +endef
What is tmp$$ ?
If the command is interrupted in the middle, temp file is not cleaned. We could fix it with "trap".
Is it possible to just avoid creating a temporary file?
Quoted 36 lines · Thomas Monjalon
-------------------------------------------------------------------
---
09/01/2019 11:39, Pavan Nikhilesh Bhagavatula:Quoted 33 lines
From: Jerin Jacob <[email protected]>
Introduce
rte_cc_has_argument()Makefilehelper to check a given argument is support by the compiler.Example Usage:
include $(RTE_SDK)/mk/rte.helper.mk
MACHINE_CFLAGS+= $(callrte_cc_has_argument, -mcpu=octeontx2)This would allow adding -mcpu=octeontx2 in
MACHINE_CFLAGSif it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>---
mk/rte.helper.mk new file +5
-0@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f)
+# Return the argument if the argument is supported by the
Quoted 8 lines
Quoted 6 lines
compiler.
mk/rte.helper.mk new file +3
-0+# +define rte_cc_has_argument + $(shell $(CC) -Werror $(1) -c -x c /dev/null -o tmp$$ 2>
/dev/null&& rm -f tmp$$ && echo $(1) | xargs echo -n) +endefWhat is tmp$$ ?
It is created per process with pid value.
Quoted 3 lines
If the command is interrupted in the middle, temp file is not cleaned.
Yes. I think we can move to RTE_OUTPUT. Even it is not cleaned then it is file, I think, that would be easiest solution.
Quoted 1 line
We could fix it with "trap".
Can we do it in Makefile?
Quoted 1 line
Is it possible to just avoid creating a temporary file?
I tried it but gcc creates one.
Quoted 3 lines
14/01/2019 12:56, Jerin Jacob Kollanukkaran:
Quoted 46 lines · Thomas Monjalon
Quoted 36 lines
-------------------------------------------------------------------
---
09/01/2019 11:39, Pavan Nikhilesh Bhagavatula:Quoted 33 lines
From: Jerin Jacob <[email protected]>
Introduce
rte_cc_has_argument()Makefilehelper to check a given argument is support by the compiler.Example Usage:
include $(RTE_SDK)/mk/rte.helper.mk
MACHINE_CFLAGS+= $(callrte_cc_has_argument, -mcpu=octeontx2)This would allow adding -mcpu=octeontx2 in
MACHINE_CFLAGSif it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>---
mk/rte.helper.mk new file +5
-0@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f)
+# Return the argument if the argument is supported by theQuoted 8 lines
Quoted 6 lines
compiler.
mk/rte.helper.mk new file +3
-0+# +define rte_cc_has_argument + $(shell $(CC) -Werror $(1) -c -x c /dev/null -o tmp$$ 2>
/dev/null&& rm -f tmp$$ && echo $(1) | xargs echo -n) +endefWhat is tmp$$ ?
Quoted 1 line
It is created per process with pid value.
I see. The file is in current directory with name tmp + PID.
Quoted 9 lines
Quoted 2 lines
If the command is interrupted in the middle, temp file is not cleaned.
Yes. I think we can move to
RTE_OUTPUT. Even it is not cleaned then it is file, I think, that would be easiest solution.Quoted 1 line
We could fix it with "trap".
Can we do it in
Makefile?
Yes, it is just one more command separated with ;
Quoted 3 lines
Quoted 1 line
Is it possible to just avoid creating a temporary file?
I tried it but gcc creates one.
It does not create a file in my test.
A better command is:
$(CC) -E $(1) -xc /dev/null >/dev/null
Then you can just check the return value.
If you want rte_cc_has_argument returns a string or empty as true/false, you can do this:
$(CC) -E $(1) -xc /dev/null >/dev/null && echo $(1)
PATCH v5 1/4 mk: introduce helper to check valid compiler argument
In reply to Pavan Nikhilesh BhagavatulaIntroduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
---
Change history of this series:
v2 Changes:
- Add meson build support.
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
v4 Changes:
- Fix incorrect signoff marrvell -> marvell.
v5 Changes:
- Fix incorrect meson flag parsing(Phil Yang)
- Squash meson cross build patch(5/5) into configuration update patches for thunderx2(3/5) and octeontx2(4/5)(Thomas)
- Changed octeontx2's march as armv8-a and added the extension required instead of armv8-2a(Phil Yang)
- Improved rte_cc_has_argument() implementaion by removing the temp file(Thomas)
--- mk/rte.helper.mk | 10 ++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -E $(1) -xc /dev/null 1>/dev/null 2>/dev/null && echo $(1)) +endef
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.20.1
PATCH v5 2/4 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE. Add support to set micro arch specific flags.
--- config/arm/meson.build | 54 +++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 22 deletions(-)
config/arm/meson.build +32 -22
@@ -7,23 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file
@@ -50,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -69,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -156,8 +158,16 @@ else endif foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif endforeach endif endforeach
Signature · 1 line
2.20.1
PATCH v5 3/4 config: add thunderx2 machine config
In reply to Jerin Jacob KollanukkaranOptimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/arm/arm64_thunderx2_linuxapp_gcc | 15 ++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_thunderx2_linuxapp_gcc create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/arm64_thunderx2_linuxapp_gcc new file +15 -0
@@ -0,0 +1,15 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xaf'
config/arm/meson.build +8 -1
@@ -54,6 +54,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -70,7 +76,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.20.1
PATCH v5 4/4 config: add octeontx2 machine config
In reply to Jerin Jacob KollanukkaranOptimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
--- config/arm/arm64_octeontx2_linuxapp_gcc | 15 ++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_octeontx2_linuxapp_gcc create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/arm64_octeontx2_linuxapp_gcc new file +15 -0
@@ -0,0 +1,15 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xb2'
config/arm/meson.build +8 -1
@@ -60,6 +60,12 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_IGB_UIO', false], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -77,7 +83,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linuxapp-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.20.1
PATCH v6 1/4 mk: introduce helper to check valid compiler argument
In reply to Jerin Jacob KollanukkaranFrom: Jerin Jacob <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
---
Change history of this series:
v2 Changes:
- Add meson build support.
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
v4 Changes:
- Fix incorrect signoff marrvell -> marvell.
v5 Changes:
- Fix incorrect meson flag parsing(Phil Yang)
- Squash meson cross build patch(5/5) into configuration update patches for thunderx2(3/5) and octeontx2(4/5)(Thomas)
- Changed octeontx2's march as armv8-a and added the extension required instead of armv8-2a(Phil Yang)
- Improved rte_cc_has_argument() implementaion by removing the temp file(Thomas)
v6 Changes:
- Rework to change the config files to sync with "mk: use linux and freebsd in config names"
- Fix the following error with latest gcc by fixing the mcpu type
cc1: error: switch -mcpu=armv8.2-a conflicts with -march=armv8-a switch
--- mk/rte.helper.mk | 10 ++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -E $(1) -xc /dev/null 1>/dev/null 2>/dev/null && echo $(1)) +endef
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.21.0
PATCH v6 2/4 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE. Add support to set micro arch specific flags.
--- config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-)
config/arm/meson.build +32 -5
@@ -52,12 +52,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -71,6 +69,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -157,8 +176,16 @@ else endif foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif endforeach endif endforeach
Signature · 1 line
2.21.0
Re: [PATCH v6 2/4] meson: add infra to support machine specific flags
Quoted 6 lines · Jerin Jacob Kollanukkaran
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.
Quoted 6 lines
Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>--- config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-)
This looks ok to me, but I think review and ack from another Arm vendor would be good to have.
/Bruce
Re: [PATCH v6 2/4] meson: add infra to support machine specific flags
19/03/2019 10:40, Bruce Richardson:
Quoted 7 lines · Jerin Jacob Kollanukkaran
Quoted 6 lines
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>--- config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-)This looks ok to me, but I think review and ack from another Arm vendor would be good to have.
Adding Cc's for more reviews
PATCH v6 3/4 config: add thunderx2 machine config
In reply to Jerin Jacob KollanukkaranFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/arm/arm64_thunderx2_linux_gcc | 15 ++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linux-gcc | 1 + config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_thunderx2_linux_gcc create mode 120000 config/defconfig_arm64-thunderx2-linux-gcc create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/arm64_thunderx2_linux_gcc new file +15 -0
@@ -0,0 +1,15 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xaf'
config/arm/meson.build +8 -1
@@ -73,6 +73,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -89,7 +95,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-thunderx2-linuxapp-gcc
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.21.0
Re: [PATCH v6 3/4] config: add thunderx2 machine config
Quoted 151 lines
-----Original Message-----
From: Jerin Jacob Kollanukkaran <[email protected]>
Sent: Tuesday, March 19, 2019 12:50 AM
To: [email protected]
Cc: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; Pavan Nikhilesh Bhagavatula <[email protected]>
Subject: [dpdk-dev] [PATCH v6 3/4] config: add thunderx2 machine configFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>--- config/arm/arm64_thunderx2_linux_gcc | 15 ++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linux-gcc | 1 + config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_thunderx2_linux_gcc create mode 120000 config/defconfig_arm64-thunderx2-linux-gcc create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mkconfig/arm/arm64_thunderx2_linux_gcc new file +15
-0@@ -0,0 +1,15 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xaf'config/arm/meson.build +8
-1@@ -73,6 +73,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ +['RTE_MACHINE', '"thunderx2"'], +['RTE_CACHE_LINE_SIZE', 64], +['RTE_MAX_NUMA_NODES', 2], +['RTE_MAX_LCORE', 256], +['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],@@ -89,7 +95,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], -['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] +['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], +['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]config/defconfig_arm64-thunderx2-linux-gcc new file +1
-0@@ -0,0 +1 @@ +defconfig_arm64-thunderx2-linuxapp-gccconfig/defconfig_arm64-thunderx2-linuxapp-gcc new file +11
-0@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256mk/machine/thunderx2/rte.vars.mk new file +33
-0@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-
Quoted 4 lines
a+crc+crypto)
+MACHINE_CFLAGS += $(callrte_cc_has_argument, -mcpu=thunderx2t99) --
2.21.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Re: [dpdk-dev] [PATCH v6 3/4] config: add thunderx2 machine config
In reply to Jerin Jacob Kollanukkaran18/03/2019 17:50, Jerin Jacob Kollanukkaran:
Quoted 6 lines
From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Quoted 6 lines
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>
I see a very strange error when compiling with meson:
In file included from /usr/include/inttypes.h:27,
from /usr/include/pcap/pcap-inttypes.h:114,
from /usr/include/pcap/pcap.h:74,
from /usr/include/pcap.h:43,
from ../drivers/net/pcap/rte_eth_pcap.c:19:/usr/include/stdint.h:109: error: "__INT64_C" redefined [-Werror]
Could we try to debug it and merge these patches in -rc2?
Re: [dpdk-dev] [PATCH v6 3/4] config: add thunderx2 machine config
Quoted 25 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, April 5, 2019 11:43 PM
To: Jerin Jacob Kollanukkaran <[email protected]>; Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v6 3/4] config: add thunderx2 machine config18/03/2019 17:50, Jerin Jacob Kollanukkaran:
Quoted 6 lines
From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Quoted 6 lines
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>I see a very strange error when compiling with meson:
Quoted 8 lines
In file included from
/usr/include/inttypes.h:27,from /usr/include/pcap/pcap-inttypes.h:114, from /usr/include/pcap/pcap.h:74, from /usr/include/pcap.h:43, from ../drivers/net/pcap/rte_eth_pcap.c:19:
/usr/include/stdint.h:109: error: "__INT64_C" redefined [-Werror]Could we try to debug it and merge these patches in -rc2?
Could you please give more details to reproduce this issue
Compiler version - gcc or clang version?
Build - Native or cross ?
Build OS ?
Meson and Ninja - Versions?
The command use to reproduce this issue as we are not able to get this Issue in our local setup?
Quoted 1 line
Re: [dpdk-dev] [PATCH v6 3/4] config: add thunderx2 machine config
05/04/2019 20:47, Jerin Jacob Kollanukkaran:
Quoted 24 lines
From: Thomas Monjalon <[email protected]>
Quoted 23 lines
18/03/2019 17:50, Jerin Jacob Kollanukkaran:
Quoted 6 lines
From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Quoted 6 lines
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>I see a very strange error when compiling with meson:
In file included from
/usr/include/inttypes.h:27,from /usr/include/pcap/pcap-inttypes.h:114, from /usr/include/pcap/pcap.h:74, from /usr/include/pcap.h:43, from ../drivers/net/pcap/rte_eth_pcap.c:19:
/usr/include/stdint.h:109: error: "__INT64_C" redefined [-Werror]
Quoted 3 lines
Quoted 1 line
Could we try to debug it and merge these patches in -rc2?
Could you please give more details to reproduce this issue
First of all, we need to understand why it is getting pcap includes from the native system while compiling for thunderx2.
Quoted 1 line
Compiler version - gcc or clang version?
aarch64-linux-gnu-gcc (GCC) 8.3.0
Quoted 1 line
Build - Native or cross ?
cross-compilation
Quoted 1 line
Build OS ?
My host is an archlinux
Quoted 1 line
Meson and Ninja - Versions?
meson 0.49.2
ninja 1.9.0
Quoted 1 line
The command use to reproduce this issue as we are not able to get this Issue in our local setup?
I just run devtools/test-meson-builds.sh
and it compiles for config/arm/arm64_thunderx_linux_gcc because I have an Arm toolchain installed.
Re: [dpdk-dev] [PATCH v6 3/4] config: add thunderx2 machine config
Quoted 18 lines · Thomas Monjalon
05/04/2019 20:47, Jerin Jacob Kollanukkaran:
Quoted 17 lines
From: Thomas Monjalon <[email protected]>
Quoted 16 lines
18/03/2019 17:50, Jerin Jacob Kollanukkaran:
Quoted 6 lines
From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Quoted 6 lines
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>I see a very strange error when compiling with meson:
cross compiling config files needs an update since "build: improve pcap dependency handling" changeset.
I will spin another version to fix this.
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
In file included from
/usr/include/inttypes.h:27,from /usr/include/pcap/pcap-inttypes.h:114, from /usr/include/pcap/pcap.h:74, from /usr/include/pcap.h:43, from ../drivers/net/pcap/rte_eth_pcap.c:19:
/usr/include/stdint.h:109: error: "__INT64_C" redefined [-Werror]Could we try to debug it and merge these patches in -rc2?
PATCH v6 4/4 config: add octeontx2 machine config
In reply to Jerin Jacob KollanukkaranFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
--- config/arm/arm64_octeontx2_linux_gcc | 15 ++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-octeontx2-linux-gcc | 1 + config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_octeontx2_linux_gcc create mode 120000 config/defconfig_arm64-octeontx2-linux-gcc create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/arm64_octeontx2_linux_gcc new file +15 -0
@@ -0,0 +1,15 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xb2'
config/arm/meson.build +8 -1
@@ -79,6 +79,12 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_IGB_UIO', false], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -96,7 +102,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-octeontx2-linuxapp-gcc
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=-mcpu=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.21.0
Re: [PATCH v6 4/4] config: add octeontx2 machine config
Quoted 153 lines
-----Original Message-----
From: Jerin Jacob Kollanukkaran <[email protected]>
Sent: Tuesday, March 19, 2019 12:50 AM
To: [email protected]
Cc: [email protected]; Gavin Hu (Arm Technology China) <[email protected]>; [email protected]; Pavan Nikhilesh Bhagavatula <[email protected]>
Subject: [dpdk-dev] [PATCH v6 4/4] config: add octeontx2 machine configFrom: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>--- config/arm/arm64_octeontx2_linux_gcc | 15 ++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-octeontx2-linux-gcc | 1 + config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_octeontx2_linux_gcc create mode 120000 config/defconfig_arm64-octeontx2-linux-gcc create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mkconfig/arm/arm64_octeontx2_linux_gcc new file +15
-0@@ -0,0 +1,15 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xb2'config/arm/meson.build +8
-1@@ -79,6 +79,12 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ +['RTE_MACHINE', '"octeontx2"'], +['RTE_MAX_NUMA_NODES', 1], +['RTE_MAX_LCORE', 24], +['RTE_EAL_IGB_UIO', false], +['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],@@ -96,7 +102,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], -['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] +['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], +['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]config/defconfig_arm64-octeontx2-linux-gcc new file +1
-0@@ -0,0 +1 @@ +defconfig_arm64-octeontx2-linuxapp-gccconfig/defconfig_arm64-octeontx2-linuxapp-gcc new file +18
-0@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=nmk/machine/octeontx2/rte.vars.mk new file +33
-0@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=-
Quoted 4 lines
mcpu=armv8.2-a+crc+crypto+lse)
+MACHINE_CFLAGS += $(callrte_cc_has_argument, -mcpu=octeontx2) --
2.21.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
PATCH v7 1/4 mk: introduce helper to check valid compiler argument
In reply to Jerin Jacob KollanukkaranFrom: Jerin Jacob <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
---
Change history of this series:
v7 Changes:
- Updated cross compile config files align with
"build: improve pcap dependency handling" changeset to fix build issue with meson
- Some compiler needs the following depended patch to compile with meson
http://patches.dpdk.org/patch/52367/
v6 Changes:
- Rework to change the config files to sync with "mk: use linux and freebsd in config names"
- Fix the following error with latest gcc by fixing the mcpu type
cc1: error: switch -mcpu=armv8.2-a conflicts with -march=armv8-a switch
v5 Changes:
- Fix incorrect meson flag parsing(Phil Yang)
- Squash meson cross build patch(5/5) into configuration update patches for thunderx2(3/5) and octeontx2(4/5)(Thomas)
- Changed octeontx2's march as armv8-a and added the extension required instead of armv8-2a(Phil Yang)
- Improved rte_cc_has_argument() implementaion by removing the temp file(Thomas)
v4 Changes:
- Fix incorrect signoff marrvell -> marvell.
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
v2 Changes:
- Add meson build support.
--- mk/rte.helper.mk | 10 ++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -E $(1) -xc /dev/null 1>/dev/null 2>/dev/null && echo $(1)) +endef
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.21.0
PATCH v7 2/4 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE. Add support to set micro arch specific flags.
--- config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-)
config/arm/meson.build +32 -5
@@ -52,12 +52,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -71,6 +69,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -157,8 +176,16 @@ else endif foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif endforeach endif endforeach
Signature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags
Quoted 48 lines · On Apr 6, 2019, at 7:27 AM, [email protected] wrote:
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>---
config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++-----1 file changed, 32 insertions(+), 5 deletions(-)config/arm/meson.build +0
-0@@ -52,12 +52,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]]
flags_cavium= [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +11
-0@@ -71,6 +69,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']],
config/arm/meson.build flags_dpaa2 = [ · line 92
Quoted 10 lines
config/arm/meson.build +10
-0+ ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]
Looks like there's a mistake in rebasing it?
You should've removed machine_args_generic and machine_args_cavium in the beginning of this file.
Other than that, it looks good to me.
BTW, thanks for the patch. I raised this issue before and I was supposed to make the change but you have taken it.
Yongseok
Quoted 24 lines
config/arm/meson.build +0
-0## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
impl_generic= ['Generic armv8',flags_generic,machine_args_generic]config/arm/meson.build +10
-2@@ -157,8 +176,16 @@ else endif foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif endforeach endif endforeachSignature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags
Quoted 83 lines · Yongseok Koh
Quoted 49 lines · On Apr 6, 2019, at 7:27 AM, [email protected] wrote:
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>---
config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++-----1 file changed, 32 insertions(+), 5 deletions(-)config/arm/meson.build +0
-0@@ -52,12 +52,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]]
flags_cavium= [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +11
-0@@ -71,6 +69,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']],config/arm/meson.build flags_dpaa2 = [ · line 92
Quoted 10 lines
config/arm/meson.build +10
-0+ ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]Looks like there's a mistake in rebasing it?
You should've removedmachine_args_genericandmachine_args_caviumin the beginning of this file.Other than that, it looks good to me.
BTW, thanks for the patch. I raised this issue before and I was supposed to make the change but you have taken it.
Yongseok
Quoted 10 lines
config/arm/meson.build +0
-0## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
impl_generic= ['Generic armv8',flags_generic,machine_args_generic]config/arm/meson.build +2
-2@@ -157,8 +176,16 @@ else endif foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag)
Quoted 8 lines
config/arm/meson.build else · line 188
Quoted 8 lines
config/arm/meson.build +8
-0+ machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif
And setting the extra flags doesn't work well with gcc < 7 because of the following,
# Primary part number based mcpu flags are supported
# for gcc versions > 7
if cc.version().version_compare(
'<7.0') or cmd_output.length() == 0
if not meson.is_cross_build() and arm_force_native_march == true
impl_pn = 'native'
else
impl_pn = 'default'
endif
endif
Thanks,
Yongseok
Quoted 5 lines
Quoted 5 lines
config/arm/meson.build +0
-0endforeach endif endforeachSignature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags
Quoted 12 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Wednesday, April 10, 2019 7:45 AM
To: [email protected]; Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Thomas Monjalon <[email protected]>; dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>
Subject: [EXT] Re: [dpdk-dev] [PATCH v7 2/4] meson: add infra to support machine specific flags
Quoted 66 lines
External Email
----------------------------------------------------------------------
Quoted 62 lines · Yongseok Koh
Quoted 49 lines · On Apr 6, 2019, at 7:27 AM, [email protected] wrote:
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>---
config/arm/meson.build | 37 ++++++++++++++++++++++++++++++++-----1 file changed, 32 insertions(+), 5 deletions(-)config/arm/meson.build index renamed from config/arm/meson.build +0
-0
170a4981a..8de3f3e3a100644config/arm/meson.build +0
-0@@ -52,12 +52,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]]
flags_cavium= [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +11
-0@@ -71,6 +69,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']],config/arm/meson.build flags_dpaa2 = [ · line 92
Quoted 10 lines
config/arm/meson.build +10
-0+ ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]Looks like there's a mistake in rebasing it?
Seems so will send out v8.
Quoted 23 lines
Quoted 23 lines
You should've removed
machine_args_genericandmachine_args_caviumin the beginning of this file.Other than that, it looks good to me.
BTW, thanks for the patch. I raised this issue before and I was supposed to make the change but you have taken it.
Yongseok
Quoted 13 lines
config/arm/meson.build +0
-0## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic,
machine_args_generic] @@ -157,8 +176,16 @@ elseendif foreach marg: machine[2] if marg[0] == impl_pnconfig/arm/meson.build +5
-2- foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach
Quoted 8 lines
Quoted 5 lines
config/arm/meson.build else · line 188
Quoted 5 lines
config/arm/meson.build +5
-0+ # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endifAnd setting the extra flags doesn't work well with gcc < 7 because of the following,
Extra flags aren't set in this case as the third variable in the list is missing when 'native' or 'default' is selected generic=
['default', ['-march=armv8-a+crc+crypto']],
['native', ['-march=native']]
cavium=
['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
['native', ['-march=native']]And marg.get falls back to flags_default_extra = [].
Quoted 20 lines
# Primary part number based mcpu flags are supported
# for gcc versions > 7
if cc.version().version_compare(
'<7.0') orcmd_output.length()== 0
if notmeson.is_cross_build()andarm_force_native_march== true
impl_pn= 'native'
else
impl_pn= 'default'
endif
endifThanks,
YongseokQuoted 5 lines
Quoted 5 lines
endforeach
endif
endforeach
--
2.21.0
PATCH v7 3/4 config: add thunderx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/arm/arm64_thunderx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linux-gcc | 1 + config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_thunderx2_linux_gcc create mode 120000 config/defconfig_arm64-thunderx2-linux-gcc create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/arm64_thunderx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xaf'
config/arm/meson.build +8 -1
@@ -73,6 +73,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -89,7 +95,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-thunderx2-linuxapp-gcc
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v7 3/4] config: add thunderx2 machine config
06/04/2019 16:27, [email protected]:
config/arm/arm64_thunderx2_linux_gcc line 6
Quoted 9 lines
config/arm/arm64_thunderx2_linux_gcc new file +6
-0@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = ''
Strangely, I still see the same issue:
In file included from /usr/include/inttypes.h:27,
from /usr/include/pcap/pcap-inttypes.h:114,
from /usr/include/pcap/pcap.h:74,
from /usr/include/pcap.h:43,
from ../drivers/net/pcap/rte_eth_pcap.c:19:/usr/include/stdint.h:109: error: "__INT64_C" redefined [-Werror]
How may I help to debug it?
Re: [dpdk-dev] [PATCH v7 3/4] config: add thunderx2 machine config
08/04/2019 12:32, Thomas Monjalon:
Quoted 13 lines
06/04/2019 16:27, [email protected]:
config/arm/arm64_thunderx2_linux_gcc line 6
Quoted 9 lines
config/arm/arm64_thunderx2_linux_gcc new file +6
-0@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = ''Strangely, I still see the same issue:
Quoted 8 lines
In file included from
/usr/include/inttypes.h:27,from /usr/include/pcap/pcap-inttypes.h:114, from /usr/include/pcap/pcap.h:74, from /usr/include/pcap.h:43, from ../drivers/net/pcap/rte_eth_pcap.c:19:
/usr/include/stdint.h:109: error: "__INT64_C" redefined [-Werror]How may I help to debug it?
Thanks Bruce for telling me to remove the build directory. Now it works!
Re: [dpdk-dev] [PATCH v7 3/4] config: add thunderx2 machine config
Quoted 21 lines · Thomas Monjalon
08/04/2019 12:32, Thomas Monjalon:
Quoted 20 lines
06/04/2019 16:27, [email protected]:
config/arm/arm64_thunderx2_linux_gcc line 6
Quoted 9 lines
config/arm/arm64_thunderx2_linux_gcc new file +6
-0@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = ''Strangely, I still see the same issue:
In file included from
/usr/include/inttypes.h:27,from /usr/include/pcap/pcap-inttypes.h:114, from /usr/include/pcap/pcap.h:74, from /usr/include/pcap.h:43, from ../drivers/net/pcap/rte_eth_pcap.c:19:
/usr/include/stdint.h:109: error: "__INT64_C" redefined [-Werror]
Quoted 5 lines
Quoted 1 line
How may I help to debug it?
Thanks Bruce for telling me to remove the build directory. Now it works!
For reference, official documentation on this point - unlike most things in meson, changing the cross-build file does require you to start from scratch with a new build folder.
https://mesonbuild.com/Cross-compilation.html#changing-cross-file-settings
/Bruce
PATCH v7 4/4 config: add octeontx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
--- config/arm/arm64_octeontx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-octeontx2-linux-gcc | 1 + config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_octeontx2_linux_gcc create mode 120000 config/defconfig_arm64-octeontx2-linux-gcc create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/arm64_octeontx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xb2'
config/arm/meson.build +8 -1
@@ -79,6 +79,12 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_IGB_UIO', false], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -96,7 +102,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-octeontx2-linuxapp-gcc
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=-mcpu=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v7 4/4] config: add octeontx2 machine config
06/04/2019 16:27, [email protected]:
Quoted 5 lines
From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
I see this error with meson when compiling softnic for octeontx2:
-c ../drivers/net/softnic/rte_eth_softnic_action.c
{standard input}: Assembler messages:
{standard input}:16: Error: selected processor does not support crc32cx w3,w3,x0' {standard input}:38: Error: selected processor does not support crc32cx w1,w1,x3' {standard input}:44: Error: selected processor does not support crc32cx w0,w0,x4' {standard input}:69: Error: selected processor does not support crc32cx w2,w2,x3'
...
Re: [dpdk-dev] [PATCH v7 4/4] config: add octeontx2 machine config
Quoted 9 lines · Thomas Monjalon
06/04/2019 16:27, [email protected]:
Quoted 5 lines
From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
I see this error with meson when compiling softnic for octeontx2:
Quoted 11 lines
-c
../drivers/net/softnic/rte_eth_softnic_action.c{standard input}: Assembler messages:
{standard input}:16: Error: selected processor does not support `crc32cx w3,w3,x0'
{standard input}:38: Error: selected processor does not support `crc32cx w1,w1,x3'
{standard input}:44: Error: selected processor does not support `crc32cx w0,w0,x4'
{standard input}:69: Error: selected processor does not support `crc32cx w2,w2,x3'
...
I have seen it too. Fix is here
Snippet from cover letter:
v7 Changes:
- Some compiler needs the following depended patch to compile with meson
http://patches.dpdk.org/patch/52367/
Quoted 1 line
PATCH v8 1/4 mk: introduce helper to check valid compiler argument
In reply to [email protected]From: Jerin Jacob <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
---
Change history of this series:
v8 Changes:
- Remove redudant lists (rebase aritfacts). (Yongseok Koh)
v7 Changes:
- Updated cross compile config files align with
"build: improve pcap dependency handling" changeset to fix build issue with meson
- Some compiler needs the following depended patch to compile with meson
http://patches.dpdk.org/patch/52367/
v6 Changes:
- Rework to change the config files to sync with "mk: use linux and freebsd in config names"
- Fix the following error with latest gcc by fixing the mcpu type
cc1: error: switch -mcpu=armv8.2-a conflicts with -march=armv8-a switch
v5 Changes:
- Fix incorrect meson flag parsing(Phil Yang)
- Squash meson cross build patch(5/5) into configuration update patches for thunderx2(3/5) and octeontx2(4/5)(Thomas)
- Changed octeontx2's march as armv8-a and added the extension required instead of armv8-2a(Phil Yang)
- Improved rte_cc_has_argument() implementaion by removing the temp file(Thomas)
v4 Changes:
- Fix incorrect signoff marrvell -> marvell.
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
v2 Changes:
- Add meson build support.
--- mk/rte.helper.mk | 10 ++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -E $(1) -xc /dev/null 1>/dev/null 2>/dev/null && echo $(1)) +endef
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.21.0
PATCH v8 2/4 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE. Add support to set micro arch specific flags.
--- config/arm/meson.build | 56 ++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 24 deletions(-)
config/arm/meson.build +32 -24
@@ -7,25 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd05', ['-mcpu=cortex-a55']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], - ['0xd0b', ['-mcpu=cortex-a76']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file
@@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -157,8 +157,16 @@ else endif foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif endforeach endif endforeach
Signature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 93 lines · On Apr 10, 2019, at 9:13 AM, [email protected] wrote:
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>---
config/arm/meson.build | 56 ++++++++++++++++++++++++------------------1 file changed, 32 insertions(+), 24 deletions(-)config/arm/meson.build +0
-0@@ -7,25 +7,6 @@ march_opt = '-march=@0@'.format(machine)
arm_force_native_march= falseconfig/arm/meson.build +0
-19-machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd05', ['-mcpu=cortex-a55']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], - ['0xd0b', ['-mcpu=cortex-a76']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] -
flags_common_default= [
# Accelaraterte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source fileconfig/arm/meson.build +0
-0@@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]]
flags_cavium= [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +21
-0@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
impl_generic= ['Generic armv8',flags_generic,machine_args_generic]config/arm/meson.build +0
-2@@ -157,8 +157,16 @@ else endif foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f
config/arm/meson.build else · line 169
Quoted 10 lines
config/arm/meson.build +10
-0+ foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif
Let me continue the discussion from v7 here.
Seems I wan't clear enough.
Let me take an example. If the host is thunderx2 (0xaf) and compiler is older than v7, flags_thunderx2_extra isn't set. This means, for example, RTE_CACHE_LINE_SIZE will still be 128. Is that what you want? RTE_CACHE_LINE_SIZE has nothing to do with compiler support and you might want to set it regardless of gcc version. You could skip setting -mcpu with setting the extra flags.
Thoughts?
Thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Hi Yongseok,
Quoted 120 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Wednesday, April 10, 2019 11:08 PM
To: Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Thomas Monjalon <[email protected]>; dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flagsExternal Email
----------------------------------------------------------------------
Quoted 41 lines · On Apr 10, 2019, at 9:13 AM, [email protected] wrote:
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>---
config/arm/meson.build | 56 ++++++++++++++++++++++++------------------1 file changed, 32 insertions(+), 24 deletions(-)config/arm/meson.build index renamed from config/arm/meson.build +0
-0
170a4981a..24bce2b39100644config/arm/meson.build +0
-0@@ -7,25 +7,6 @@ march_opt = '-march=@0@'.format(machine)
arm_force_native_march= falseconfig/arm/meson.build +0
-19-machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd05', ['-mcpu=cortex-a55']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], - ['0xd0b', ['-mcpu=cortex-a76']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] -Quoted 2 lines
flags_common_default= [
# Accelaraterte_memcpy. Be sure to run unit test(
memcpy_perf_autotest)Quoted 49 lines
# to determine the best threshold in code. Refer to notes in source file @@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +21
-0@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic,
machine_args_generic] @@ -157,8 +157,16 @@ elseendif foreach marg: machine[2] if marg[0] == impl_pnconfig/arm/meson.build +0
-2- foreach f: marg[1] - machine_args += fconfig/arm/meson.build else · line 169
Quoted 10 lines
config/arm/meson.build +10
-0+ foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endifLet me continue the discussion from v7 here.
Seems I wan't clear enough.
Quoted 7 lines
Let me take an example. If the host is thunderx2 (
0xaf) and compiler is older than v7,flags_thunderx2_extraisn't set. This means, for example,RTE_CACHE_LINE_SIZEwill still be 128. Is that what you want?RTE_CACHE_LINE_SIZEhas nothing to do with compiler support and you might want to set it regardless of gcc version. You could skip setting -mcpu with setting the extra flags.
Thanks for the detailed explanation.
I think since we have the check to skip mcpu flag when cc doesn't support it (cc.has_argument(flag)) It will be safe to remove
`
# Primary part number based mcpu flags are supported
# for gcc versions > 7
if cc.version().version_compare(
'<7.0') or cmd_output.length() == 0
if not meson.is_cross_build() and arm_force_native_march == true
impl_pn = 'native'
else
impl_pn = 'default'
endif
endif
`
The command output check can also be removed as it is handled when calling the command script itself.
Thoughts?
PS. I think the safest way to set CACHELINE_SIZE is to read the cache type register[1] but sadly only few latest kernels have the support through sysfs (/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size)
Quoted 7 lines
Thoughts?
Thanks,
Yongseok
Regards,
Pavan.
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 133 lines · Pavan Nikhilesh Bhagavatula
Hi Yongseok,
Quoted 120 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Wednesday, April 10, 2019 11:08 PM
To: Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Thomas Monjalon <[email protected]>; dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flagsExternal Email
----------------------------------------------------------------------
Quoted 41 lines · On Apr 10, 2019, at 9:13 AM, [email protected] wrote:
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>---
config/arm/meson.build | 56 ++++++++++++++++++++++++------------------1 file changed, 32 insertions(+), 24 deletions(-)config/arm/meson.build index renamed from config/arm/meson.build +0
-0
170a4981a..24bce2b39100644config/arm/meson.build +0
-0@@ -7,25 +7,6 @@ march_opt = '-march=@0@'.format(machine)
arm_force_native_march= falseconfig/arm/meson.build +0
-19-machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd05', ['-mcpu=cortex-a55']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], - ['0xd0b', ['-mcpu=cortex-a76']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] -Quoted 2 lines
flags_common_default= [
# Accelaraterte_memcpy. Be sure to run unit test(
memcpy_perf_autotest)Quoted 49 lines
# to determine the best threshold in code. Refer to notes in source file @@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +21
-0@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic,
machine_args_generic] @@ -157,8 +157,16 @@ elseendif foreach marg: machine[2] if marg[0] == impl_pnconfig/arm/meson.build +0
-2- foreach f: marg[1] - machine_args += fconfig/arm/meson.build else · line 169
Quoted 10 lines
config/arm/meson.build +10
-0+ foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endifLet me continue the discussion from v7 here.
Seems I wan't clear enough.Quoted 7 lines
Let me take an example. If the host is thunderx2 (
0xaf) and compiler is older than v7,flags_thunderx2_extraisn't set. This means, for example,RTE_CACHE_LINE_SIZEwill still be 128. Is that what you want?RTE_CACHE_LINE_SIZEhas nothing to do with compiler support and you might want to set it regardless of gcc version. You could skip setting -mcpu with setting the extra flags.
Quoted 15 lines
Thanks for the detailed explanation.
I think since we have the check to skip mcpu flag when cc doesn't support it (cc.has_argument(flag)) It will be safe to remove
`
# Primary part number based mcpu flags are supported
# for gcc versions > 7
if cc.version().version_compare(
'<7.0') orcmd_output.length()== 0
if notmeson.is_cross_build()andarm_force_native_march== true
impl_pn= 'native'
else
impl_pn= 'default'
endif
endif
`
+1
Quoted 2 lines
The command output check can also be removed as it is handled when calling the command script itself.
+1
Quoted 5 lines
Thoughts?
PS. I think the safest way to set
CACHELINE_SIZEis to read the cache type register[1] but sadly only few latest kernels have the support through sysfs (/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size)
+1
In summary, +3. LoL
I'll also submit a patch to change the default cacheline size of cortex-a72 with the new flags_*_extra[]
thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 152 lines · Yongseok Koh
Quoted 134 lines · Pavan Nikhilesh Bhagavatula
Hi Yongseok,
Quoted 120 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Wednesday, April 10, 2019 11:08 PM
To: Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Thomas Monjalon <[email protected]>; dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flagsExternal Email
----------------------------------------------------------------------
Quoted 41 lines · On Apr 10, 2019, at 9:13 AM, [email protected] wrote:
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.Signed-off-by Pavan Nikhilesh <[email protected]>Signed-off-by Jerin Jacob <[email protected]>---
config/arm/meson.build | 56 ++++++++++++++++++++++++------------------1 file changed, 32 insertions(+), 24 deletions(-)config/arm/meson.build index renamed from config/arm/meson.build +0
-0
170a4981a..24bce2b39100644config/arm/meson.build +0
-0@@ -7,25 +7,6 @@ march_opt = '-march=@0@'.format(machine)
arm_force_native_march= falseconfig/arm/meson.build +0
-19-machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd05', ['-mcpu=cortex-a55']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], - ['0xd0b', ['-mcpu=cortex-a76']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] -Quoted 2 lines
flags_common_default= [
# Accelaraterte_memcpy. Be sure to run unit test(
memcpy_perf_autotest)Quoted 49 lines
# to determine the best threshold in code. Refer to notes in source file @@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +21
-0@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic,
machine_args_generic] @@ -157,8 +157,16 @@ elseendif foreach marg: machine[2] if marg[0] == impl_pnconfig/arm/meson.build +0
-2- foreach f: marg[1] - machine_args += fconfig/arm/meson.build else · line 169
Quoted 10 lines
config/arm/meson.build +10
-0+ foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endifLet me continue the discussion from v7 here.
Seems I wan't clear enough.Quoted 7 lines
Let me take an example. If the host is thunderx2 (
0xaf) and compiler is older than v7,flags_thunderx2_extraisn't set. This means, for example,RTE_CACHE_LINE_SIZEwill still be 128. Is that what you want?RTE_CACHE_LINE_SIZEhas nothing to do with compiler support and you might want to set it regardless of gcc version. You could skip setting -mcpu with setting the extra flags.Quoted 15 lines
Thanks for the detailed explanation.
I think since we have the check to skip mcpu flag when cc doesn't support it (cc.has_argument(flag)) It will be safe to remove
`
# Primary part number based mcpu flags are supported
# for gcc versions > 7
if cc.version().version_compare(
'<7.0') orcmd_output.length()== 0
if notmeson.is_cross_build()andarm_force_native_march== true
impl_pn= 'native'
else
impl_pn= 'default'
endif
endif
`
Quoted 1 line
+1
I've tested it but still have an issue with old gcc.
Even if -mcpu isn't set due to cc.has_argument(), -march isn't set either. So, it spews error due to lack of CRC feature.
-march should have '+crc'. The error I got was:
Quoted 4 lines
ninja: Entering directory `build'
[942/1452] Compiling C object 'drivers/drivers...c@sta/net_softnic_rte_eth_softnic_action.c.o'.
FAILED:drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_action.c.o
cc -Idrivers/drivers@@tmp_rte_pmd_softnic@sta -Idrivers -I../drivers -Idrivers/net/softnic -I../drivers/net/softnic -Ilib/librte_ethdev -I../lib/librte_ethdev -I. -I../ -Iconfig -I../config-Ilib/librte_eal/common/include -I../lib/librte_eal/common/include -I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal/
Quoted 8 lines
common/include/arch/arm -I../lib/librte_eal/common/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_cmdline -I../lib/librte_cmdline -Ilib/lib
rte_meter-I../lib/librte_meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/librte_pipeline -I../lib/librte_pipeline -Ilib/librte_port -I../lib/librte_port -Ilib/librte_sched -I../lib/librte_sched -Ilib/librte_ip_frag -I../lib/librte_ip_frag -Ilib/librte_h ash -I../lib/librte_hash -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_kni -I../lib/librte_kni -Ilib/librte_table -I../lib/librte_table -Ilib/librte_lpm -I../lib/librte_lpm -Ilib/librte_acl -I../lib/librte_acl -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -includerte_config.h-Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIMENTAL_API-MD -MQ 'drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_action.c.o' -MF 'drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_action.c.o.d' -o 'drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_action.c.o' -c../drivers/net/softnic/rte_eth_softnic_action.c{standard input}: Assembler messages:
{standard input}:14: Error: selected processor does not support `crc32cx w3,w3,x0'
{standard input}:37: Error: selected processor does not support `crc32cx w1,w1,x3'
{standard input}:40: Error: selected processor does not support `crc32cx w0,w0,x2'
My machine has 0x41(Arm) and 0xd08(cortex-a72). gcc is '4.8.5 20150623 (Red Hat 4.8.5-28)'
Thanks,
Yongseok
Quoted 21 lines
Quoted 3 lines
The command output check can also be removed as it is handled when calling the command script itself.
+1
Quoted 5 lines
Thoughts?
PS. I think the safest way to set
CACHELINE_SIZEis to read the cache type register[1] but sadly only few latest kernels have the support through sysfs (/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size)+1
In summary, +3. LoL
I'll also submit a patch to change the default cacheline size of cortex-a72 with the new flags_*_extra[]
thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 65 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Friday, April 12, 2019 7:35 AM
To: Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Thomas Monjalon <[email protected]>; dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flagsExternal Email
I've tested it but still have an issue with old gcc.
Even if -mcpu isn't set due tocc.has_argument(), -march isn't set either. So, it spews error due to lack of CRC feature.
-march should have '+crc'. The error I got was:Quoted 2 lines
ninja: Entering directory `build'
[942/1452] Compiling C object'
drivers/drivers...c@sta/net_softnic_rte_eth_softnic_action.c.o'.Quoted 2 lines
FAILED:
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_aQuoted 24 lines
ction.c.o cc -Idrivers/drivers@@tmp_rte_pmd_softnic@sta -Idrivers
(quoted diff) +0
-23-I../drivers -Idrivers/net/softnic -I../drivers/net/softnic -Ilib/librte_ethdev -I../lib/librte_ethdev -I. -I../ -Iconfig -I../config-Ilib/librte_eal/common/include -I../lib/librte_eal/common/include -I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal/ common/include/arch/arm -I../lib/librte_eal/common/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_cmdline -I../lib/librte_cmdline -Ilib/lib rte_meter -I../lib/librte_meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/librte_pipeline -I../lib/librte_pipeline -Ilib/librte_port -I../lib/librte_port -Ilib/librte_sched -I../lib/librte_sched -Ilib/librte_ip_frag -I../lib/librte_ip_frag -Ilib/librte_h ash -I../lib/librte_hash -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_kni -I../lib/librte_kni -Ilib/librte_table -I../lib/librte_table -Ilib/librte_lpm -I../lib/librte_lpm -Ilib/librte_acl -I../lib/librte_acl -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h -Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIQuoted 2 lines
MENTAL_API-MD -MQ'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 2 lines
action.c.o' -MF
'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 2 lines
action.c.o.d' -o
'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 3 lines
action.c.o' -c
../drivers/net/softnic/rte_eth_softnic_action.c{standard input}: Assembler messages:
{standard input}:14: Error: selected processor does not support `crc32cxw3,w3,x0'
Quoted 8 lines
Quoted 1 line
{standard input}:37: Error: selected processor does not support `crc32cx
w1,w1,x3'
Quoted 1 line
{standard input}:40: Error: selected processor does not support `crc32cx
w0,w0,x2'
My machine has 0x41(Arm) and 0xd08(cortex-a72). gcc is '4.8.5 20150623 (Red Hat 4.8.5-28)'
Are you testing with very latest master where the following patch available in build?
http://patches.dpdk.org/patch/52367/
It should fix that issue.
Quoted 30 lines
Thanks,
YongseokQuoted 3 lines
Quoted 3 lines
The command output check can also be removed as it is handled when
calling the command script itself.
Quoted 21 lines
+1
Quoted 7 lines
Thoughts?
PS. I think the safest way to set
CACHELINE_SIZEis to read the cache type register[1] but sadly only few latest kernels have the support through sysfs (/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size)+1
In summary, +3. LoL
I'll also submit a patch to change the default cacheline size of cortex-a72 with the new flags_*_extra[]
thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 74 lines · Jerin Jacob Kollanukkaran
Quoted 72 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Friday, April 12, 2019 7:35 AM
To: Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Thomas Monjalon <[email protected]>; dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flagsExternal Email
I've tested it but still have an issue with old gcc.
Even if -mcpu isn't set due tocc.has_argument(), -march isn't set either. So, it spews error due to lack of CRC feature.
-march should have '+crc'. The error I got was:Quoted 2 lines
ninja: Entering directory `build'
[942/1452] Compiling C object'
drivers/drivers...c@sta/net_softnic_rte_eth_softnic_action.c.o'.Quoted 2 lines
FAILED:
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_aQuoted 24 lines
ction.c.o cc -Idrivers/drivers@@tmp_rte_pmd_softnic@sta -Idrivers
(quoted diff) +0
-23-I../drivers -Idrivers/net/softnic -I../drivers/net/softnic -Ilib/librte_ethdev -I../lib/librte_ethdev -I. -I../ -Iconfig -I../config-Ilib/librte_eal/common/include -I../lib/librte_eal/common/include -I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal/ common/include/arch/arm -I../lib/librte_eal/common/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_cmdline -I../lib/librte_cmdline -Ilib/lib rte_meter -I../lib/librte_meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/librte_pipeline -I../lib/librte_pipeline -Ilib/librte_port -I../lib/librte_port -Ilib/librte_sched -I../lib/librte_sched -Ilib/librte_ip_frag -I../lib/librte_ip_frag -Ilib/librte_h ash -I../lib/librte_hash -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_kni -I../lib/librte_kni -Ilib/librte_table -I../lib/librte_table -Ilib/librte_lpm -I../lib/librte_lpm -Ilib/librte_acl -I../lib/librte_acl -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h -Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIQuoted 2 lines
MENTAL_API-MD -MQ'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 2 lines
action.c.o' -MF
'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 2 lines
action.c.o.d' -o
'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 3 lines
action.c.o' -c
../drivers/net/softnic/rte_eth_softnic_action.c{standard input}: Assembler messages:
{standard input}:14: Error: selected processor does not support `crc32cxw3,w3,x0'
Quoted 1 line
{standard input}:37: Error: selected processor does not support `crc32cx
w1,w1,x3'
Quoted 1 line
{standard input}:40: Error: selected processor does not support `crc32cx
w0,w0,x2'
Quoted 6 lines
Quoted 2 lines
My machine has 0x41(Arm) and 0xd08(cortex-a72). gcc is '4.8.5 20150623 (Red Hat 4.8.5-28)'
Are you testing with very latest master where the following patch available in build?
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatches.dpdk.org%2Fpatch%2F52367%2F&data=02%7C01%7Cyskoh%40mellanox.com%7C9adebf1529ab4bbc189708d6bf0d1d00%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636906460384104429&sdata=vG65lezE%2BZacEpn38cUoozwEYm%2BBUGvuYBQ2ToEKnSI%3D&reserved=0
It should fix that issue.
Thanks, that fixes the issue.
But I've encountered another one. Are you aware of this?
ninja: Entering directory `build'
[1151/1452] Compiling C object 'drivers/drivers@@tmp_r...d_octeontx_event@sta/event_octeontx_timvf_worker.c.o'.
FAILED: drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o
cc -Idrivers/drivers@@tmp_rte_pmd_octeontx_event@sta -Idrivers -I../drivers -Idrivers/event/octeontx -I../drivers/event/octeontx -Ilib/librte_eventdev -I../lib/librte_eventdev -I. -I../ -Iconfig -I../config -Ilib/librte_eal/common/include -I../lib/librte_eal/common/include -I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal/common/include/arch/arm -I../lib/librte_eal/co mmon/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_cmdline -I../lib/librte_cmdline -Ilib/librte_meter -I../lib/librte_meter -Ilib/librte_hash -I../lib/librte_h ash -Ilib/librte_timer -I../lib/librte_timer -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Idrivers/common/octeontx -I../drivers/common/octeontx -Idrivers/mempool/octeontx -I../drivers/mempool/octeontx -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Idrivers/net/octeontx -I../drivers/net/octeontx -Idrivers/net/octeontx/base
-I../drivers/net/octeontx/base -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h -Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIMENTAL_API -MD -MQ 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o' -MF 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o.d' -o 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_t
imvf_worker.c.o' -c ../drivers/event/octeontx/timvf_worker.c../drivers/event/octeontx/timvf_worker.c: In function ‘timvf_timer_arm_burst_sp’:../drivers/event/octeontx/timvf_worker.c:88:1: error: could not split insn
}
^
(insn 95 98 99 (parallel [
(set (reg:DI 3 x3 [orig:98 D.8656 ] [98])
(mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64]))
(set (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64])
(unspec_volatile:DI [
(plus:DI (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64])
(const_int -281474976710656 [0xffff000000000000]))
(const_int 0 [0])
] UNSPECV_ATOMIC_OP))
(clobber (reg:CC 66 cc))
(clobber (reg:DI 0 x0))
(clobber (reg:SI 1 x1))
]) ../drivers/event/octeontx/timvf_worker.h:95 1832 {atomic_fetch_adddi}
(expr_list:REG_UNUSED (reg:CC 66 cc)
(expr_list:REG_UNUSED (reg:SI 1 x1)
(expr_list:REG_UNUSED (reg:DI 0 x0)
(nil)))))../drivers/event/octeontx/timvf_worker.c:88:1: internal compiler error: in final_scan_insn, at final.c:2897 Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
{standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive Preprocessed source stored into /tmp/ccnQRbOm.out file, please attach this to your bugreport. [1168/1452] Compiling C object 'drivers/drivers@@tmp_r...ntx_crypto@sta/crypto_octeontx_otx_cryptodev_ops.c.o'.
ninja: build stopped: subcommand failed.
Thanks
Yongseok
Jerin Jacob Kollanukkaran
Acked-by Ferruh YigitRe: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 11 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Friday, April 12, 2019 12:14 PM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Pavan Nikhilesh Bhagavatula <[email protected]>; Thomas Monjalon <[email protected]>; dev <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 2 lines
Thanks, that fixes the issue.
But I've encountered another one. Are you aware of this?
Yes. It is a compiler bug. This patch set is NOT introducing this.
Fixed same on legacy build with arm64 . If you are using < 4.8.6 compiler For meson, this patched needs to be ported to meson
$ git show f3af3e44a444cdfe3fa7b3e2c042be351401eb23 commit f3af3e44a444cdfe3fa7b3e2c042be351401eb23 Author: Jerin Jacob <[email protected]> Date: Mon Sep 3 15:01:10 2018 +0530
mk: disable OcteonTx for buggy compilers only on arm64
Disable octeontx for gcc 4.8.5 as the compiler is emitting "internal compiler error" for aarch64. The GCC "internal compiler error" was observed only for arm64 architecture so disable the PMD only for arm64.
Quoted 73 lines
ninja: Entering directory `build'
[1151/1452] Compiling C object 'drivers/drivers@@tmp_r...d_octeontx_event@sta/event_octeontx_timvf_worker.c.o'.
FAILED:drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o
cc -Idrivers/drivers@@tmp_rte_pmd_octeontx_event@sta -Idrivers - I../drivers -Idrivers/event/octeontx -I../drivers/event/octeontx - Ilib/librte_eventdev -I../lib/librte_eventdev -I. -I../ -Iconfig -I../config - Ilib/librte_eal/common/include -I../lib/librte_eal/common/include - I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common - I../lib/librte_eal/common -Ilib/librte_eal/common/include/arch/arm - I../lib/librte_eal/co mmon/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_ring -I../lib/librte_ring - Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_net -I../lib/librte_net - Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool - I../lib/librte_mempool -Ilib/librte_cmdline -I../lib/librte_cmdline - Ilib/librte_meter -I../lib/librte_meter -Ilib/librte_hash -I../lib/librte_h ash - Ilib/librte_timer -I../lib/librte_timer -Ilib/librte_cryptodev - I../lib/librte_cryptodev -Idrivers/common/octeontx - I../drivers/common/octeontx -Idrivers/mempool/octeontx - I../drivers/mempool/octeontx -Idrivers/bus/pci -I../drivers/bus/pci - I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev - I../drivers/bus/vdev -Idrivers/net/octeontx -I../drivers/net/octeontx - Idrivers/net/octeontx/base -I../drivers/net/octeontx/base -pipe - D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -includerte_config.h- Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIMENTAL_API-MD -MQ 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o' -MF 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o.d' -o 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o' -c../drivers/event/octeontx/timvf_worker.c../drivers/event/octeontx/timvf_worker.c: In function ‘timvf_timer_arm_burst_sp’:../drivers/event/octeontx/timvf_worker.c:88:1: error: could not split insn } ^ (insn 95 98 99 (parallel [(set (reg:DI 3 x3 [orig:98 D.8656 ] [98]) (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64])) (set (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64]) (unspec_volatile:DI [ (plus:DI (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64]) (const_int -281474976710656 [0xffff000000000000])) (const_int 0 [0]) ] UNSPECV_ATOMIC_OP)) (clobber (reg:CC 66 cc)) (clobber (reg:DI 0 x0)) (clobber (reg:SI 1 x1)) ]) ../drivers/event/octeontx/timvf_worker.h:95 1832 {atomic_fetch_adddi} (expr_list:REG_UNUSED (reg:CC 66 cc) (expr_list:REG_UNUSED (reg:SI 1 x1) (expr_list:REG_UNUSED (reg:DI 0 x0) (nil)))))
../drivers/event/octeontx/timvf_worker.c:88:1: internal compiler error: infinal_scan_insn, at final.c:2897 Please submit a full bug report, with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions. {standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive Preprocessed source stored into/tmp/ccnQRbOm.outfile, please attach this to your bugreport.
[1168/1452] Compiling C object 'drivers/drivers@@tmp_r...ntx_crypto@sta/crypto_octeontx_otx_cryptodev_ops.c.o'.
ninja: build stopped: subcommand failed.Thanks
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 14 lines · Jerin Jacob Kollanukkaran
Quoted 12 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Friday, April 12, 2019 12:14 PM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Pavan Nikhilesh Bhagavatula <[email protected]>; Thomas Monjalon <[email protected]>; dev <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 7 lines
Quoted 2 lines
Thanks, that fixes the issue.
But I've encountered another one. Are you aware of this?Yes. It is a compiler bug. This patch set is NOT introducing this.
Fixed same on legacy build with arm64 . If you are using < 4.8.6 compiler For meson, this patched needs to be ported to meson
Okay, I've ported it. Will submit it soon.
Yongseok
Quoted 93 lines
$ git show f3af3e44a444cdfe3fa7b3e2c042be351401eb23 commit f3af3e44a444cdfe3fa7b3e2c042be351401eb23 Author: Jerin Jacob <[email protected]> Date: Mon Sep 3 15:01:10 2018 +0530mk: disable OcteonTx for buggy compilers only on arm64
Disable octeontx for gcc 4.8.5 as the compiler is emitting "internal compiler error" for aarch64. The GCC "internal compiler error" was observed only for arm64 architecture so disable the PMD only for arm64.
Fixes 4f760550a093 ("mk: disable OcteonTx for buggy compilers")Signed-off-by Jerin Jacob <[email protected]>Acked-by Ferruh Yigit <[email protected]>Quoted 73 lines
ninja: Entering directory `build'
[1151/1452] Compiling C object 'drivers/drivers@@tmp_r...d_octeontx_event@sta/event_octeontx_timvf_worker.c.o'.
FAILED:drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o
cc -Idrivers/drivers@@tmp_rte_pmd_octeontx_event@sta -Idrivers - I../drivers -Idrivers/event/octeontx -I../drivers/event/octeontx - Ilib/librte_eventdev -I../lib/librte_eventdev -I. -I../ -Iconfig -I../config - Ilib/librte_eal/common/include -I../lib/librte_eal/common/include - I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common - I../lib/librte_eal/common -Ilib/librte_eal/common/include/arch/arm - I../lib/librte_eal/co mmon/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_ring -I../lib/librte_ring - Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_net -I../lib/librte_net - Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool - I../lib/librte_mempool -Ilib/librte_cmdline -I../lib/librte_cmdline - Ilib/librte_meter -I../lib/librte_meter -Ilib/librte_hash -I../lib/librte_h ash - Ilib/librte_timer -I../lib/librte_timer -Ilib/librte_cryptodev - I../lib/librte_cryptodev -Idrivers/common/octeontx - I../drivers/common/octeontx -Idrivers/mempool/octeontx - I../drivers/mempool/octeontx -Idrivers/bus/pci -I../drivers/bus/pci - I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev - I../drivers/bus/vdev -Idrivers/net/octeontx -I../drivers/net/octeontx - Idrivers/net/octeontx/base -I../drivers/net/octeontx/base -pipe - D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -includerte_config.h- Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIMENTAL_API-MD -MQ 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o' -MF 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o.d' -o 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o' -c../drivers/event/octeontx/timvf_worker.c../drivers/event/octeontx/timvf_worker.c: In function ‘timvf_timer_arm_burst_sp’:../drivers/event/octeontx/timvf_worker.c:88:1: error: could not split insn } ^ (insn 95 98 99 (parallel [(set (reg:DI 3 x3 [orig:98 D.8656 ] [98]) (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64])) (set (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64]) (unspec_volatile:DI [ (plus:DI (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64]) (const_int -281474976710656 [0xffff000000000000])) (const_int 0 [0]) ] UNSPECV_ATOMIC_OP)) (clobber (reg:CC 66 cc)) (clobber (reg:DI 0 x0)) (clobber (reg:SI 1 x1)) ]) ../drivers/event/octeontx/timvf_worker.h:95 1832 {atomic_fetch_adddi} (expr_list:REG_UNUSED (reg:CC 66 cc) (expr_list:REG_UNUSED (reg:SI 1 x1) (expr_list:REG_UNUSED (reg:DI 0 x0) (nil)))))
../drivers/event/octeontx/timvf_worker.c:88:1: internal compiler error: infinal_scan_insn, at final.c:2897 Please submit a full bug report, with
preprocessed source if appropriate.
See <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbugzilla.redhat.com%2Fbugzilla&data=02%7C01%7Cyskoh%40mellanox.com%7C557fa46858104e15443508d6bf1494e9%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636906492451079366&sdata=EpdRkARHJDQCd6LRSe7gWjCghjIec%2Fx%2BJjbJiDNEYm4%3D&reserved=0> for instructions. {standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc
directive Preprocessed source stored into/tmp/ccnQRbOm.outfile, please
attach this to your bugreport.
[1168/1452] Compiling C object
'drivers/drivers@@tmp_r...ntx_crypto@sta/crypto_octeontx_otx_cryptode
v_ops.c.o'.
ninja: build stopped: subcommand failed.Thanks
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
In reply to Yongseok KohQuoted 116 lines · Yongseok Koh
Quoted 75 lines · Jerin Jacob Kollanukkaran
Quoted 72 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Friday, April 12, 2019 7:35 AM
To: Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Thomas Monjalon <[email protected]>; dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flagsExternal Email
I've tested it but still have an issue with old gcc.
Even if -mcpu isn't set due tocc.has_argument(), -march isn't set either. So, it spews error due to lack of CRC feature.
-march should have '+crc'. The error I got was:Quoted 2 lines
ninja: Entering directory `build'
[942/1452] Compiling C object'
drivers/drivers...c@sta/net_softnic_rte_eth_softnic_action.c.o'.Quoted 2 lines
FAILED:
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_aQuoted 24 lines
ction.c.o cc -Idrivers/drivers@@tmp_rte_pmd_softnic@sta -Idrivers
(quoted diff) +0
-23-I../drivers -Idrivers/net/softnic -I../drivers/net/softnic -Ilib/librte_ethdev -I../lib/librte_ethdev -I. -I../ -Iconfig -I../config-Ilib/librte_eal/common/include -I../lib/librte_eal/common/include -I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal/ common/include/arch/arm -I../lib/librte_eal/common/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_cmdline -I../lib/librte_cmdline -Ilib/lib rte_meter -I../lib/librte_meter -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Ilib/librte_pipeline -I../lib/librte_pipeline -Ilib/librte_port -I../lib/librte_port -Ilib/librte_sched -I../lib/librte_sched -Ilib/librte_ip_frag -I../lib/librte_ip_frag -Ilib/librte_h ash -I../lib/librte_hash -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Ilib/librte_kni -I../lib/librte_kni -Ilib/librte_table -I../lib/librte_table -Ilib/librte_lpm -I../lib/librte_lpm -Ilib/librte_acl -I../lib/librte_acl -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -include rte_config.h -Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIQuoted 2 lines
MENTAL_API-MD -MQ'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 2 lines
action.c.o' -MF
'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 2 lines
action.c.o.d' -o
'
drivers/drivers@@tmp_rte_pmd_softnic@sta/net_softnic_rte_eth_softnic_Quoted 3 lines
action.c.o' -c
../drivers/net/softnic/rte_eth_softnic_action.c{standard input}: Assembler messages:
{standard input}:14: Error: selected processor does not support `crc32cxw3,w3,x0'
Quoted 1 line
{standard input}:37: Error: selected processor does not support `crc32cx
w1,w1,x3'
Quoted 1 line
{standard input}:40: Error: selected processor does not support `crc32cx
w0,w0,x2'
Quoted 6 lines
Quoted 2 lines
My machine has 0x41(Arm) and 0xd08(cortex-a72). gcc is '4.8.5 20150623 (Red Hat 4.8.5-28)'
Are you testing with very latest master where the following patch available in build?
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatches.dpdk.org%2Fpatch%2F52367%2F&data=02%7C01%7Cyskoh%40mellanox.com%7C5909260f30a64e07a95108d6bf123bde%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636906482386596820&sdata=4%2BfRfELXK37SNY4wdFNGPF8lpU7S3DEfPoDfAH5K7GE%3D&reserved=0
It should fix that issue.Thanks, that fixes the issue.
But I've encountered another one. Are you aware of this?ninja: Entering directory `build'
[1151/1452] Compiling C object 'drivers/drivers@@tmp_r...d_octeontx_event@sta/event_octeontx_timvf_worker.c.o'.
FAILED:drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o
cc -Idrivers/drivers@@tmp_rte_pmd_octeontx_event@sta -Idrivers -I../drivers -Idrivers/event/octeontx -I../drivers/event/octeontx -Ilib/librte_eventdev -I../lib/librte_eventdev -I. -I../ -Iconfig -I../config -Ilib/librte_eal/common/include -I../lib/librte_eal/common/include -I../lib/librte_eal/linux/eal/include -Ilib/librte_eal/common -I../lib/librte_eal/common -Ilib/librte_eal/common/include/arch/arm -I../lib/librte_eal/co mmon/include/arch/arm -Ilib/librte_eal -I../lib/librte_eal -Ilib/librte_kvargs -I../lib/librte_kvargs -Ilib/librte_ring -I../lib/librte_ring -Ilib/librte_ethdev -I../lib/librte_ethdev -Ilib/librte_net -I../lib/librte_net -Ilib/librte_mbuf -I../lib/librte_mbuf -Ilib/librte_mempool -I../lib/librte_mempool -Ilib/librte_cmdline -I../lib/librte_cmdline -Ilib/librte_meter -I../lib/librte_meter -Ilib/librte_hash -I../lib/librte_h ash -Ilib/librte_timer -I../lib/librte_timer -Ilib/librte_cryptodev -I../lib/librte_cryptodev -Idrivers/common/octeontx -I../drivers/common/octeontx -Idrivers/mempool/octeontx -I../drivers/mempool/octeontx -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/librte_pci -I../lib/librte_pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Idrivers/net/octeontx -I../drivers/net/octeontx -Idrivers/net/octeontx/base -I../drivers/net/octeontx/base -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -includerte_config.h-Wsign-compare -Wcast-qual -fPIC -D_GNU_SOURCE -DALLOW_EXPERIMENTAL_API -MD -MQ 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o' -MF 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o.d' -o 'drivers/drivers@@tmp_rte_pmd_octeontx_event@sta/event_octeontx_timvf_worker.c.o' -c../drivers/event/octeontx/timvf_worker.c../drivers/event/octeontx/timvf_worker.c: In function ‘timvf_timer_arm_burst_sp’:../drivers/event/octeontx/timvf_worker.c:88:1: error: could not split insn
}
^
(insn 95 98 99 (parallel [(set (reg:DI 3 x3 [orig:98 D.8656 ] [98]) (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64])) (set (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64]) (unspec_volatile:DI [ (plus:DI (mem/v:DI (reg/f:DI 21 x21 [orig:88 D.8662 ] [88]) [-1 S8 A64]) (const_int -281474976710656 [0xffff000000000000])) (const_int 0 [0]) ] UNSPECV_ATOMIC_OP)) (clobber (reg:CC 66 cc)) (clobber (reg:DI 0 x0)) (clobber (reg:SI 1 x1)) ]) ../drivers/event/octeontx/timvf_worker.h:95 1832 {atomic_fetch_adddi} (expr_list:REG_UNUSED (reg:CC 66 cc) (expr_list:REG_UNUSED (reg:SI 1 x1) (expr_list:REG_UNUSED (reg:DI 0 x0) (nil)))))
Quoted 9 lines
../drivers/event/octeontx/timvf_worker.c:88:1: internal compiler error: infinal_scan_insn, at final.c:2897
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbugzilla.redhat.com%2Fbugzilla&data=02%7C01%7Cyskoh%40mellanox.com%7C5909260f30a64e07a95108d6bf123bde%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636906482386596820&sdata=2AH1gInkxui7UEDb7LLNppMxDEaf%2F5N5TEHhDRTSDJY%3D&reserved=0> for instructions. {standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
Preprocessed source stored into/tmp/ccnQRbOm.outfile, please attach this to your bugreport.
[1168/1452] Compiling C object 'drivers/drivers@@tmp_r...ntx_crypto@sta/crypto_octeontx_otx_cryptodev_ops.c.o'.
ninja: build stopped: subcommand failed.
One more issue.
With gcc7.2, crypto isn't enabled if -mcpu is set.
How about thunderx/octeon?
Looks it should be like -mcpu=cortex-a72+crypto
I'll take care of this in a separate patch.
Because I want to add a new option to control it.
The reason is a binary having crypto support can't be run on a cpu w/o crypto extension, it is panicked. And -mcpu=cortex-a72 includes 'crc' support by default.
Thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 14 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Friday, April 12, 2019 12:39 PM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Pavan Nikhilesh Bhagavatula <[email protected]>; Thomas Monjalon <[email protected]>; dev <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 3 lines
One more issue.
With gcc7.2, crypto isn't enabled if -mcpu is set. How about thunderx/octeon?
It is enabled when when mcpu=thunderxt88 is provided.
In default case, it picks up -march=armv8-a+crc+crypto if mpcu is not matching. So I don’t see any issue.
Quoted 1 line
Looks it should be like -mcpu=cortex-a72+crypto I'll take care of this in a
mcpu should be enough. Looks like like it a compiler bug, Is cortex-a72 available with out crypto? mcpu suppose to tune for specific cpu.
Quoted 5 lines
separate patch.
Because I want to add a new option to control it.
The reason is a binary having crypto support can't be run on a cpu w/o crypto extension, it is panicked.
And -mcpu=cortex-a72 includes 'crc' support by default.
I suggest to add config/arm/arm64_a72_linux_gcc, If we need to catch all this issue in cross compilation otherwise it will come only on native compilation on that specific board. Now the devtools/test-meson-builds.sh goes over all the config/arm/* on the native compilation On arm64 board and x86. If you need set compiler test for a72 then please add the cross compile config.
Quoted 5 lines
Thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 21 lines · Jerin Jacob Kollanukkaran
Quoted 15 lines
-----Original Message-----
From: Yongseok Koh <[email protected]>
Sent: Friday, April 12, 2019 12:39 PM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Pavan Nikhilesh Bhagavatula <[email protected]>; Thomas Monjalon <[email protected]>; dev <[email protected]>; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flagsQuoted 3 lines
One more issue.
With gcc7.2, crypto isn't enabled if -mcpu is set. How about thunderx/octeon?
Quoted 8 lines
It is enabled when when mcpu=thunderxt88 is provided.
In default case, it picks up -march=armv8-a+crc+crypto if mpcu is not matching. So I don’t see any issue.Quoted 1 line
Looks it should be like -mcpu=cortex-a72+crypto I'll take care of this in a
mcpu should be enough. Looks like like it a compiler bug, Is cortex-a72 available with out crypto? mcpu suppose to tune for specific cpu.
Yes, Mellanox BlueField is designed based on a72 and there are two variants in production. One with crypto, the other w/o crypto. That might be the reason why -mcpu=cortex-a72 doesn't enable crypto by default.
Quoted 10 lines
Quoted 5 lines
separate patch.
Because I want to add a new option to control it.
The reason is a binary having crypto support can't be run on a cpu w/o crypto extension, it is panicked.
And -mcpu=cortex-a72 includes 'crc' support by default.I suggest to add config/arm/arm64_a72_linux_gcc, If we need to catch all this issue in cross compilation otherwise it will come only on native compilation on that specific board. Now the
devtools/test-meson-builds.shgoes over all the config/arm/* on the native compilation On arm64 board and x86. If you need set compiler test for a72 then please add the cross compile config.
Yes, I'm going to add config/arm/arm64_bluefield_linux_gcc soon. Patch is ready now.
Thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
In reply to [email protected]10/04/2019 18:13, [email protected]:
Quoted 5 lines
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.
I don't like how flags are set in config/arm/meson.build. It is a real mess to find which flag applies to which machine. Adding the flags_*_extra in the machine_args_* is adding more mess.
[...]
Quoted 32 lines
flags_common_default= [config/arm/meson.build +12
-3# Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file@@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']],
config/arm/meson.build flags_dpaa2 = [ · line 73
Quoted 10 lines
config/arm/meson.build +10
-0+ ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]
I think we should have a simpler model.
We need only to know the machine name and get all the related machine config. In native compilation, machine name is guessed from implementor id and pn (from config/arm/armv8_machine.py). We can directly output the machine name from this script and leave the naming logic in this script.
In the cross-compilation config files (config/arm/*),
we can just specify the machine name.
Then every machine config (machine_args and dpdk_conf) would be specified in some arrays based on the machine name.
Of course, we can keep some common default values.
Thoughts?
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 53 lines · Thomas Monjalon
10/04/2019 18:13, [email protected]:
Quoted 5 lines
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.I don't like how flags are set in config/arm/meson.build. It is a real mess to find which flag applies to which machine. Adding the flags_*_extra in the machine_args_* is adding more mess.
[...]
Quoted 38 lines
flags_common_default= [
# Accelaraterte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source fileconfig/arm/meson.build +0
-0@@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]]
flags_cavium= [config/arm/meson.build +0
-1- ['RTE_MACHINE', '"thunderx"'],['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96],config/arm/meson.build +1
-2- ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]]
flags_dpaa= [['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],config/arm/meson.build +17
-0@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
Quoted 8 lines
config/arm/meson.build flags_dpaa2 = [ · line 73
Quoted 4 lines
config/arm/meson.build +4
-0+ ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]I think we should have a simpler model.
We need only to know the machine name and get all the related machine config. In native compilation, machine name is guessed from implementor id and pn
It can be guessed unless machine name is specified as an option. We can add machine_name option?
One observation. We do have machine option but it isn't used much for arm. And in config/arm/meson.build, march_opt isn't used either.
Quoted 9 lines
(from
config/arm/armv8_machine.py). We can directly output the machine name from this script and leave the naming logic in this script.
In the cross-compilation config files (config/arm/*),
we can just specify the machine name.
Then every machine config (machine_argsanddpdk_conf) would be specified in some arrays based on the machine name.
Of course, we can keep some common default values.Thoughts?
Sounds like we can cleanly reorganize it with the suggestion.
Thanks,
Yongseok
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
In reply to Thomas MonjalonQuoted 69 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, April 12, 2019 5:07 AM
To: Pavan Nikhilesh Bhagavatula <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags10/04/2019 18:13, [email protected]:
Quoted 5 lines
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.I don't like how flags are set in config/arm/meson.build. It is a real mess to find which flag applies to which machine. Adding the flags_*_extra in the machine_args_* is adding more mess.
[...]
Quoted 2 lines
flags_common_default= [
# Accelaraterte_memcpy. Be sure to run unit test(
memcpy_perf_autotest)Quoted 30 lines
# to determine the best threshold in code. Refer to notes in source file @@ -52,12 +33,10 @@ flags_generic = [config/arm/meson.build +12
-3['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']],config/arm/meson.build flags_dpaa2 = [ · line 73
Quoted 10 lines
config/arm/meson.build +10
-0+ ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]I think we should have a simpler model.
We need only to know the machine name and get all the related machine config.
Quoted 8 lines
In native compilation, machine name is guessed from implementor id and pn (from
config/arm/armv8_machine.py). We can directly output the machine name from this script and leave the naming logic in this script. In the cross-compilation config files (config/arm/*), we can just specify the machine name.
Then every machine config (machine_argsanddpdk_conf) would be specified in some arrays based on the machine name.
Of course, we can keep some common default values.
Thomas,
This patch was around last three months. It reached upto v8.
I think, in that last minute for RC2, We cannot take major rework on this as it needs to tested for Other arm64 platform too. It was pulled out from RC1 because other pcap issue from meson. Now its not fair to say to rework the meson stuff now.
I suggest to take other rework in next release.
Quoted 3 lines
Thoughts?
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
12/04/2019 09:12, Jerin Jacob Kollanukkaran:
Quoted 69 lines
From: Thomas Monjalon <[email protected]>
Quoted 59 lines
10/04/2019 18:13, [email protected]:
Quoted 5 lines
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg.
CACHE_LINESIZE. Add support to set micro arch specific flags.I don't like how flags are set in config/arm/meson.build. It is a real mess to find which flag applies to which machine. Adding the flags_*_extra in the machine_args_* is adding more mess.
[...]
Quoted 2 lines
flags_common_default= [
# Accelaraterte_memcpy. Be sure to run unit test(
memcpy_perf_autotest)Quoted 30 lines
# to determine the best threshold in code. Refer to notes in source file @@ -52,12 +33,10 @@ flags_generic = [config/arm/meson.build +12
-3['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']],config/arm/meson.build flags_dpaa2 = [ · line 73
Quoted 10 lines
config/arm/meson.build +10
-0+ ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]I think we should have a simpler model.
We need only to know the machine name and get all the related machine config.Quoted 8 lines
In native compilation, machine name is guessed from implementor id and pn (from
config/arm/armv8_machine.py). We can directly output the machine name from this script and leave the naming logic in this script. In the cross-compilation config files (config/arm/*), we can just specify the machine name.
Then every machine config (machine_argsanddpdk_conf) would be specified in some arrays based on the machine name.
Of course, we can keep some common default values.
Quoted 7 lines
Thomas,
This patch was around last three months. It reached upto v8.
I think, in that last minute for RC2, We cannot take major rework on this as it needs to tested for Other arm64 platform too. It was pulled out from RC1 because other pcap issue from meson. Now its not fair to say to rework the meson stuff now.
I suggest to take other rework in next release.
I was not confortable with this patch without being able to say why. Yesterday I spent more time to understand and see what may be improved. I agree it is late, so it won't block this patch for 19.05. Do you agree this file can be improved?
Please would you like to look at reworking during next cycle? Thanks
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 24 lines
Quoted 19 lines
Quoted 10 lines
config/arm/meson.build flags_dpaa2 = [ · line 73
Quoted 6 lines
config/arm/meson.build +6
-0+machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]]I think we should have a simpler model.
We need only to know the machine name and get all the related machine config.Quoted 8 lines
In native compilation, machine name is guessed from implementor id and pn (from
config/arm/armv8_machine.py). We can directly output the machine name from this script and leave the naming logic in this script. In the cross-compilation config files (config/arm/*), we can just specify the machine name.
Then every machine config (machine_argsanddpdk_conf) would be specified in some arrays based on the machine name.
Of course, we can keep some common default values.Quoted 5 lines
Thomas,
This patch was around last three months. It reached upto v8.
I think, in that last minute for RC2, We cannot take major rework on this as it needs to tested for Other arm64 platform too. It was pulled out from
Quoted 8 lines
RC1 because other pcap issue from meson.
Quoted 2 lines
Now its not fair to say to rework the meson stuff now. I suggest to take other rework in next release.
I was not confortable with this patch without being able to say why. Yesterday I spent more time to understand and see what may be improved. I agree it is late, so it won't block this patch for 19.05. Do you agree this file can be improved?
Moving to the all to static config file is an option but we lose the flexibility
of runtime detecting the options and few of them are probing at runtime based
on gcc versions and mcpu combination etc.
I am not expert in meson area and not sure meson/python has better data strcture for this other than list/array combo. If Bruce has any feedback on this, then we
will try to prototype it.
Quoted 3 lines
Please would you like to look at reworking during next cycle? Thanks
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
13/04/2019 08:24, Jerin Jacob Kollanukkaran:
Quoted 8 lines
Quoted 4 lines
I was not confortable with this patch without being able to say why. Yesterday I spent more time to understand and see what may be improved. I agree it is late, so it won't block this patch for 19.05. Do you agree this file can be improved?
Moving to the all to static config file is an option but we lose the flexibility of runtime detecting the options and few of them are probing at runtime based on gcc versions and mcpu combination etc.
I think there is a misunderstanding.
I'm suggesting to symplify arrays by indexing only by machine name. It should not change the behaviour.
Quoted 6 lines
I am not expert in meson area and not sure meson/python has better data strcture for this other than list/array combo. If Bruce has any feedback on this, then we
will try to prototype it.Quoted 2 lines
Please would you like to look at reworking during next cycle? Thanks
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Hi Thomas,
There is no guarantee of primary part number (machine names) uniqueness between implementors.
If we limit lookups to only machine names through primary part number we would have a lot of repetitive defines. Also, moving the arrays into the python script is not feasible as meson needs to reparse the standard out from the python script
Currently, config is split into three parts :
1. Implementor specific defines.
2. Micro-arch specific compiler flags.
3. Micro-arch specific defines.
I think from a configurability point of view the above three are really important for fine grained control.
Thoughts?
Regards,
Pavan.
Quoted 32 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Sunday, April 14, 2019 2:13 AM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Pavan Nikhilesh Bhagavatula <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags13/04/2019 08:24, Jerin Jacob Kollanukkaran:
Quoted 8 lines
Quoted 4 lines
I was not confortable with this patch without being able to say why. Yesterday I spent more time to understand and see what may be improved. I agree it is late, so it won't block this patch for 19.05. Do you agree this file can be improved?
Moving to the all to static config file is an option but we lose the flexibility of runtime detecting the options and few of them are probing at runtime based on gcc versions and mcpu combination etc.
I think there is a misunderstanding.
I'm suggesting to symplify arrays by indexing only by machine name. It should not change the behaviour.Quoted 6 lines
I am not expert in meson area and not sure meson/python has better data strcture for this other than list/array combo. If Bruce has any feedback on this, then we will try to prototype it.
Quoted 2 lines
Please would you like to look at reworking during next cycle? Thanks
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
14/04/2019 16:40, Pavan Nikhilesh Bhagavatula:
Quoted 3 lines
Hi Thomas,
There is no guarantee of primary part number (machine names) uniqueness between implementors.
I think we don't speak the same language :)
By machine name, I mean what we set in RTE_MACHINE, like octeontx2.
Quoted 2 lines
If we limit lookups to only machine names through primary part number we would have a lot of repetitive defines. Also, moving the arrays into the python script is not feasible as meson needs to reparse the standard out from the python script
I will probably need to write a PoC.
Quoted 4 lines
Currently, config is split into three parts :
1. Implementor specific defines.
2. Micro-arch specific compiler flags.
3. Micro-arch specific defines.
This is currently unreadable in my opinion.
Quoted 1 line
I think from a configurability point of view the above three are really important for fine grained control.
I agree fine grain is required.
Quoted 39 lines
Thoughts?
Regards,
Pavan.Quoted 32 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Sunday, April 14, 2019 2:13 AM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Pavan Nikhilesh Bhagavatula <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags13/04/2019 08:24, Jerin Jacob Kollanukkaran:
Quoted 8 lines
Quoted 4 lines
I was not confortable with this patch without being able to say why. Yesterday I spent more time to understand and see what may be improved. I agree it is late, so it won't block this patch for 19.05. Do you agree this file can be improved?
Moving to the all to static config file is an option but we lose the flexibility of runtime detecting the options and few of them are probing at runtime based on gcc versions and mcpu combination etc.
I think there is a misunderstanding.
I'm suggesting to symplify arrays by indexing only by machine name. It should not change the behaviour.Quoted 6 lines
I am not expert in meson area and not sure meson/python has better data strcture for this other than list/array combo. If Bruce has any feedback on this, then we will try to prototype it.
Quoted 2 lines
Please would you like to look at reworking during next cycle? Thanks
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 9 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Sunday, April 14, 2019 11:14 PM
To: Pavan Nikhilesh Bhagavatula <[email protected]>
Cc: Jerin Jacob Kollanukkaran <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
Quoted 8 lines
14/04/2019 16:40, Pavan Nikhilesh Bhagavatula:
Quoted 3 lines
Hi Thomas,
There is no guarantee of primary part number (machine names) uniqueness
between implementors.
I think we don't speak the same language :) By machine name, I mean what we set in
RTE_MACHINE, like octeontx2.
As you know, The system probes "implementor_id" and "implementor_pn" Values. There is nothing like machine name in meson and in order to keep Synergy with native build, we need to just follow, "implementor_id" and "implementor_pn". Now, it is possible to have "implemetor_id" to "implementor_pn" to machine name lookup but Unlike, "make" based Build system, meson supports supporting a lot of machines(like RTE_MACHINE), with that structure. So converting to another intermediate called "machine string" will have more overhead IMO.
['0xa1', ['-mcpu=thunderxt88']],
['0xa2', ['-mcpu=thunderxt81']],
['0xa3', ['-mcpu=thunderxt83']]]
['0xd03', ['-mcpu=cortex-a53']],
['0xd04', ['-mcpu=cortex-a35']],
['0xd05', ['-mcpu=cortex-a55']],
['0xd07', ['-mcpu=cortex-a57']],
['0xd08', ['-mcpu=cortex-a72']],
['0xd09', ['-mcpu=cortex-a73']],
['0xd0a', ['-mcpu=cortex-a75']],
['0xd0b', ['-mcpu=cortex-a76']]impl_0x41 = ['Arm', flags_generic, machine_args_generic] impl_0x42 = ['Broadcom', flags_generic, machine_args_generic] impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium] impl_0x44 = ['DEC', flags_generic, machine_args_generic] impl_0x49 = ['Infineon', flags_generic, machine_args_generic] impl_0x4d = ['Motorola', flags_generic, machine_args_generic] impl_0x4e = ['NVIDIA', flags_generic, machine_args_generic] impl_0x50 = ['AppliedMicro', flags_generic, machine_args_generic] impl_0x51 = ['Qualcomm', flags_generic, machine_args_generic] impl_0x53 = ['Samsung', flags_generic, machine_args_generic] impl_0x56 = ['Marvell', flags_generic, machine_args_generic] impl_0x69 = ['Intel', flags_generic, machine_args_generic] impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic] impl_dpaa2 = ['NXP DPAA2', flags_dpaa2, machine_args_generic]
Quoted 7 lines
Quoted 2 lines
If we limit lookups to only machine names through primary part number we
would have a lot of repetitive defines.
Quoted 2 lines
Also, moving the arrays into the python script is not feasible as meson needs to reparse the standard out from the python script
I will probably need to write a PoC.
Yes. Please
Quoted 7 lines
Quoted 5 lines
Currently, config is split into three parts :
1. Implementor specific defines.
2. Micro-arch specific compiler flags.
3. Micro-arch specific defines.This is currently unreadable in my opinion.
Bit subjective.
If we want to keep all the fine grained control along with "native" /"cross" build, "distribution" build, cache line differences etc, makes it bit difficult.
But if you think, it can be improved. Please share patch, We are happy to review and test in the platforms we have.
Quoted 50 lines
Quoted 1 line
I think from a configurability point of view the above three are really
important for fine grained control.
I agree fine grain is required.
Quoted 18 lines
Thoughts?
Regards,
Pavan.Quoted 13 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Sunday, April 14, 2019 2:13 AM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: Pavan Nikhilesh Bhagavatula <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags13/04/2019 08:24, Jerin Jacob Kollanukkaran:
Quoted 2 lines
Quoted 2 lines
I was not confortable with this patch without being able to say why. Yesterday I spent more time to understand and see what may be
improved.
Quoted 21 lines
Quoted 19 lines
Quoted 6 lines
Quoted 2 lines
I agree it is late, so it won't block this patch for 19.05. Do you agree this file can be improved?
Moving to the all to static config file is an option but we lose the flexibility of runtime detecting the options and few of them are probing at runtime based on gcc versions and mcpu combination etc.
I think there is a misunderstanding.
I'm suggesting to symplify arrays by indexing only by machine name. It should not change the behaviour.Quoted 6 lines
I am not expert in meson area and not sure meson/python has better data strcture for this other than list/array combo. If Bruce has any feedback on this, then we will try to prototype it.
Quoted 2 lines
Please would you like to look at reworking during next cycle? Thanks
Re: [dpdk-dev] [PATCH v8 2/4] meson: add infra to support machine specific flags
14/04/2019 20:19, Jerin Jacob Kollanukkaran:
Quoted 10 lines
From: Thomas Monjalon <[email protected]>
Quoted 8 lines
14/04/2019 16:40, Pavan Nikhilesh Bhagavatula:
Quoted 3 lines
Hi Thomas,
There is no guarantee of primary part number (machine names) uniqueness
between implementors.
I think we don't speak the same language :) By machine name, I mean what we set in
RTE_MACHINE, like octeontx2.
Quoted 8 lines
As you know, The system probes "
implementor_id" and "implementor_pn" Values. There is nothing like machine name in meson and in order to keep Synergy with native build, we need to just follow, "implementor_id" and "implementor_pn". Now, it is possible to have "implemetor_id" to "implementor_pn" to machine name lookup but Unlike, "make" based Build system, meson supports supporting a lot ofmachines(like RTE_MACHINE), with that structure. So converting to another intermediate called "machine string" will have more overhead IMO.
We already have this string with RTE_MACHINE. You already set RTE_MACHINE based on id and pn. I don't see any overhead.
Anyway, no need to discuss it more without any real code.
PATCH v8 3/4 config: add thunderx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/arm/arm64_thunderx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linux-gcc | 1 + config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_thunderx2_linux_gcc create mode 120000 config/defconfig_arm64-thunderx2-linux-gcc create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/arm64_thunderx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xaf'
config/arm/meson.build +8 -1
@@ -54,6 +54,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -70,7 +76,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-thunderx2-linuxapp-gcc
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.21.0
PATCH v8 4/4 config: add octeontx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
--- config/arm/arm64_octeontx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-octeontx2-linux-gcc | 1 + config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_octeontx2_linux_gcc create mode 120000 config/defconfig_arm64-octeontx2-linux-gcc create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/arm64_octeontx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xb2'
config/arm/meson.build +8 -1
@@ -60,6 +60,12 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_IGB_UIO', false], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -77,7 +83,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-octeontx2-linuxapp-gcc
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=-mcpu=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.21.0
PATCH v9 1/4 mk: introduce helper to check valid compiler argument
In reply to [email protected]From: Jerin Jacob <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
---
Change history of this series:
v9 Changes:
- Remove compiler version check as it is now done using cc.has_argument().
v8 Changes:
- Remove redudant lists (rebase aritfacts). (Yongseok Koh)
v7 Changes:
- Updated cross compile config files align with
"build: improve pcap dependency handling" changeset to fix build issue with meson
- Some compiler needs the following depended patch to compile with meson
http://patches.dpdk.org/patch/52367/
v6 Changes:
- Rework to change the config files to sync with "mk: use linux and freebsd in config names"
- Fix the following error with latest gcc by fixing the mcpu type
cc1: error: switch -mcpu=armv8.2-a conflicts with -march=armv8-a switch
v5 Changes:
- Fix incorrect meson flag parsing(Phil Yang)
- Squash meson cross build patch(5/5) into configuration update patches for thunderx2(3/5) and octeontx2(4/5)(Thomas)
- Changed octeontx2's march as armv8-a and added the extension required instead of armv8-2a(Phil Yang)
- Improved rte_cc_has_argument() implementaion by removing the temp file(Thomas)
v4 Changes:
- Fix incorrect signoff marrvell -> marvell.
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
v2 Changes:
- Add meson build support.
mk/rte.helper.mk | 10 ++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -E $(1) -xc /dev/null 1>/dev/null 2>/dev/null && echo $(1)) +endef
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.21.0
PATCH v9 2/4 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE. Add support to set micro arch specific flags.
--- config/arm/meson.build | 67 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 34 deletions(-)
config/arm/meson.build +33 -34
@@ -7,25 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd05', ['-mcpu=cortex-a55']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], - ['0xd0b', ['-mcpu=cortex-a76']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file
@@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -145,20 +145,19 @@ else dpdk_conf.set(flag[0], flag[1]) endif endforeach - # Primary part number based mcpu flags are supported - # for gcc versions > 7 - if cc.version().version_compare( - '<7.0') or cmd_output.length() == 0 - if not meson.is_cross_build() and arm_force_native_march == true - impl_pn = 'native' - else - impl_pn = 'default' - endif - endif + foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif endforeach endif endforeach
Signature · 1 line
2.21.0
PATCH v9 3/4 config: add thunderx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/arm/arm64_thunderx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linux-gcc | 1 + config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_thunderx2_linux_gcc create mode 120000 config/defconfig_arm64-thunderx2-linux-gcc create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/arm64_thunderx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xaf'
config/arm/meson.build +8 -1
@@ -54,6 +54,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -70,7 +76,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-thunderx2-linuxapp-gcc
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.21.0
PATCH v9 4/4 config: add octeontx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
--- config/arm/arm64_octeontx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-octeontx2-linux-gcc | 1 + config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_octeontx2_linux_gcc create mode 120000 config/defconfig_arm64-octeontx2-linux-gcc create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/arm64_octeontx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xb2'
config/arm/meson.build +8 -1
@@ -60,6 +60,12 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_IGB_UIO', false], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -77,7 +83,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-octeontx2-linuxapp-gcc
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=-mcpu=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.21.0
PATCH v10 1/4 mk: introduce helper to check valid compiler argument
In reply to [email protected]From: Jerin Jacob <[email protected]>
Introduce rte_cc_has_argument() Makefile helper to check a given argument is support by the compiler.
Example Usage:
include $(RTE_SDK)/mk/rte.helper.mkMACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
This would allow adding -mcpu=octeontx2 in MACHINE_CFLAGS if it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.
This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
---
Change history of this series:
v10 Changes:
- Fix the following checkpatch warning
http://mails.dpdk.org/archives/test-report/2019-April/080453.html
v9 Changes:
- Remove compiler version check as it is now done using cc.has_argument().
v8 Changes:
- Remove redudant lists (rebase aritfacts). (Yongseok Koh)
v7 Changes:
- Updated cross compile config files align with
"build: improve pcap dependency handling" changeset to fix build issue with meson
- Some compiler needs the following depended patch to compile with meson
http://patches.dpdk.org/patch/52367/
v6 Changes:
- Rework to change the config files to sync with "mk: use linux and freebsd in config names"
- Fix the following error with latest gcc by fixing the mcpu type
cc1: error: switch -mcpu=armv8.2-a conflicts with -march=armv8-a switch
v5 Changes:
- Fix incorrect meson flag parsing(Phil Yang)
- Squash meson cross build patch(5/5) into configuration update patches for thunderx2(3/5) and octeontx2(4/5)(Thomas)
- Changed octeontx2's march as armv8-a and added the extension required instead of armv8-2a(Phil Yang)
- Improved rte_cc_has_argument() implementaion by removing the temp file(Thomas)
v4 Changes:
- Fix incorrect signoff marrvell -> marvell.
v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.
v2 Changes:
- Add meson build support.
---
mk/rte.helper.mk | 10 ++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 mk/rte.helper.mk
mk/rte.helper.mk new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) +# Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -E $(1) -xc /dev/null 1>/dev/null 2>/dev/null && echo $(1)) +endef
mk/target/generic/rte.vars.mk +11 -11
@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #
@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: #
Signature · 1 line
2.21.0
PATCH v10 2/4 meson: add infra to support machine specific flags
From: Pavan Nikhilesh <[email protected]>
Currently, RTE_* flags are set based on the implementer ID but there might be some micro arch specific differences from the same vendor eg. CACHE_LINESIZE. Add support to set micro arch specific flags.
--- config/arm/meson.build | 67 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 34 deletions(-)
config/arm/meson.build +33 -34
@@ -7,25 +7,6 @@ march_opt = '-march=@0@'.format(machine) arm_force_native_march = false -machine_args_generic = [ - ['default', ['-march=armv8-a+crc+crypto']], - ['native', ['-march=native']], - ['0xd03', ['-mcpu=cortex-a53']], - ['0xd04', ['-mcpu=cortex-a35']], - ['0xd05', ['-mcpu=cortex-a55']], - ['0xd07', ['-mcpu=cortex-a57']], - ['0xd08', ['-mcpu=cortex-a72']], - ['0xd09', ['-mcpu=cortex-a73']], - ['0xd0a', ['-mcpu=cortex-a75']], - ['0xd0b', ['-mcpu=cortex-a76']], -] -machine_args_cavium = [ - ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], - ['native', ['-march=native']], - ['0xa1', ['-mcpu=thunderxt88']], - ['0xa2', ['-mcpu=thunderxt81']], - ['0xa3', ['-mcpu=thunderxt83']]] - flags_common_default = [ # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) # to determine the best threshold in code. Refer to notes in source file
@@ -52,12 +33,10 @@ flags_generic = [ ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] flags_cavium = [ - ['RTE_MACHINE', '"thunderx"'], ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 96], - ['RTE_MAX_VFIO_GROUPS', 128], - ['RTE_USE_C11_MEM_MODEL', false]] + ['RTE_MAX_VFIO_GROUPS', 128]] flags_dpaa = [ ['RTE_MACHINE', '"dpaa"'], ['RTE_USE_C11_MEM_MODEL', true],
@@ -71,6 +50,27 @@ flags_dpaa2 = [ ['RTE_MAX_NUMA_NODES', 1], ['RTE_MAX_LCORE', 16], ['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false]] +flags_default_extra = [] +flags_thunderx_extra = [ + ['RTE_MACHINE', '"thunderx"'], + ['RTE_USE_C11_MEM_MODEL', false]] + +machine_args_generic = [ + ['default', ['-march=armv8-a+crc+crypto']], + ['native', ['-march=native']], + ['0xd03', ['-mcpu=cortex-a53']], + ['0xd04', ['-mcpu=cortex-a35']], + ['0xd07', ['-mcpu=cortex-a57']], + ['0xd08', ['-mcpu=cortex-a72']], + ['0xd09', ['-mcpu=cortex-a73']], + ['0xd0a', ['-mcpu=cortex-a75']]] + +machine_args_cavium = [ + ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']], + ['native', ['-march=native']], + ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], + ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -145,20 +145,19 @@ else dpdk_conf.set(flag[0], flag[1]) endif endforeach - # Primary part number based mcpu flags are supported - # for gcc versions > 7 - if cc.version().version_compare( - '<7.0') or cmd_output.length() == 0 - if not meson.is_cross_build() and arm_force_native_march == true - impl_pn = 'native' - else - impl_pn = 'default' - endif - endif + foreach marg: machine[2] if marg[0] == impl_pn - foreach f: marg[1] - machine_args += f + foreach flag: marg[1] + if cc.has_argument(flag) + machine_args += flag + endif + endforeach + # Apply any extra machine specific flags. + foreach flag: marg.get(2, flags_default_extra) + if flag.length() > 0 + dpdk_conf.set(flag[0], flag[1]) + endif endforeach endif endforeach
Signature · 1 line
2.21.0
PATCH v10 3/4 config: add thunderx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell thunderx2 SoC. Updated meson build to support Marvell thunderx2 SoC. Added meson cross compile target.
Product details are here:
https://www.marvell.com/server-processors/thunderx2-arm-processors/
--- config/arm/arm64_thunderx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-thunderx2-linux-gcc | 1 + config/defconfig_arm64-thunderx2-linuxapp-gcc | 11 ++++++ mk/machine/thunderx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_thunderx2_linux_gcc create mode 120000 config/defconfig_arm64-thunderx2-linux-gcc create mode 100644 config/defconfig_arm64-thunderx2-linuxapp-gcc create mode 100644 mk/machine/thunderx2/rte.vars.mk
config/arm/arm64_thunderx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xaf'
config/arm/meson.build +8 -1
@@ -54,6 +54,12 @@ flags_default_extra = [] flags_thunderx_extra = [ ['RTE_MACHINE', '"thunderx"'], ['RTE_USE_C11_MEM_MODEL', false]] +flags_thunderx2_extra = [ + ['RTE_MACHINE', '"thunderx2"'], + ['RTE_CACHE_LINE_SIZE', 64], + ['RTE_MAX_NUMA_NODES', 2], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -70,7 +76,8 @@ machine_args_cavium = [ ['native', ['-march=native']], ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], - ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra]] + ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-thunderx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-thunderx2-linuxapp-gcc
config/defconfig_arm64-thunderx2-linuxapp-gcc new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="thunderx2" + +CONFIG_RTE_CACHE_LINE_SIZE=64 +CONFIG_RTE_MAX_NUMA_NODES=2 +CONFIG_RTE_MAX_LCORE=256
mk/machine/thunderx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.1-a+crc+crypto) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=thunderx2t99)
Signature · 1 line
2.21.0
PATCH v10 4/4 config: add octeontx2 machine config
In reply to [email protected]From: Jerin Jacob <[email protected]>
Optimized configuration for Marvell octeontx2 SoC. Updated meson build to support Marvell octeontx2 SoC. Added meson cross build target for octeontx2.
--- config/arm/arm64_octeontx2_linux_gcc | 16 +++++++++ config/arm/meson.build | 9 ++++- config/defconfig_arm64-octeontx2-linux-gcc | 1 + config/defconfig_arm64-octeontx2-linuxapp-gcc | 18 ++++++++++ mk/machine/octeontx2/rte.vars.mk | 34 +++++++++++++++++++ 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 config/arm/arm64_octeontx2_linux_gcc create mode 120000 config/defconfig_arm64-octeontx2-linux-gcc create mode 100644 config/defconfig_arm64-octeontx2-linuxapp-gcc create mode 100644 mk/machine/octeontx2/rte.vars.mk
config/arm/arm64_octeontx2_linux_gcc new file +16 -0
@@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x43' +implementor_pn = '0xb2'
config/arm/meson.build +8 -1
@@ -60,6 +60,12 @@ flags_thunderx2_extra = [ ['RTE_MAX_NUMA_NODES', 2], ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true]] +flags_octeontx2_extra = [ + ['RTE_MACHINE', '"octeontx2"'], + ['RTE_MAX_NUMA_NODES', 1], + ['RTE_MAX_LCORE', 24], + ['RTE_EAL_IGB_UIO', false], + ['RTE_USE_C11_MEM_MODEL', true]] machine_args_generic = [ ['default', ['-march=armv8-a+crc+crypto']],
@@ -77,7 +83,8 @@ machine_args_cavium = [ ['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra], ['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra], ['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra], - ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra]] + ['0xaf', ['-mcpu=thunderx2t99'], flags_thunderx2_extra], + ['0xb2', ['-mcpu=octeontx2'], flags_octeontx2_extra]] ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
config/defconfig_arm64-octeontx2-linux-gcc new file +1 -0
@@ -0,0 +1 @@ +defconfig_arm64-octeontx2-linuxapp-gcc
config/defconfig_arm64-octeontx2-linuxapp-gcc new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +#include "defconfig_arm64-armv8a-linux-gcc" + +CONFIG_RTE_MACHINE="octeontx2" + +CONFIG_RTE_CACHE_LINE_SIZE=128 +CONFIG_RTE_MAX_NUMA_NODES=1 +CONFIG_RTE_MAX_LCORE=24 + +# Doesn't support NUMA +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n +CONFIG_RTE_LIBRTE_VHOST_NUMA=n + +# Recommend to use VFIO as co-processors needs SMMU/IOMMU +CONFIG_RTE_EAL_IGB_UIO=n
mk/machine/octeontx2/rte.vars.mk new file +34 -0
@@ -0,0 +1,34 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Marvell International Ltd +# + +# +# machine: +# +# - can define ARCH variable (overridden by cmdline value) +# - can define CROSS variable (overridden by cmdline value) +# - define MACHINE_CFLAGS variable (overridden by cmdline value) +# - define MACHINE_LDFLAGS variable (overridden by cmdline value) +# - define MACHINE_ASFLAGS variable (overridden by cmdline value) +# - can define CPU_CFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_LDFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - can define CPU_ASFLAGS variable (overridden by cmdline value) that +# overrides the one defined in arch. +# - may override any previously defined variable +# + +# ARCH = +# CROSS = +# MACHINE_CFLAGS = +# MACHINE_LDFLAGS = +# MACHINE_ASFLAGS = +# CPU_CFLAGS = +# CPU_LDFLAGS = +# CPU_ASFLAGS = + +include $(RTE_SDK)/mk/rte.helper.mk + +MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=-mcpu=armv8.2-a+crc+crypto+lse) +MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=octeontx2)
Signature · 1 line
2.21.0
Thomas Monjalon
Applied13/04/2019 22:19, [email protected]:
Quoted 10 lines
Change history of this series:
v10 Changes:
- Fix the following checkpatch warning
http://mails.dpdk.org/archives/test-report/2019-April/080453.htmlv9 Changes:
- Remove compiler version check as it is now done usingcc.has_argument().
Quoted 8 lines
v8 Changes:
- Remove redudant lists (rebase aritfacts). (Yongseok Koh)v7 Changes:
- Updated cross compile config files align with
"build: improve pcap dependency handling" changeset to fix build issue with meson
- Some compiler needs the following depended patch to compile with meson
http://patches.dpdk.org/patch/52367/
Applied, thanks
Quoted 113 lines
-----Original Message-----
From: Jerin Jacob Kollanukkaran <[email protected]>
Sent: Monday, February 25, 2019 2:11 AM
To: [email protected]
Cc: [email protected]; Phil Yang (Arm Technology China) <[email protected]>; [email protected]; [email protected]; Pavan Nikhilesh Bhagavatula <[email protected]>
Subject: [dpdk-dev] [PATCH v5 1/4] mk: introduce helper to check valid compiler argumentIntroduce
rte_cc_has_argument()Makefilehelper to check a given argument is support by the compiler.Example Usage:
include $(RTE_SDK)/mk/rte.helper.mk
MACHINE_CFLAGS+= $(callrte_cc_has_argument, -mcpu=octeontx2)This would allow adding -mcpu=octeontx2 in
MACHINE_CFLAGSif it is only supported by the compiler. The use case for such scheme is to enable the mcpu optimization if the compiler supports else it needs to compile the source code without any errors.This patch also moves inclusion of toolchain's rte.vars.mk to before the machine's rte.vars.mk inclusion to make correct CC available for the cross compile case.
Signed-off-by Jerin Jacob <[email protected]>Signed-off-by Pavan Nikhilesh <[email protected]>---
Change history of this series:
v2 Changes:
- Add meson build support.v3 Changes:
- Squash meson build support into config support for thunderx2/octeontx2.v4 Changes:
- Fix incorrect signoff marrvell -> marvell.v5 Changes:
- Fix incorrect meson flag parsing(Phil Yang)
- Squash meson cross build patch(5/5) into configuration update patches for thunderx2(3/5) and octeontx2(4/5)(Thomas)
- Changed octeontx2's march as armv8-a and added the extension required instead of armv8-2a(Phil Yang)
- Improvedrte_cc_has_argument()implementaion by removing the temp file(Thomas)--- mk/rte.helper.mk | 10 ++++++++++ mk/target/generic/rte.vars.mk | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644
mk/rte.helper.mkmk/rte.helper.mk new file mode 100644 index renamed from mk/rte.helper.mk +0
-0000000000..6e7fd03d7
mk/rte.helper.mk new file +10
-0@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Marvell +International Ltd + +# rte_cc_has_argument +# Usage: MACHINE_CFLAGS += $(call rte_cc_has_argument, -mno-avx512f) # +Return the argument if the argument is supported by the compiler. +# +define rte_cc_has_argument + $(shell $(CC) -E $(1) -xc /dev/null 1>/dev/null 2>/dev/null && echo +$(1)) endefmk/target/generic/rte.vars.mk +11
-12@@ -7,6 +7,17 @@ # executive environment. # +# +# toolchain: +# +# - define CC, LD, AR, AS, ... +# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) +# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) +# - may override any previously defined variable +# +include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk + # # machine: #@@ -45,17 +56,6 @@ endif # include $(RTE_SDK)/mk/arch/$(RTE_ARCH)/rte.vars.mk -# -# toolchain: -# -# - define CC, LD, AR, AS, ... -# - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value) -# - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value) -# - may override any previously defined variable -# -include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk - # # exec-env: # --
Quoted 1 line
2.20.1
For this patch set.
Thanks,
Phil