DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v3 0/4] aarch64 -> arm32 cross compilation support
@ 2020-04-15  9:03 Juraj Linkeš
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson Juraj Linkeš
                   ` (4 more replies)
  0 siblings, 5 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-15  9:03 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Add support for arm32 cross build in meson and add aarch64 -> arm32 cross build to Travis.

The patchset makes use of existing options in config/defconfig_arm-armv7a-linux-gcc a ports those to the meson build system.

Tested here: https://travis-ci.com/github/jlinkes/dpdk/builds/160337737

The aarch64 -> arm32 build currently fails in l3fwd example. The failure is currently being worked on by arm devs.

Juraj Linkeš (4):
  build: port arm32 options from make to meson
  build: add arm32 meson build flags
  build: add arm32 meson cross file
  ci: add aarch64 -> arm32 cross compiling jobs

 .ci/linux-build.sh              |   7 ++-
 .travis.yml                     |  19 ++++++
 config/arm/arm_armv7a_linux_gcc |  17 +++++
 config/arm/meson.build          | 135 ++++++++++++++++++++++------------------
 drivers/net/ark/meson.build     |   6 ++
 drivers/net/avp/meson.build     |   5 ++
 drivers/net/cxgbe/meson.build   |   6 ++
 drivers/net/e1000/meson.build   |   6 ++
 drivers/net/enic/meson.build    |   6 ++
 drivers/net/fm10k/meson.build   |   6 ++
 drivers/net/hinic/meson.build   |   6 ++
 drivers/net/i40e/meson.build    |   6 ++
 drivers/net/ionic/meson.build   |   6 ++
 drivers/net/ixgbe/meson.build   |   6 ++
 drivers/net/qede/meson.build    |   6 ++
 drivers/net/vmxnet3/meson.build |   6 ++
 lib/librte_vhost/meson.build    |   2 +-
 17 files changed, 188 insertions(+), 63 deletions(-)
 create mode 100644 config/arm/arm_armv7a_linux_gcc

-- 
2.11.0


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-15  9:03 [dpdk-dev] [PATCH v3 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
@ 2020-04-15  9:03 ` Juraj Linkeš
  2020-04-15 11:45   ` Luca Boccassi
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 2/4] build: add arm32 meson build flags Juraj Linkeš
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-15  9:03 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

config/defconfig_arm-armv7a-linux-gcc contains a number of
CONFIG_RTE_LIBRTE_ options. Implement those in applicable meson.build
files.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 drivers/net/ark/meson.build     | 6 ++++++
 drivers/net/avp/meson.build     | 5 +++++
 drivers/net/cxgbe/meson.build   | 6 ++++++
 drivers/net/e1000/meson.build   | 6 ++++++
 drivers/net/enic/meson.build    | 6 ++++++
 drivers/net/fm10k/meson.build   | 6 ++++++
 drivers/net/hinic/meson.build   | 6 ++++++
 drivers/net/i40e/meson.build    | 6 ++++++
 drivers/net/ionic/meson.build   | 6 ++++++
 drivers/net/ixgbe/meson.build   | 6 ++++++
 drivers/net/qede/meson.build    | 6 ++++++
 drivers/net/vmxnet3/meson.build | 6 ++++++
 lib/librte_vhost/meson.build    | 2 +-
 13 files changed, 72 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ark/meson.build b/drivers/net/ark/meson.build
index 99151bba1..8a875cc94 100644
--- a/drivers/net/ark/meson.build
+++ b/drivers/net/ark/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 sources = files('ark_ddm.c',
 	'ark_ethdev.c',
 	'ark_ethdev_rx.c',
diff --git a/drivers/net/avp/meson.build b/drivers/net/avp/meson.build
index 793bb185d..f9780ae45 100644
--- a/drivers/net/avp/meson.build
+++ b/drivers/net/avp/meson.build
@@ -4,7 +4,12 @@
 if not is_linux
 	build = false
 	reason = 'only supported on linux'
+elif dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
 endif
+
 allow_experimental_apis = true
 sources = files('avp_ethdev.c')
 install_headers('rte_avp_common.h', 'rte_avp_fifo.h')
diff --git a/drivers/net/cxgbe/meson.build b/drivers/net/cxgbe/meson.build
index 3992aba44..526a64fa2 100644
--- a/drivers/net/cxgbe/meson.build
+++ b/drivers/net/cxgbe/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 sources = files('cxgbe_ethdev.c',
 	'cxgbe_main.c',
 	'cxgbevf_ethdev.c',
diff --git a/drivers/net/e1000/meson.build b/drivers/net/e1000/meson.build
index d0901d377..90cffa7b1 100644
--- a/drivers/net/e1000/meson.build
+++ b/drivers/net/e1000/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 allow_experimental_apis = true
 
 subdir('base')
diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build
index e5eeb5667..69320757d 100644
--- a/drivers/net/enic/meson.build
+++ b/drivers/net/enic/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Cisco Systems, Inc.
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 # Experimental APIs used: rte_intr_ack
 cflags += ['-DALLOW_EXPERIMENTAL_API']
 sources = files(
diff --git a/drivers/net/fm10k/meson.build b/drivers/net/fm10k/meson.build
index 8f6e42392..f74778ae5 100644
--- a/drivers/net/fm10k/meson.build
+++ b/drivers/net/fm10k/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 allow_experimental_apis = true
 
 subdir('base')
diff --git a/drivers/net/hinic/meson.build b/drivers/net/hinic/meson.build
index bc7e24639..f43368793 100644
--- a/drivers/net/hinic/meson.build
+++ b/drivers/net/hinic/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Huawei Technologies Co., Ltd
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 subdir('base')
 objs = [base_objs]
 
diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
index b01babba1..7ace45951 100644
--- a/drivers/net/i40e/meson.build
+++ b/drivers/net/i40e/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 cflags += ['-DPF_DRIVER',
 	'-DVF_DRIVER',
 	'-DINTEGRATED_VF',
diff --git a/drivers/net/ionic/meson.build b/drivers/net/ionic/meson.build
index 1c6362d27..14ba0317b 100644
--- a/drivers/net/ionic/meson.build
+++ b/drivers/net/ionic/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
 # Copyright(c) 2019 Pensando
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 sources = files(
 	'ionic_mac_api.c',
 	'ionic_rx_filter.c',
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index 06cf42a4a..0c8442b8c 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS']
 
 allow_experimental_apis = true
diff --git a/drivers/net/qede/meson.build b/drivers/net/qede/meson.build
index 1755719f0..a357daf50 100644
--- a/drivers/net/qede/meson.build
+++ b/drivers/net/qede/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 allow_experimental_apis = true
 
 subdir('base')
diff --git a/drivers/net/vmxnet3/meson.build b/drivers/net/vmxnet3/meson.build
index a92bd2868..f14318a69 100644
--- a/drivers/net/vmxnet3/meson.build
+++ b/drivers/net/vmxnet3/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
+if dpdk_conf.has('RTE_ARCH_ARMv7')
+	build = false
+	reason = 'Not supported on 32-bit arm'
+	subdir_done()
+endif
+
 allow_experimental_apis = true
 sources += files(
 	'vmxnet3_ethdev.c',
diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
index ef7a5bced..44d8eda53 100644
--- a/lib/librte_vhost/meson.build
+++ b/lib/librte_vhost/meson.build
@@ -5,7 +5,7 @@ if not is_linux
 	build = false
 	reason = 'only supported on linux'
 endif
-if has_libnuma == 1
+if has_libnuma == 1 and not dpdk_conf.has('RTE_ARCH_ARMv7')
 	dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
 endif
 if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
-- 
2.11.0


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v3 2/4] build: add arm32 meson build flags
  2020-04-15  9:03 [dpdk-dev] [PATCH v3 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson Juraj Linkeš
@ 2020-04-15  9:03 ` Juraj Linkeš
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 3/4] build: add arm32 meson cross file Juraj Linkeš
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-15  9:03 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 135 +++++++++++++++++++++++++++----------------------
 1 file changed, 74 insertions(+), 61 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 6e75e6d97..746113849 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -34,6 +34,11 @@ flags_generic = [
 	['RTE_MAX_LCORE', 256],
 	['RTE_USE_C11_MEM_MODEL', true],
 	['RTE_CACHE_LINE_SIZE', 128]]
+flags_generic_arm32 = [
+	['RTE_MACHINE', '"armv7a"'],
+	['RTE_MAX_LCORE', 128],
+	['RTE_USE_C11_MEM_MODEL', false],
+	['RTE_CACHE_LINE_SIZE', 64]]
 flags_arm = [
 	['RTE_MACHINE', '"armv8a"'],
 	['RTE_MAX_LCORE', 16],
@@ -63,6 +68,10 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_default_arm32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -99,6 +108,9 @@ machine_args_generic = [
 	['0xd0b', ['-mcpu=cortex-a76']],
 	['0xd0c', ['-march=armv8.2-a+crc+crypto', '-mcpu=neoverse-n1'], flags_n1sdp_extra]]
 
+machine_args_generic_arm32 = [
+        ['default_arm32', ['-march=armv7-a', '-mtune=cortex-a9', '-mfpu=neon'], flags_default_arm32_extra]]
+
 machine_args_cavium = [
 	['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
 	['native', ['-march=native']],
@@ -114,6 +126,7 @@ machine_args_emag = [
 
 ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
 impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
+impl_generic_arm32 = ['Generic armv7', flags_generic_arm32, machine_args_generic_arm32]
 impl_0x41 = ['Arm', flags_arm, machine_args_generic]
 impl_0x42 = ['Broadcom', flags_generic, machine_args_generic]
 impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium]
@@ -136,74 +149,74 @@ if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
 else
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
+endif
 
-	machine = []
-	cmd_generic = ['generic', '', '', 'default', '']
-	cmd_output = cmd_generic # Set generic by default
-	machine_args = [] # Clear previous machine args
-	if arm_force_default_march and not meson.is_cross_build()
+machine = []
+machine_args = [] # Clear previous machine args
+cmd_generic = ['generic', '', '', 'default', '']
+cmd_output = cmd_generic # Set generic by default
+if arm_force_default_march and not meson.is_cross_build()
+	machine = impl_generic
+	impl_pn = 'default'
+elif not meson.is_cross_build()
+	# The script returns ['Implementer', 'Variant', 'Architecture',
+	# 'Primary Part number', 'Revision']
+	detect_vendor = find_program(join_paths(
+			meson.current_source_dir(), 'armv8_machine.py'))
+	cmd = run_command(detect_vendor.path())
+	if cmd.returncode() == 0
+		cmd_output = cmd.stdout().to_lower().strip().split(' ')
+	endif
+	# Set to generic if variable is not found
+	machine = get_variable('impl_' + cmd_output[0], ['generic'])
+	if machine[0] == 'generic'
 		machine = impl_generic
-		impl_pn = 'default'
-	elif not meson.is_cross_build()
-		# The script returns ['Implementer', 'Variant', 'Architecture',
-		# 'Primary Part number', 'Revision']
-		detect_vendor = find_program(join_paths(
-				meson.current_source_dir(), 'armv8_machine.py'))
-		cmd = run_command(detect_vendor.path())
-		if cmd.returncode() == 0
-			cmd_output = cmd.stdout().to_lower().strip().split(' ')
-		endif
-		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0], ['generic'])
-		if machine[0] == 'generic'
-			machine = impl_generic
-			cmd_output = cmd_generic
-		endif
-		impl_pn = cmd_output[3]
-		if arm_force_native_march == true
-			impl_pn = 'native'
-		endif
-	else
-		impl_id = meson.get_cross_property('implementor_id', 'generic')
-		impl_pn = meson.get_cross_property('implementor_pn', 'default')
-		machine = get_variable('impl_' + impl_id)
+		cmd_output = cmd_generic
 	endif
-
-	# Apply Common Defaults. These settings may be overwritten by machine
-	# settings later.
-	foreach flag: flags_common_default
-		if flag.length() > 0
-			dpdk_conf.set(flag[0], flag[1])
-		endif
-	endforeach
-
-	message('Implementer : ' + machine[0])
-	foreach flag: machine[1]
-		if flag.length() > 0
-			dpdk_conf.set(flag[0], flag[1])
-		endif
-	endforeach
-
-	foreach marg: machine[2]
-		if marg[0] == impl_pn
-			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
+	impl_pn = cmd_output[3]
+	if arm_force_native_march == true
+		impl_pn = 'native'
+	endif
+else
+	impl_id = meson.get_cross_property('implementor_id', 'generic')
+	impl_pn = meson.get_cross_property('implementor_pn', 'default')
+	machine = get_variable('impl_' + impl_id)
 endif
+
+# Apply Common Defaults. These settings may be overwritten by machine
+# settings later.
+foreach flag: flags_common_default
+	if flag.length() > 0
+		dpdk_conf.set(flag[0], flag[1])
+	endif
+endforeach
+
+message('Implementer : ' + machine[0])
+foreach flag: machine[1]
+	if flag.length() > 0
+		dpdk_conf.set(flag[0], flag[1])
+	endif
+endforeach
+
+foreach marg: machine[2]
+	if marg[0] == impl_pn
+		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])
+                                message('Setting flag: @0@: @1@'.format(flag[0], flag[1]))
+			endif
+		endforeach
+	endif
+endforeach
 message(machine_args)
 
 if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
-- 
2.11.0


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v3 3/4] build: add arm32 meson cross file
  2020-04-15  9:03 [dpdk-dev] [PATCH v3 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson Juraj Linkeš
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 2/4] build: add arm32 meson build flags Juraj Linkeš
@ 2020-04-15  9:03 ` Juraj Linkeš
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
  2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  4 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-15  9:03 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm_armv7a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm_armv7a_linux_gcc

diff --git a/config/arm/arm_armv7a_linux_gcc b/config/arm/arm_armv7a_linux_gcc
new file mode 100644
index 000000000..39566d2ea
--- /dev/null
+++ b/config/arm/arm_armv7a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'armv7-a'
+endian = 'little'
+
+[properties]
+implementor_id = 'generic_arm32'
+implementor_pn = 'default_arm32'
-- 
2.11.0


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v3 4/4] ci: add aarch64 -> arm32 cross compiling jobs
  2020-04-15  9:03 [dpdk-dev] [PATCH v3 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
                   ` (2 preceding siblings ...)
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 3/4] build: add arm32 meson cross file Juraj Linkeš
@ 2020-04-15  9:03 ` Juraj Linkeš
  2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  4 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-15  9:03 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d500c4c00..991e61d08 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$ARM" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm_armv7a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -47,7 +52,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror -Dexamples=all $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if [ "$AARCH64" != "1" ] && [ "$ARM" != "1" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index fd4f79cfc..6bf1d13da 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_packages: &arm_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _libabigail_build_packages: &libabigail_build_packages
   - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
 
@@ -124,6 +128,21 @@ jobs:
         packages:
           - *required_packages
           - *libabigail_build_packages
+  # aarch64 cross-compiling arm jobs
+  - env: DEF_LIB="shared" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
+  - env: DEF_LIB="static" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.11.0


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson Juraj Linkeš
@ 2020-04-15 11:45   ` Luca Boccassi
  2020-04-16  6:16     ` Juraj Linkeš
  0 siblings, 1 reply; 122+ messages in thread
From: Luca Boccassi @ 2020-04-15 11:45 UTC (permalink / raw)
  To: Juraj Linkeš,
	bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev

On Wed, 2020-04-15 at 11:03 +0200, Juraj Linkeš wrote:
> config/defconfig_arm-armv7a-linux-gcc contains a number of
> CONFIG_RTE_LIBRTE_ options. Implement those in applicable meson.build
> files.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  drivers/net/ark/meson.build     | 6 ++++++
>  drivers/net/avp/meson.build     | 5 +++++
>  drivers/net/cxgbe/meson.build   | 6 ++++++
>  drivers/net/e1000/meson.build   | 6 ++++++
>  drivers/net/enic/meson.build    | 6 ++++++
>  drivers/net/fm10k/meson.build   | 6 ++++++
>  drivers/net/hinic/meson.build   | 6 ++++++
>  drivers/net/i40e/meson.build    | 6 ++++++
>  drivers/net/ionic/meson.build   | 6 ++++++
>  drivers/net/ixgbe/meson.build   | 6 ++++++
>  drivers/net/qede/meson.build    | 6 ++++++
>  drivers/net/vmxnet3/meson.build | 6 ++++++
>  lib/librte_vhost/meson.build    | 2 +-
>  13 files changed, 72 insertions(+), 1 deletion(-)

This is disabling a lot of drivers that are building just fine on armv7
at the moment, and thus it is a backward-incomaptible change.

Eg:

https://packages.debian.org/sid/armhf/librte-pmd-cxgbe20.0/filelist

-- 
Luca Boccassi <bluca@debian.org>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-15 11:45   ` Luca Boccassi
@ 2020-04-16  6:16     ` Juraj Linkeš
  2020-04-16  8:53       ` Luca Boccassi
  0 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-16  6:16 UTC (permalink / raw)
  To: Luca Boccassi, bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang; +Cc: dev

Hi Luca,

> -----Original Message-----
> From: Luca Boccassi <bluca@debian.org>
> Sent: Wednesday, April 15, 2020 1:45 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to
> meson
> 
> On Wed, 2020-04-15 at 11:03 +0200, Juraj Linkeš wrote:
> > config/defconfig_arm-armv7a-linux-gcc contains a number of
> > CONFIG_RTE_LIBRTE_ options. Implement those in applicable meson.build
> > files.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> >  drivers/net/ark/meson.build     | 6 ++++++
> >  drivers/net/avp/meson.build     | 5 +++++
> >  drivers/net/cxgbe/meson.build   | 6 ++++++
> >  drivers/net/e1000/meson.build   | 6 ++++++
> >  drivers/net/enic/meson.build    | 6 ++++++
> >  drivers/net/fm10k/meson.build   | 6 ++++++
> >  drivers/net/hinic/meson.build   | 6 ++++++
> >  drivers/net/i40e/meson.build    | 6 ++++++
> >  drivers/net/ionic/meson.build   | 6 ++++++
> >  drivers/net/ixgbe/meson.build   | 6 ++++++
> >  drivers/net/qede/meson.build    | 6 ++++++
> >  drivers/net/vmxnet3/meson.build | 6 ++++++
> >  lib/librte_vhost/meson.build    | 2 +-
> >  13 files changed, 72 insertions(+), 1 deletion(-)
> 
> This is disabling a lot of drivers that are building just fine on armv7 at the
> moment, and thus it is a backward-incomaptible change.
> 
> Eg:
> 
> https://packages.debian.org/sid/armhf/librte-pmd-cxgbe20.0/filelist
> 
> --
> Luca Boccassi <bluca@debian.org>

I guess that means config/defconfig_arm-armv7a-linux-gcc is outdated? I've tried to build all of the drivers and they build except for ixgbe. Seeing as https://packages.debian.org/sid/armhf/libs/librte-pmd-ixgbe20.0 exists, would disabling ixgbe be also a backwards incompatible change?

Thanks,
Juraj

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-16  6:16     ` Juraj Linkeš
@ 2020-04-16  8:53       ` Luca Boccassi
  2020-04-16 11:25         ` Juraj Linkeš
  0 siblings, 1 reply; 122+ messages in thread
From: Luca Boccassi @ 2020-04-16  8:53 UTC (permalink / raw)
  To: Juraj Linkeš,
	bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev

On Thu, 2020-04-16 at 06:16 +0000, Juraj Linkeš wrote:
> Hi Luca,
> 
> > -----Original Message-----
> > From: Luca Boccassi <bluca@debian.org>
> > Sent: Wednesday, April 15, 2020 1:45 PM
> > To: Juraj Linkeš <juraj.linkes@pantheon.tech>; bruce.richardson@intel.com;
> > aconole@redhat.com; maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to
> > meson
> > 
> > On Wed, 2020-04-15 at 11:03 +0200, Juraj Linkeš wrote:
> > > config/defconfig_arm-armv7a-linux-gcc contains a number of
> > > CONFIG_RTE_LIBRTE_ options. Implement those in applicable meson.build
> > > files.
> > > 
> > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > ---
> > >  drivers/net/ark/meson.build     | 6 ++++++
> > >  drivers/net/avp/meson.build     | 5 +++++
> > >  drivers/net/cxgbe/meson.build   | 6 ++++++
> > >  drivers/net/e1000/meson.build   | 6 ++++++
> > >  drivers/net/enic/meson.build    | 6 ++++++
> > >  drivers/net/fm10k/meson.build   | 6 ++++++
> > >  drivers/net/hinic/meson.build   | 6 ++++++
> > >  drivers/net/i40e/meson.build    | 6 ++++++
> > >  drivers/net/ionic/meson.build   | 6 ++++++
> > >  drivers/net/ixgbe/meson.build   | 6 ++++++
> > >  drivers/net/qede/meson.build    | 6 ++++++
> > >  drivers/net/vmxnet3/meson.build | 6 ++++++
> > >  lib/librte_vhost/meson.build    | 2 +-
> > >  13 files changed, 72 insertions(+), 1 deletion(-)
> > 
> > This is disabling a lot of drivers that are building just fine on armv7 at the
> > moment, and thus it is a backward-incomaptible change.
> > 
> > Eg:
> > 
> > https://packages.debian.org/sid/armhf/librte-pmd-cxgbe20.0/filelist
> > 
> > --
> > Luca Boccassi <bluca@debian.org>
> 
> I guess that means config/defconfig_arm-armv7a-linux-gcc is outdated? I've tried to build all of the drivers and they build except for ixgbe. Seeing as https://packages.debian.org/sid/armhf/libs/librte-pmd-ixgbe20.0 exists, would disabling ixgbe be also a backwards incompatible change?
> 
> Thanks,
> Juraj

Yes. That defconfig is specific to the deprecated GNU Make build
system, which I haven't used in a long time. I do not know if anybody
keeps it updated.

What is the issue you are seeing with ixgbe?

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-16  8:53       ` Luca Boccassi
@ 2020-04-16 11:25         ` Juraj Linkeš
  2020-04-16 12:00           ` Luca Boccassi
  0 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-16 11:25 UTC (permalink / raw)
  To: Luca Boccassi, bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang; +Cc: dev



> -----Original Message-----
> From: Luca Boccassi <bluca@debian.org>
> Sent: Thursday, April 16, 2020 10:53 AM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to
> meson
> 
> On Thu, 2020-04-16 at 06:16 +0000, Juraj Linkeš wrote:
> > Hi Luca,
> >
> > > -----Original Message-----
> > > From: Luca Boccassi <bluca@debian.org>
> > > Sent: Wednesday, April 15, 2020 1:45 PM
> > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > bruce.richardson@intel.com; aconole@redhat.com;
> > > maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options
> > > from make to meson
> > >
> > > On Wed, 2020-04-15 at 11:03 +0200, Juraj Linkeš wrote:
> > > > config/defconfig_arm-armv7a-linux-gcc contains a number of
> > > > CONFIG_RTE_LIBRTE_ options. Implement those in applicable
> > > > meson.build files.
> > > >
> > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > ---
> > > >  drivers/net/ark/meson.build     | 6 ++++++
> > > >  drivers/net/avp/meson.build     | 5 +++++
> > > >  drivers/net/cxgbe/meson.build   | 6 ++++++
> > > >  drivers/net/e1000/meson.build   | 6 ++++++
> > > >  drivers/net/enic/meson.build    | 6 ++++++
> > > >  drivers/net/fm10k/meson.build   | 6 ++++++
> > > >  drivers/net/hinic/meson.build   | 6 ++++++
> > > >  drivers/net/i40e/meson.build    | 6 ++++++
> > > >  drivers/net/ionic/meson.build   | 6 ++++++
> > > >  drivers/net/ixgbe/meson.build   | 6 ++++++
> > > >  drivers/net/qede/meson.build    | 6 ++++++
> > > >  drivers/net/vmxnet3/meson.build | 6 ++++++
> > > >  lib/librte_vhost/meson.build    | 2 +-
> > > >  13 files changed, 72 insertions(+), 1 deletion(-)
> > >
> > > This is disabling a lot of drivers that are building just fine on
> > > armv7 at the moment, and thus it is a backward-incomaptible change.
> > >
> > > Eg:
> > >
> > > https://packages.debian.org/sid/armhf/librte-pmd-cxgbe20.0/filelist
> > >
> > > --
> > > Luca Boccassi <bluca@debian.org>
> >
> > I guess that means config/defconfig_arm-armv7a-linux-gcc is outdated? I've
> tried to build all of the drivers and they build except for ixgbe. Seeing as
> https://packages.debian.org/sid/armhf/libs/librte-pmd-ixgbe20.0 exists, would
> disabling ixgbe be also a backwards incompatible change?
> >
> > Thanks,
> > Juraj
> 
> Yes. That defconfig is specific to the deprecated GNU Make build system, which
> I haven't used in a long time. I do not know if anybody keeps it updated.
> 
> What is the issue you are seeing with ixgbe?

There are a lot of issues, please have a look here: https://travis-ci.com/github/jlinkes/dpdk/jobs/319965296#L1932

Juraj

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-16 11:25         ` Juraj Linkeš
@ 2020-04-16 12:00           ` Luca Boccassi
  2020-04-16 12:22             ` Juraj Linkeš
  0 siblings, 1 reply; 122+ messages in thread
From: Luca Boccassi @ 2020-04-16 12:00 UTC (permalink / raw)
  To: Juraj Linkeš,
	bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev

On Thu, 2020-04-16 at 11:25 +0000, Juraj Linkeš wrote:
> > -----Original Message-----
> > From: Luca Boccassi <bluca@debian.org>
> > Sent: Thursday, April 16, 2020 10:53 AM
> > To: Juraj Linkeš <juraj.linkes@pantheon.tech>; bruce.richardson@intel.com;
> > aconole@redhat.com; maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to
> > meson
> > 
> > On Thu, 2020-04-16 at 06:16 +0000, Juraj Linkeš wrote:
> > > Hi Luca,
> > > 
> > > > -----Original Message-----
> > > > From: Luca Boccassi <bluca@debian.org>
> > > > Sent: Wednesday, April 15, 2020 1:45 PM
> > > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > > bruce.richardson@intel.com; aconole@redhat.com;
> > > > maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > > > Cc: dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options
> > > > from make to meson
> > > > 
> > > > On Wed, 2020-04-15 at 11:03 +0200, Juraj Linkeš wrote:
> > > > > config/defconfig_arm-armv7a-linux-gcc contains a number of
> > > > > CONFIG_RTE_LIBRTE_ options. Implement those in applicable
> > > > > meson.build files.
> > > > > 
> > > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > > ---
> > > > >  drivers/net/ark/meson.build     | 6 ++++++
> > > > >  drivers/net/avp/meson.build     | 5 +++++
> > > > >  drivers/net/cxgbe/meson.build   | 6 ++++++
> > > > >  drivers/net/e1000/meson.build   | 6 ++++++
> > > > >  drivers/net/enic/meson.build    | 6 ++++++
> > > > >  drivers/net/fm10k/meson.build   | 6 ++++++
> > > > >  drivers/net/hinic/meson.build   | 6 ++++++
> > > > >  drivers/net/i40e/meson.build    | 6 ++++++
> > > > >  drivers/net/ionic/meson.build   | 6 ++++++
> > > > >  drivers/net/ixgbe/meson.build   | 6 ++++++
> > > > >  drivers/net/qede/meson.build    | 6 ++++++
> > > > >  drivers/net/vmxnet3/meson.build | 6 ++++++
> > > > >  lib/librte_vhost/meson.build    | 2 +-
> > > > >  13 files changed, 72 insertions(+), 1 deletion(-)
> > > > 
> > > > This is disabling a lot of drivers that are building just fine on
> > > > armv7 at the moment, and thus it is a backward-incomaptible change.
> > > > 
> > > > Eg:
> > > > 
> > > > https://packages.debian.org/sid/armhf/librte-pmd-cxgbe20.0/filelist
> > > > 
> > > > --
> > > > Luca Boccassi <bluca@debian.org>
> > > 
> > > I guess that means config/defconfig_arm-armv7a-linux-gcc is outdated? I've
> > tried to build all of the drivers and they build except for ixgbe. Seeing as
> > https://packages.debian.org/sid/armhf/libs/librte-pmd-ixgbe20.0 exists, would
> > disabling ixgbe be also a backwards incompatible change?
> > > Thanks,
> > > Juraj
> > 
> > Yes. That defconfig is specific to the deprecated GNU Make build system, which
> > I haven't used in a long time. I do not know if anybody keeps it updated.
> > 
> > What is the issue you are seeing with ixgbe?
> 
> There are a lot of issues, please have a look here: https://travis-ci.com/github/jlinkes/dpdk/jobs/319965296#L1932
> 
> Juraj

Given it worked fine in 19.11, I'd say they are either regressions or
issues in the travis setup itself.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-16 12:00           ` Luca Boccassi
@ 2020-04-16 12:22             ` Juraj Linkeš
  2020-04-16 15:11               ` Ruifeng Wang
  0 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-16 12:22 UTC (permalink / raw)
  To: Luca Boccassi, bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang; +Cc: dev



> -----Original Message-----
> From: Luca Boccassi <bluca@debian.org>
> Sent: Thursday, April 16, 2020 2:01 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to
> meson
> 
> On Thu, 2020-04-16 at 11:25 +0000, Juraj Linkeš wrote:
> > > -----Original Message-----
> > > From: Luca Boccassi <bluca@debian.org>
> > > Sent: Thursday, April 16, 2020 10:53 AM
> > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > bruce.richardson@intel.com; aconole@redhat.com;
> > > maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options
> > > from make to meson
> > >
> > > On Thu, 2020-04-16 at 06:16 +0000, Juraj Linkeš wrote:
> > > > Hi Luca,
> > > >
> > > > > -----Original Message-----
> > > > > From: Luca Boccassi <bluca@debian.org>
> > > > > Sent: Wednesday, April 15, 2020 1:45 PM
> > > > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > > > bruce.richardson@intel.com; aconole@redhat.com;
> > > > > maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > > > > Cc: dev@dpdk.org
> > > > > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options
> > > > > from make to meson
> > > > >
> > > > > On Wed, 2020-04-15 at 11:03 +0200, Juraj Linkeš wrote:
> > > > > > config/defconfig_arm-armv7a-linux-gcc contains a number of
> > > > > > CONFIG_RTE_LIBRTE_ options. Implement those in applicable
> > > > > > meson.build files.
> > > > > >
> > > > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > > > ---
> > > > > >  drivers/net/ark/meson.build     | 6 ++++++
> > > > > >  drivers/net/avp/meson.build     | 5 +++++
> > > > > >  drivers/net/cxgbe/meson.build   | 6 ++++++
> > > > > >  drivers/net/e1000/meson.build   | 6 ++++++
> > > > > >  drivers/net/enic/meson.build    | 6 ++++++
> > > > > >  drivers/net/fm10k/meson.build   | 6 ++++++
> > > > > >  drivers/net/hinic/meson.build   | 6 ++++++
> > > > > >  drivers/net/i40e/meson.build    | 6 ++++++
> > > > > >  drivers/net/ionic/meson.build   | 6 ++++++
> > > > > >  drivers/net/ixgbe/meson.build   | 6 ++++++
> > > > > >  drivers/net/qede/meson.build    | 6 ++++++
> > > > > >  drivers/net/vmxnet3/meson.build | 6 ++++++
> > > > > >  lib/librte_vhost/meson.build    | 2 +-
> > > > > >  13 files changed, 72 insertions(+), 1 deletion(-)
> > > > >
> > > > > This is disabling a lot of drivers that are building just fine
> > > > > on
> > > > > armv7 at the moment, and thus it is a backward-incomaptible change.
> > > > >
> > > > > Eg:
> > > > >
> > > > > https://packages.debian.org/sid/armhf/librte-pmd-cxgbe20.0/filel
> > > > > ist
> > > > >
> > > > > --
> > > > > Luca Boccassi <bluca@debian.org>
> > > >
> > > > I guess that means config/defconfig_arm-armv7a-linux-gcc is
> > > > outdated? I've
> > > tried to build all of the drivers and they build except for ixgbe.
> > > Seeing as
> > > https://packages.debian.org/sid/armhf/libs/librte-pmd-ixgbe20.0
> > > exists, would disabling ixgbe be also a backwards incompatible change?
> > > > Thanks,
> > > > Juraj
> > >
> > > Yes. That defconfig is specific to the deprecated GNU Make build
> > > system, which I haven't used in a long time. I do not know if anybody keeps it
> updated.
> > >
> > > What is the issue you are seeing with ixgbe?
> >
> > There are a lot of issues, please have a look here:
> > https://travis-ci.com/github/jlinkes/dpdk/jobs/319965296#L1932
> >
> > Juraj
> 
> Given it worked fine in 19.11, I'd say they are either regressions or issues in the
> travis setup itself.

I'd wager it's because of https://github.com/DPDK/dpdk/commit/41b059a20215284e8aa618d2ce1e2a803e64c1d0#diff-f44e12b03243963c21a46a37392568db

When I don't build with ixgbe_rxtx_vec_neon.c it builds fine, indicating real problems with the code.

Ruifeng, would you please take a look at the failures here? https://travis-ci.com/github/jlinkes/dpdk/jobs/319965296#L1932

Juraj

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson
  2020-04-16 12:22             ` Juraj Linkeš
@ 2020-04-16 15:11               ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-04-16 15:11 UTC (permalink / raw)
  To: Juraj Linkeš,
	Luca Boccassi, bruce.richardson, aconole, maicolgabriel
  Cc: dev, Honnappa Nagarahalli, Gavin Hu, nd


> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Thursday, April 16, 2020 8:22 PM
> To: Luca Boccassi <bluca@debian.org>; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com; Ruifeng Wang
> <Ruifeng.Wang@arm.com>
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make
> to meson
> 
> 
> 
> > -----Original Message-----
> > From: Luca Boccassi <bluca@debian.org>
> > Sent: Thursday, April 16, 2020 2:01 PM
> > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > bruce.richardson@intel.com; aconole@redhat.com;
> > maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from
> > make to meson
> >
> > On Thu, 2020-04-16 at 11:25 +0000, Juraj Linkeš wrote:
> > > > -----Original Message-----
> > > > From: Luca Boccassi <bluca@debian.org>
> > > > Sent: Thursday, April 16, 2020 10:53 AM
> > > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > > bruce.richardson@intel.com; aconole@redhat.com;
> > > > maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > > > Cc: dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32 options
> > > > from make to meson
> > > >
> > > > On Thu, 2020-04-16 at 06:16 +0000, Juraj Linkeš wrote:
> > > > > Hi Luca,
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Luca Boccassi <bluca@debian.org>
> > > > > > Sent: Wednesday, April 15, 2020 1:45 PM
> > > > > > To: Juraj Linkeš <juraj.linkes@pantheon.tech>;
> > > > > > bruce.richardson@intel.com; aconole@redhat.com;
> > > > > > maicolgabriel@hotmail.com; Ruifeng.Wang@arm.com
> > > > > > Cc: dev@dpdk.org
> > > > > > Subject: Re: [dpdk-dev] [PATCH v3 1/4] build: port arm32
> > > > > > options from make to meson
> > > > > >
> > > > > > On Wed, 2020-04-15 at 11:03 +0200, Juraj Linkeš wrote:
> > > > > > > config/defconfig_arm-armv7a-linux-gcc contains a number of
> > > > > > > CONFIG_RTE_LIBRTE_ options. Implement those in applicable
> > > > > > > meson.build files.
> > > > > > >
> > > > > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > > > > ---
> > > > > > >  drivers/net/ark/meson.build     | 6 ++++++
> > > > > > >  drivers/net/avp/meson.build     | 5 +++++
> > > > > > >  drivers/net/cxgbe/meson.build   | 6 ++++++
> > > > > > >  drivers/net/e1000/meson.build   | 6 ++++++
> > > > > > >  drivers/net/enic/meson.build    | 6 ++++++
> > > > > > >  drivers/net/fm10k/meson.build   | 6 ++++++
> > > > > > >  drivers/net/hinic/meson.build   | 6 ++++++
> > > > > > >  drivers/net/i40e/meson.build    | 6 ++++++
> > > > > > >  drivers/net/ionic/meson.build   | 6 ++++++
> > > > > > >  drivers/net/ixgbe/meson.build   | 6 ++++++
> > > > > > >  drivers/net/qede/meson.build    | 6 ++++++
> > > > > > >  drivers/net/vmxnet3/meson.build | 6 ++++++
> > > > > > >  lib/librte_vhost/meson.build    | 2 +-
> > > > > > >  13 files changed, 72 insertions(+), 1 deletion(-)
> > > > > >
> > > > > > This is disabling a lot of drivers that are building just fine
> > > > > > on
> > > > > > armv7 at the moment, and thus it is a backward-incomaptible
> change.
> > > > > >
> > > > > > Eg:
> > > > > >
> > > > > > https://packages.debian.org/sid/armhf/librte-pmd-cxgbe20.0/fil
> > > > > > el
> > > > > > ist
> > > > > >
> > > > > > --
> > > > > > Luca Boccassi <bluca@debian.org>
> > > > >
> > > > > I guess that means config/defconfig_arm-armv7a-linux-gcc is
> > > > > outdated? I've
> > > > tried to build all of the drivers and they build except for ixgbe.
> > > > Seeing as
> > > > https://packages.debian.org/sid/armhf/libs/librte-pmd-ixgbe20.0
> > > > exists, would disabling ixgbe be also a backwards incompatible change?
> > > > > Thanks,
> > > > > Juraj
> > > >
> > > > Yes. That defconfig is specific to the deprecated GNU Make build
> > > > system, which I haven't used in a long time. I do not know if
> > > > anybody keeps it
> > updated.
> > > >
> > > > What is the issue you are seeing with ixgbe?
> > >
> > > There are a lot of issues, please have a look here:
> > > https://travis-ci.com/github/jlinkes/dpdk/jobs/319965296#L1932
> > >
> > > Juraj
> >
> > Given it worked fine in 19.11, I'd say they are either regressions or
> > issues in the travis setup itself.
> 
> I'd wager it's because of
> https://github.com/DPDK/dpdk/commit/41b059a20215284e8aa618d2ce1e2a
> 803e64c1d0#diff-f44e12b03243963c21a46a37392568db
> 
> When I don't build with ixgbe_rxtx_vec_neon.c it builds fine, indicating real
> problems with the code.
> 
> Ruifeng, would you please take a look at the failures here? https://travis-
> ci.com/github/jlinkes/dpdk/jobs/319965296#L1932
> 
Yes. I see couple of problems with ixgbe_rxtx_vec_neon.c when building for AArch32. 
I will submit patches to fix these.

Thanks.
/Ruifeng
> Juraj

^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support
  2020-04-15  9:03 [dpdk-dev] [PATCH v3 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
                   ` (3 preceding siblings ...)
  2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
@ 2020-04-29 10:24 ` Juraj Linkeš
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
                     ` (4 more replies)
  4 siblings, 5 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-29 10:24 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Add support for arm32 cross build in meson
and add aarch64 -> arm32 cross build to Travis.

The patchset makes use of existing options in
config/defconfig_arm-armv7a-linux-gcc a ports those to the meson build
system.

The aarch64 -> arm32 build currently fails in l3fwd example and ixgbe
driver without series 9609:
http://patches.dpdk.org/project/dpdk/list/?series=9609

Tested here after rebasing on top of series 9609:
https://travis-ci.com/github/jlinkes/dpdk/builds/162648822

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying
failures.

Juraj Linkeš (4):
  build: disable vhost NUMA for arm32
  build: add arm32 meson build flags
  build: add arm32 meson cross file
  ci: add aarch64 -> arm32 cross compiling jobs

 .ci/linux-build.sh              |   7 +-
 .travis.yml                     |  19 +++++
 config/arm/arm_armv7a_linux_gcc |  17 ++++
 config/arm/meson.build          | 135 +++++++++++++++++---------------
 lib/librte_vhost/meson.build    |   2 +-
 5 files changed, 117 insertions(+), 63 deletions(-)
 create mode 100644 config/arm/arm_armv7a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v4 1/4] build: disable vhost NUMA for arm32
  2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
@ 2020-04-29 10:24   ` Juraj Linkeš
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 2/4] build: add arm32 meson build flags Juraj Linkeš
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-29 10:24 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

config/defconfig_arm-armv7a-linux-gcc specifies that
RTE_LIBRTE_VHOST_NUMA is not supported on arm32, so disable it in meson.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 lib/librte_vhost/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
index f80632848..977335c4f 100644
--- a/lib/librte_vhost/meson.build
+++ b/lib/librte_vhost/meson.build
@@ -5,7 +5,7 @@ if not is_linux
 	build = false
 	reason = 'only supported on linux'
 endif
-if has_libnuma == 1
+if has_libnuma == 1 and not dpdk_conf.has('RTE_ARCH_ARMv7')
 	dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
 endif
 if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v4 2/4] build: add arm32 meson build flags
  2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
@ 2020-04-29 10:24   ` Juraj Linkeš
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 3/4] build: add arm32 meson cross file Juraj Linkeš
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-29 10:24 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc.
Omit driver flags which can be built on arm32.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 135 ++++++++++++++++++++++-------------------
 1 file changed, 74 insertions(+), 61 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 6e75e6d97..746113849 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -34,6 +34,11 @@ flags_generic = [
 	['RTE_MAX_LCORE', 256],
 	['RTE_USE_C11_MEM_MODEL', true],
 	['RTE_CACHE_LINE_SIZE', 128]]
+flags_generic_arm32 = [
+	['RTE_MACHINE', '"armv7a"'],
+	['RTE_MAX_LCORE', 128],
+	['RTE_USE_C11_MEM_MODEL', false],
+	['RTE_CACHE_LINE_SIZE', 64]]
 flags_arm = [
 	['RTE_MACHINE', '"armv8a"'],
 	['RTE_MAX_LCORE', 16],
@@ -63,6 +68,10 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_default_arm32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -99,6 +108,9 @@ machine_args_generic = [
 	['0xd0b', ['-mcpu=cortex-a76']],
 	['0xd0c', ['-march=armv8.2-a+crc+crypto', '-mcpu=neoverse-n1'], flags_n1sdp_extra]]
 
+machine_args_generic_arm32 = [
+        ['default_arm32', ['-march=armv7-a', '-mtune=cortex-a9', '-mfpu=neon'], flags_default_arm32_extra]]
+
 machine_args_cavium = [
 	['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
 	['native', ['-march=native']],
@@ -114,6 +126,7 @@ machine_args_emag = [
 
 ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
 impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
+impl_generic_arm32 = ['Generic armv7', flags_generic_arm32, machine_args_generic_arm32]
 impl_0x41 = ['Arm', flags_arm, machine_args_generic]
 impl_0x42 = ['Broadcom', flags_generic, machine_args_generic]
 impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium]
@@ -136,74 +149,74 @@ if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
 else
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
+endif
 
-	machine = []
-	cmd_generic = ['generic', '', '', 'default', '']
-	cmd_output = cmd_generic # Set generic by default
-	machine_args = [] # Clear previous machine args
-	if arm_force_default_march and not meson.is_cross_build()
+machine = []
+machine_args = [] # Clear previous machine args
+cmd_generic = ['generic', '', '', 'default', '']
+cmd_output = cmd_generic # Set generic by default
+if arm_force_default_march and not meson.is_cross_build()
+	machine = impl_generic
+	impl_pn = 'default'
+elif not meson.is_cross_build()
+	# The script returns ['Implementer', 'Variant', 'Architecture',
+	# 'Primary Part number', 'Revision']
+	detect_vendor = find_program(join_paths(
+			meson.current_source_dir(), 'armv8_machine.py'))
+	cmd = run_command(detect_vendor.path())
+	if cmd.returncode() == 0
+		cmd_output = cmd.stdout().to_lower().strip().split(' ')
+	endif
+	# Set to generic if variable is not found
+	machine = get_variable('impl_' + cmd_output[0], ['generic'])
+	if machine[0] == 'generic'
 		machine = impl_generic
-		impl_pn = 'default'
-	elif not meson.is_cross_build()
-		# The script returns ['Implementer', 'Variant', 'Architecture',
-		# 'Primary Part number', 'Revision']
-		detect_vendor = find_program(join_paths(
-				meson.current_source_dir(), 'armv8_machine.py'))
-		cmd = run_command(detect_vendor.path())
-		if cmd.returncode() == 0
-			cmd_output = cmd.stdout().to_lower().strip().split(' ')
-		endif
-		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0], ['generic'])
-		if machine[0] == 'generic'
-			machine = impl_generic
-			cmd_output = cmd_generic
-		endif
-		impl_pn = cmd_output[3]
-		if arm_force_native_march == true
-			impl_pn = 'native'
-		endif
-	else
-		impl_id = meson.get_cross_property('implementor_id', 'generic')
-		impl_pn = meson.get_cross_property('implementor_pn', 'default')
-		machine = get_variable('impl_' + impl_id)
+		cmd_output = cmd_generic
 	endif
-
-	# Apply Common Defaults. These settings may be overwritten by machine
-	# settings later.
-	foreach flag: flags_common_default
-		if flag.length() > 0
-			dpdk_conf.set(flag[0], flag[1])
-		endif
-	endforeach
-
-	message('Implementer : ' + machine[0])
-	foreach flag: machine[1]
-		if flag.length() > 0
-			dpdk_conf.set(flag[0], flag[1])
-		endif
-	endforeach
-
-	foreach marg: machine[2]
-		if marg[0] == impl_pn
-			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
+	impl_pn = cmd_output[3]
+	if arm_force_native_march == true
+		impl_pn = 'native'
+	endif
+else
+	impl_id = meson.get_cross_property('implementor_id', 'generic')
+	impl_pn = meson.get_cross_property('implementor_pn', 'default')
+	machine = get_variable('impl_' + impl_id)
 endif
+
+# Apply Common Defaults. These settings may be overwritten by machine
+# settings later.
+foreach flag: flags_common_default
+	if flag.length() > 0
+		dpdk_conf.set(flag[0], flag[1])
+	endif
+endforeach
+
+message('Implementer : ' + machine[0])
+foreach flag: machine[1]
+	if flag.length() > 0
+		dpdk_conf.set(flag[0], flag[1])
+	endif
+endforeach
+
+foreach marg: machine[2]
+	if marg[0] == impl_pn
+		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])
+                                message('Setting flag: @0@: @1@'.format(flag[0], flag[1]))
+			endif
+		endforeach
+	endif
+endforeach
 message(machine_args)
 
 if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v4 3/4] build: add arm32 meson cross file
  2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 2/4] build: add arm32 meson build flags Juraj Linkeš
@ 2020-04-29 10:24   ` Juraj Linkeš
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
  2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  4 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-29 10:24 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Use arm-linux-gnueabihf- toolset which comes with standard packages on
most used systems, such as Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm_armv7a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm_armv7a_linux_gcc

diff --git a/config/arm/arm_armv7a_linux_gcc b/config/arm/arm_armv7a_linux_gcc
new file mode 100644
index 000000000..39566d2ea
--- /dev/null
+++ b/config/arm/arm_armv7a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'armv7-a'
+endian = 'little'
+
+[properties]
+implementor_id = 'generic_arm32'
+implementor_pn = 'default_arm32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs
  2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
                     ` (2 preceding siblings ...)
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 3/4] build: add arm32 meson cross file Juraj Linkeš
@ 2020-04-29 10:24   ` Juraj Linkeš
  2020-05-05 18:56     ` Aaron Conole
  2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  4 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-04-29 10:24 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel, Ruifeng.Wang
  Cc: dev, Juraj Linkeš

Add two jobs (static and shared libs), both building on aarch64 and
producing 32 bit arm binaries. Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..3cc3d8bac 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$ARM" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm_armv7a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if [ "$AARCH64" != "1" ] && [ "$ARM" != "1" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index 2d2292ff6..63939d2c5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_packages: &arm_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _libabigail_build_packages: &libabigail_build_packages
   - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
 
@@ -124,6 +128,21 @@ jobs:
         packages:
           - *required_packages
           - *libabigail_build_packages
+  # aarch64 cross-compiling arm jobs
+  - env: DEF_LIB="shared" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
+  - env: DEF_LIB="static" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
@ 2020-05-05 18:56     ` Aaron Conole
  2020-05-11  7:05       ` Juraj Linkeš
  0 siblings, 1 reply; 122+ messages in thread
From: Aaron Conole @ 2020-05-05 18:56 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: bruce.richardson, maicolgabriel, Ruifeng.Wang, dev

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> Add two jobs (static and shared libs), both building on aarch64 and
> producing 32 bit arm binaries. Do not run tests in these jobs.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  .ci/linux-build.sh |  7 ++++++-
>  .travis.yml        | 19 +++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index d079801d7..3cc3d8bac 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
>      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
>  fi
>  
> +if [ "$ARM" = "1" ]; then
> +    # convert the arch specifier
> +    OPTS="$OPTS --cross-file config/arm/arm_armv7a_linux_gcc"
> +fi
> +
>  if [ "$BUILD_DOCS" = "1" ]; then
>      OPTS="$OPTS -Denable_docs=true"
>  fi
> @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
>  meson build --werror $OPTS
>  ninja -C build
>  
> -if [ "$AARCH64" != "1" ]; then
> +if [ "$AARCH64" != "1" ] && [ "$ARM" != "1" ]; then

Probably we should rewrite this check so that it is affirmative on
x86_64 - since there are outstanding proposals for PPC as well (and I
forsee the check to run test-null.sh getting bigger).  WDYT?

>      devtools/test-null.sh
>  fi
>  
> diff --git a/.travis.yml b/.travis.yml
> index 2d2292ff6..63939d2c5 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
>    - *required_packages
>    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
>  
> +_arm_packages: &arm_packages
> +  - *required_packages
> +  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
> +
>  _libabigail_build_packages: &libabigail_build_packages
>    - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
>  
> @@ -124,6 +128,21 @@ jobs:
>          packages:
>            - *required_packages
>            - *libabigail_build_packages
> +  # aarch64 cross-compiling arm jobs
> +  - env: DEF_LIB="shared" ARM=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_packages
> +  - env: DEF_LIB="static" ARM=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_packages
>    # aarch64 clang jobs
>    - env: DEF_LIB="static"
>      arch: arm64


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs
  2020-05-05 18:56     ` Aaron Conole
@ 2020-05-11  7:05       ` Juraj Linkeš
  0 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-05-11  7:05 UTC (permalink / raw)
  To: Aaron Conole; +Cc: bruce.richardson, maicolgabriel, Ruifeng.Wang, dev



> -----Original Message-----
> From: Aaron Conole <aconole@redhat.com>
> Sent: Tuesday, May 5, 2020 8:56 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: bruce.richardson@intel.com; maicolgabriel@hotmail.com;
> Ruifeng.Wang@arm.com; dev@dpdk.org
> Subject: Re: [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs
> 
> Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
> 
> > Add two jobs (static and shared libs), both building on aarch64 and
> > producing 32 bit arm binaries. Do not run tests in these jobs.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> >  .ci/linux-build.sh |  7 ++++++-
> >  .travis.yml        | 19 +++++++++++++++++++
> >  2 files changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > d079801d7..3cc3d8bac 100755
> > --- a/.ci/linux-build.sh
> > +++ b/.ci/linux-build.sh
> > @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
> >      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> >  fi
> >
> > +if [ "$ARM" = "1" ]; then
> > +    # convert the arch specifier
> > +    OPTS="$OPTS --cross-file config/arm/arm_armv7a_linux_gcc"
> > +fi
> > +
> >  if [ "$BUILD_DOCS" = "1" ]; then
> >      OPTS="$OPTS -Denable_docs=true"
> >  fi
> > @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
> >  meson build --werror $OPTS
> >  ninja -C build
> >
> > -if [ "$AARCH64" != "1" ]; then
> > +if [ "$AARCH64" != "1" ] && [ "$ARM" != "1" ]; then
> 
> Probably we should rewrite this check so that it is affirmative on
> x86_64 - since there are outstanding proposals for PPC as well (and I forsee the
> check to run test-null.sh getting bigger).  WDYT?

Well, my patchset introduces cross compilation from aarch64 -> arm32, so if we only check for x86_64 it would try to run arm32 binaries on aarch64 when doing this cross compilation. Maybe we could do a check using something like file ${testpmd} | grep $(uname -m) in test-null.sh?

> >      devtools/test-null.sh
> >  fi
> >
> > diff --git a/.travis.yml b/.travis.yml index 2d2292ff6..63939d2c5
> > 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
> >    - *required_packages
> >    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross,
> > pkg-config-aarch64-linux-gnu]
> >
> > +_arm_packages: &arm_packages
> > +  - *required_packages
> > +  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross,
> > +pkg-config-arm-linux-gnueabihf]
> > +
> >  _libabigail_build_packages: &libabigail_build_packages
> >    - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
> >
> > @@ -124,6 +128,21 @@ jobs:
> >          packages:
> >            - *required_packages
> >            - *libabigail_build_packages
> > +  # aarch64 cross-compiling arm jobs
> > +  - env: DEF_LIB="shared" ARM=1
> > +    arch: arm64
> > +    compiler: gcc
> > +    addons:
> > +      apt:
> > +        packages:
> > +          - *arm_packages
> > +  - env: DEF_LIB="static" ARM=1
> > +    arch: arm64
> > +    compiler: gcc
> > +    addons:
> > +      apt:
> > +        packages:
> > +          - *arm_packages
> >    # aarch64 clang jobs
> >    - env: DEF_LIB="static"
> >      arch: arm64


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support
  2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
                     ` (3 preceding siblings ...)
  2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
@ 2020-07-06  8:28   ` Juraj Linkeš
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
                       ` (4 more replies)
  4 siblings, 5 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-07-06  8:28 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, Juraj Linkeš

Add support for arm32 cross build in meson
and add aarch64 -> arm32 cross build to Travis.

The patchset makes use of existing options in
config/defconfig_arm-armv7a-linux-gcc a ports those to the meson build
system.

The aarch64 -> arm32 build currently fails in l3fwd example and ixgbe
driver without series 9609:
http://patches.dpdk.org/project/dpdk/list/?series=9609

Tested here after rebasing on top of series 9609:
https://travis-ci.com/github/jlinkes/dpdk/builds/162648822

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying
failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

Juraj Linkeš (4):
  build: disable vhost NUMA for arm32
  build: add arm32 meson build flags
  build: add arm32 meson cross file
  ci: add aarch64 -> arm32 cross compiling jobs

 .ci/linux-build.sh              |   7 +-
 .travis.yml                     |  19 +++++
 config/arm/arm_armv7a_linux_gcc |  17 ++++
 config/arm/meson.build          | 135 +++++++++++++++++---------------
 lib/librte_vhost/meson.build    |   2 +-
 5 files changed, 117 insertions(+), 63 deletions(-)
 create mode 100644 config/arm/arm_armv7a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v5 1/4] build: disable vhost NUMA for arm32
  2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
@ 2020-07-06  8:28     ` Juraj Linkeš
  2020-07-06  8:56       ` David Marchand
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags Juraj Linkeš
                       ` (3 subsequent siblings)
  4 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-07-06  8:28 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, Juraj Linkeš

config/defconfig_arm-armv7a-linux-gcc specifies that
RTE_LIBRTE_VHOST_NUMA is not supported on arm32, so disable it in meson.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 lib/librte_vhost/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
index 882a0eaf4..73dc05f86 100644
--- a/lib/librte_vhost/meson.build
+++ b/lib/librte_vhost/meson.build
@@ -5,7 +5,7 @@ if not is_linux
 	build = false
 	reason = 'only supported on linux'
 endif
-if has_libnuma == 1
+if has_libnuma == 1 and not dpdk_conf.has('RTE_ARCH_ARMv7')
 	dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
 endif
 if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
  2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
@ 2020-07-06  8:28     ` Juraj Linkeš
  2020-07-06  9:11       ` Jerin Jacob
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 3/4] build: add arm32 meson cross file Juraj Linkeš
                       ` (2 subsequent siblings)
  4 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-07-06  8:28 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, Juraj Linkeš

Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc.
Omit driver flags which can be built on arm32.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 135 ++++++++++++++++++++++-------------------
 1 file changed, 74 insertions(+), 61 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b02fc95d9 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -34,6 +34,11 @@ flags_generic = [
 	['RTE_MAX_LCORE', 256],
 	['RTE_USE_C11_MEM_MODEL', true],
 	['RTE_CACHE_LINE_SIZE', 128]]
+flags_generic_arm32 = [
+	['RTE_MACHINE', '"armv7a"'],
+	['RTE_MAX_LCORE', 128],
+	['RTE_USE_C11_MEM_MODEL', false],
+	['RTE_CACHE_LINE_SIZE', 64]]
 flags_arm = [
 	['RTE_MACHINE', '"armv8a"'],
 	['RTE_MAX_LCORE', 16],
@@ -63,6 +68,10 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_default_arm32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -99,6 +108,9 @@ machine_args_generic = [
 	['0xd0b', ['-mcpu=cortex-a76']],
 	['0xd0c', ['-march=armv8.2-a+crc+crypto', '-mcpu=neoverse-n1'], flags_n1sdp_extra]]
 
+machine_args_generic_arm32 = [
+        ['default_arm32', ['-march=armv7-a', '-mtune=cortex-a9', '-mfpu=neon'], flags_default_arm32_extra]]
+
 machine_args_cavium = [
 	['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
 	['native', ['-march=native']],
@@ -114,6 +126,7 @@ machine_args_emag = [
 
 ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
 impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
+impl_generic_arm32 = ['Generic armv7', flags_generic_arm32, machine_args_generic_arm32]
 impl_0x41 = ['Arm', flags_arm, machine_args_generic]
 impl_0x42 = ['Broadcom', flags_generic, machine_args_generic]
 impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium]
@@ -136,74 +149,74 @@ if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
 else
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
+endif
 
-	machine = []
-	cmd_generic = ['generic', '', '', 'default', '']
-	cmd_output = cmd_generic # Set generic by default
-	machine_args = [] # Clear previous machine args
-	if arm_force_default_march and not meson.is_cross_build()
+machine = []
+machine_args = [] # Clear previous machine args
+cmd_generic = ['generic', '', '', 'default', '']
+cmd_output = cmd_generic # Set generic by default
+if arm_force_default_march and not meson.is_cross_build()
+	machine = impl_generic
+	impl_pn = 'default'
+elif not meson.is_cross_build()
+	# The script returns ['Implementer', 'Variant', 'Architecture',
+	# 'Primary Part number', 'Revision']
+	detect_vendor = find_program(join_paths(
+			meson.current_source_dir(), 'armv8_machine.py'))
+	cmd = run_command(detect_vendor.path())
+	if cmd.returncode() == 0
+		cmd_output = cmd.stdout().to_lower().strip().split(' ')
+	endif
+	# Set to generic if variable is not found
+	machine = get_variable('impl_' + cmd_output[0], ['generic'])
+	if machine[0] == 'generic'
 		machine = impl_generic
-		impl_pn = 'default'
-	elif not meson.is_cross_build()
-		# The script returns ['Implementer', 'Variant', 'Architecture',
-		# 'Primary Part number', 'Revision']
-		detect_vendor = find_program(join_paths(
-				meson.current_source_dir(), 'armv8_machine.py'))
-		cmd = run_command(detect_vendor.path())
-		if cmd.returncode() == 0
-			cmd_output = cmd.stdout().to_lower().strip().split(' ')
-		endif
-		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0], ['generic'])
-		if machine[0] == 'generic'
-			machine = impl_generic
-			cmd_output = cmd_generic
-		endif
-		impl_pn = cmd_output[3]
-		if arm_force_native_march == true
-			impl_pn = 'native'
-		endif
-	else
-		impl_id = meson.get_cross_property('implementor_id', 'generic')
-		impl_pn = meson.get_cross_property('implementor_pn', 'default')
-		machine = get_variable('impl_' + impl_id)
+		cmd_output = cmd_generic
 	endif
-
-	# Apply Common Defaults. These settings may be overwritten by machine
-	# settings later.
-	foreach flag: flags_common_default
-		if flag.length() > 0
-			dpdk_conf.set(flag[0], flag[1])
-		endif
-	endforeach
-
-	message('Implementer : ' + machine[0])
-	foreach flag: machine[1]
-		if flag.length() > 0
-			dpdk_conf.set(flag[0], flag[1])
-		endif
-	endforeach
-
-	foreach marg: machine[2]
-		if marg[0] == impl_pn
-			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
+	impl_pn = cmd_output[3]
+	if arm_force_native_march == true
+		impl_pn = 'native'
+	endif
+else
+	impl_id = meson.get_cross_property('implementor_id', 'generic')
+	impl_pn = meson.get_cross_property('implementor_pn', 'default')
+	machine = get_variable('impl_' + impl_id)
 endif
+
+# Apply Common Defaults. These settings may be overwritten by machine
+# settings later.
+foreach flag: flags_common_default
+	if flag.length() > 0
+		dpdk_conf.set(flag[0], flag[1])
+	endif
+endforeach
+
+message('Implementer : ' + machine[0])
+foreach flag: machine[1]
+	if flag.length() > 0
+		dpdk_conf.set(flag[0], flag[1])
+	endif
+endforeach
+
+foreach marg: machine[2]
+	if marg[0] == impl_pn
+		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])
+                                message('Setting flag: @0@: @1@'.format(flag[0], flag[1]))
+			endif
+		endforeach
+	endif
+endforeach
 message(machine_args)
 
 if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v5 3/4] build: add arm32 meson cross file
  2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags Juraj Linkeš
@ 2020-07-06  8:28     ` Juraj Linkeš
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  4 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-07-06  8:28 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, Juraj Linkeš

Use arm-linux-gnueabihf- toolset which comes with standard packages on
most used systems, such as Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm_armv7a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm_armv7a_linux_gcc

diff --git a/config/arm/arm_armv7a_linux_gcc b/config/arm/arm_armv7a_linux_gcc
new file mode 100644
index 000000000..39566d2ea
--- /dev/null
+++ b/config/arm/arm_armv7a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'armv7-a'
+endian = 'little'
+
+[properties]
+implementor_id = 'generic_arm32'
+implementor_pn = 'default_arm32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v5 4/4] ci: add aarch64 -> arm32 cross compiling jobs
  2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
                       ` (2 preceding siblings ...)
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 3/4] build: add arm32 meson cross file Juraj Linkeš
@ 2020-07-06  8:28     ` Juraj Linkeš
  2020-07-06  9:11       ` Juraj Linkeš
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  4 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-07-06  8:28 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, Juraj Linkeš

Add two jobs (static and shared libs), both building on aarch64 and
producing 32 bit arm binaries. Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..e5407fb37 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$ARM" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm_armv7a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if [ "$(uname -m)" = "x86_64" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index 14f812423..baba29539 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_packages: &arm_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _libabigail_build_packages: &libabigail_build_packages
   - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
 
@@ -124,6 +128,21 @@ jobs:
         packages:
           - *required_packages
           - *libabigail_build_packages
+  # aarch64 cross-compiling arm jobs
+  - env: DEF_LIB="shared" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
+  - env: DEF_LIB="static" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v5 1/4] build: disable vhost NUMA for arm32
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
@ 2020-07-06  8:56       ` David Marchand
  0 siblings, 0 replies; 122+ messages in thread
From: David Marchand @ 2020-07-06  8:56 UTC (permalink / raw)
  To: Juraj Linkeš, Bruce Richardson; +Cc: Aaron Conole, Michael Santana, dev

On Mon, Jul 6, 2020 at 10:29 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
> config/defconfig_arm-armv7a-linux-gcc specifies that
> RTE_LIBRTE_VHOST_NUMA is not supported on arm32, so disable it in meson.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  lib/librte_vhost/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
> index 882a0eaf4..73dc05f86 100644
> --- a/lib/librte_vhost/meson.build
> +++ b/lib/librte_vhost/meson.build
> @@ -5,7 +5,7 @@ if not is_linux
>         build = false
>         reason = 'only supported on linux'
>  endif
> -if has_libnuma == 1
> +if has_libnuma == 1 and not dpdk_conf.has('RTE_ARCH_ARMv7')

Is the libnuma detection invalid in the first place?


>         dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
>  endif
>  if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))
> --
> 2.20.1
>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags Juraj Linkeš
@ 2020-07-06  9:11       ` Jerin Jacob
  2020-07-07 20:44         ` Honnappa Nagarahalli
  0 siblings, 1 reply; 122+ messages in thread
From: Jerin Jacob @ 2020-07-06  9:11 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: Richardson, Bruce, Aaron Conole, Michael Santana, dpdk-dev

On Mon, Jul 6, 2020 at 1:59 PM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
> Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc.
> Omit driver flags which can be built on arm32.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>

Hi Juraj,

Not strictly specific to this patch. Just to understand, How armv7
support has been used?
- Is it for Running arm32 program on arm64 machines?
- Is it for Native DPDK support from arm32. If so, What kind of PMD
supports native arm32 DPDK?

Or some other use case?

I would like to understand the arm32 use case, so we can review it at
that angle.

> ---
>  config/arm/meson.build | 135 ++++++++++++++++++++++-------------------
>  1 file changed, 74 insertions(+), 61 deletions(-)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build
> index 8728051d5..b02fc95d9 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -34,6 +34,11 @@ flags_generic = [
>         ['RTE_MAX_LCORE', 256],
>         ['RTE_USE_C11_MEM_MODEL', true],
>         ['RTE_CACHE_LINE_SIZE', 128]]
> +flags_generic_arm32 = [
> +       ['RTE_MACHINE', '"armv7a"'],
> +       ['RTE_MAX_LCORE', 128],
> +       ['RTE_USE_C11_MEM_MODEL', false],
> +       ['RTE_CACHE_LINE_SIZE', 64]]
>  flags_arm = [
>         ['RTE_MACHINE', '"armv8a"'],
>         ['RTE_MAX_LCORE', 16],
> @@ -63,6 +68,10 @@ flags_armada = [
>         ['RTE_MAX_LCORE', 16]]
>
>  flags_default_extra = []
> +flags_default_arm32_extra = [
> +        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
> +        ['RTE_ARCH_STRICT_ALIGN', true],
> +        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false]]
>  flags_n1sdp_extra = [
>         ['RTE_MACHINE', '"n1sdp"'],
>         ['RTE_MAX_NUMA_NODES', 1],
> @@ -99,6 +108,9 @@ machine_args_generic = [
>         ['0xd0b', ['-mcpu=cortex-a76']],
>         ['0xd0c', ['-march=armv8.2-a+crc+crypto', '-mcpu=neoverse-n1'], flags_n1sdp_extra]]
>
> +machine_args_generic_arm32 = [
> +        ['default_arm32', ['-march=armv7-a', '-mtune=cortex-a9', '-mfpu=neon'], flags_default_arm32_extra]]
> +
>  machine_args_cavium = [
>         ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
>         ['native', ['-march=native']],
> @@ -114,6 +126,7 @@ machine_args_emag = [
>
>  ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
>  impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
> +impl_generic_arm32 = ['Generic armv7', flags_generic_arm32, machine_args_generic_arm32]
>  impl_0x41 = ['Arm', flags_arm, machine_args_generic]
>  impl_0x42 = ['Broadcom', flags_generic, machine_args_generic]
>  impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium]
> @@ -136,74 +149,74 @@ if not dpdk_conf.get('RTE_ARCH_64')
>         dpdk_conf.set('RTE_ARCH_ARMv7', 1)
>         # the minimum architecture supported, armv7-a, needs the following,
>         # mk/machine/armv7a/rte.vars.mk sets it too
> -       machine_args += '-mfpu=neon'
>  else
>         dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
>         dpdk_conf.set('RTE_ARCH_ARM64', 1)
> +endif
>
> -       machine = []
> -       cmd_generic = ['generic', '', '', 'default', '']
> -       cmd_output = cmd_generic # Set generic by default
> -       machine_args = [] # Clear previous machine args
> -       if arm_force_default_march and not meson.is_cross_build()
> +machine = []
> +machine_args = [] # Clear previous machine args
> +cmd_generic = ['generic', '', '', 'default', '']
> +cmd_output = cmd_generic # Set generic by default
> +if arm_force_default_march and not meson.is_cross_build()
> +       machine = impl_generic
> +       impl_pn = 'default'
> +elif not meson.is_cross_build()
> +       # The script returns ['Implementer', 'Variant', 'Architecture',
> +       # 'Primary Part number', 'Revision']
> +       detect_vendor = find_program(join_paths(
> +                       meson.current_source_dir(), 'armv8_machine.py'))
> +       cmd = run_command(detect_vendor.path())
> +       if cmd.returncode() == 0
> +               cmd_output = cmd.stdout().to_lower().strip().split(' ')
> +       endif
> +       # Set to generic if variable is not found
> +       machine = get_variable('impl_' + cmd_output[0], ['generic'])
> +       if machine[0] == 'generic'
>                 machine = impl_generic
> -               impl_pn = 'default'
> -       elif not meson.is_cross_build()
> -               # The script returns ['Implementer', 'Variant', 'Architecture',
> -               # 'Primary Part number', 'Revision']
> -               detect_vendor = find_program(join_paths(
> -                               meson.current_source_dir(), 'armv8_machine.py'))
> -               cmd = run_command(detect_vendor.path())
> -               if cmd.returncode() == 0
> -                       cmd_output = cmd.stdout().to_lower().strip().split(' ')
> -               endif
> -               # Set to generic if variable is not found
> -               machine = get_variable('impl_' + cmd_output[0], ['generic'])
> -               if machine[0] == 'generic'
> -                       machine = impl_generic
> -                       cmd_output = cmd_generic
> -               endif
> -               impl_pn = cmd_output[3]
> -               if arm_force_native_march == true
> -                       impl_pn = 'native'
> -               endif
> -       else
> -               impl_id = meson.get_cross_property('implementor_id', 'generic')
> -               impl_pn = meson.get_cross_property('implementor_pn', 'default')
> -               machine = get_variable('impl_' + impl_id)
> +               cmd_output = cmd_generic
>         endif
> -
> -       # Apply Common Defaults. These settings may be overwritten by machine
> -       # settings later.
> -       foreach flag: flags_common_default
> -               if flag.length() > 0
> -                       dpdk_conf.set(flag[0], flag[1])
> -               endif
> -       endforeach
> -
> -       message('Implementer : ' + machine[0])
> -       foreach flag: machine[1]
> -               if flag.length() > 0
> -                       dpdk_conf.set(flag[0], flag[1])
> -               endif
> -       endforeach
> -
> -       foreach marg: machine[2]
> -               if marg[0] == impl_pn
> -                       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
> +       impl_pn = cmd_output[3]
> +       if arm_force_native_march == true
> +               impl_pn = 'native'
> +       endif
> +else
> +       impl_id = meson.get_cross_property('implementor_id', 'generic')
> +       impl_pn = meson.get_cross_property('implementor_pn', 'default')
> +       machine = get_variable('impl_' + impl_id)
>  endif
> +
> +# Apply Common Defaults. These settings may be overwritten by machine
> +# settings later.
> +foreach flag: flags_common_default
> +       if flag.length() > 0
> +               dpdk_conf.set(flag[0], flag[1])
> +       endif
> +endforeach
> +
> +message('Implementer : ' + machine[0])
> +foreach flag: machine[1]
> +       if flag.length() > 0
> +               dpdk_conf.set(flag[0], flag[1])
> +       endif
> +endforeach
> +
> +foreach marg: machine[2]
> +       if marg[0] == impl_pn
> +               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])
> +                                message('Setting flag: @0@: @1@'.format(flag[0], flag[1]))
> +                       endif
> +               endforeach
> +       endif
> +endforeach
>  message(machine_args)
>
>  if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v5 4/4] ci: add aarch64 -> arm32 cross compiling jobs
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
@ 2020-07-06  9:11       ` Juraj Linkeš
  0 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-07-06  9:11 UTC (permalink / raw)
  To: Juraj Linkeš, bruce.richardson, aconole, maicolgabriel; +Cc: dev



> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Monday, July 6, 2020 10:28 AM
> To: bruce.richardson@intel.com; aconole@redhat.com;
> maicolgabriel@hotmail.com
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>
> Subject: [PATCH v5 4/4] ci: add aarch64 -> arm32 cross compiling jobs
> 
> Add two jobs (static and shared libs), both building on aarch64 and producing 32
> bit arm binaries. Do not run tests in these jobs.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  .ci/linux-build.sh |  7 ++++++-
>  .travis.yml        | 19 +++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index d079801d7..e5407fb37
> 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
>      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
>  fi
> 
> +if [ "$ARM" = "1" ]; then
> +    # convert the arch specifier
> +    OPTS="$OPTS --cross-file config/arm/arm_armv7a_linux_gcc"
> +fi
> +
>  if [ "$BUILD_DOCS" = "1" ]; then
>      OPTS="$OPTS -Denable_docs=true"
>  fi
> @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
>  meson build --werror $OPTS
>  ninja -C build
> 
> -if [ "$AARCH64" != "1" ]; then
> +if [ "$(uname -m)" = "x86_64" ]; then
>      devtools/test-null.sh
>  fi
> 

Now that I think about this a bit more, shouldn't this check be "if this is a native build, run test-null.sh?". If so, should we do something like this?
if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; then
    devtools/test-null.sh
fi

The sed is there because file returns x86-64 and uname returns x86_64.

What do you think?

> diff --git a/.travis.yml b/.travis.yml
> index 14f812423..baba29539 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
>    - *required_packages
>    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-
> gnu]
> 
> +_arm_packages: &arm_packages
> +  - *required_packages
> +  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross,
> +pkg-config-arm-linux-gnueabihf]
> +
>  _libabigail_build_packages: &libabigail_build_packages
>    - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
> 
> @@ -124,6 +128,21 @@ jobs:
>          packages:
>            - *required_packages
>            - *libabigail_build_packages
> +  # aarch64 cross-compiling arm jobs
> +  - env: DEF_LIB="shared" ARM=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_packages
> +  - env: DEF_LIB="static" ARM=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_packages
>    # aarch64 clang jobs
>    - env: DEF_LIB="static"
>      arch: arm64
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
  2020-07-06  9:11       ` Jerin Jacob
@ 2020-07-07 20:44         ` Honnappa Nagarahalli
  2020-07-08  8:33           ` Jerin Jacob
  0 siblings, 1 reply; 122+ messages in thread
From: Honnappa Nagarahalli @ 2020-07-07 20:44 UTC (permalink / raw)
  To: Jerin Jacob, Juraj Linkeš
  Cc: Richardson, Bruce, Aaron Conole, Michael Santana, dpdk-dev, nd,
	Honnappa Nagarahalli, Phil Yang, Ruifeng Wang, nd

<snip>

> Subject: Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
> 
> On Mon, Jul 6, 2020 at 1:59 PM Juraj Linkeš <juraj.linkes@pantheon.tech>
> wrote:
> >
> > Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc.
> > Omit driver flags which can be built on arm32.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> 
> Hi Juraj,
> 
> Not strictly specific to this patch. Just to understand, How armv7 support has
> been used?
I do not know how armv7 support is being used. I have not heard of anything so far.

In this patch arm32 is actually referring to aarch32.

> - Is it for Running arm32 program on arm64 machines?
I am not sure if anyone would run armv7 binaries on arm64 machines. I would think they will at least go through a re-compilation (to aarch32) and test phase.

> - Is it for Native DPDK support from arm32. If so, What kind of PMD supports
> native arm32 DPDK?
Yes, this is for DPDK on aarch32 support. We do not have any plans to enable any PMD for aarch32. The current goal is to make sure that the code compiles for aarch32. Internally, we have validated few test cases for the libraries.

> 
> Or some other use case?
> 
> I would like to understand the arm32 use case, so we can review it at that
> angle.

I believe armv7a compilation is not supported in meson. Do you have any thoughts? Do you plan to maintain the support for armv7a?

> 
> > ---
> >  config/arm/meson.build | 135
> > ++++++++++++++++++++++-------------------
> >  1 file changed, 74 insertions(+), 61 deletions(-)
> >
> > diff --git a/config/arm/meson.build b/config/arm/meson.build index
> > 8728051d5..b02fc95d9 100644
> > --- a/config/arm/meson.build
> > +++ b/config/arm/meson.build
> > @@ -34,6 +34,11 @@ flags_generic = [
> >         ['RTE_MAX_LCORE', 256],
> >         ['RTE_USE_C11_MEM_MODEL', true],
> >         ['RTE_CACHE_LINE_SIZE', 128]]
> > +flags_generic_arm32 = [
> > +       ['RTE_MACHINE', '"armv7a"'],
> > +       ['RTE_MAX_LCORE', 128],
> > +       ['RTE_USE_C11_MEM_MODEL', false],
> > +       ['RTE_CACHE_LINE_SIZE', 64]]
> >  flags_arm = [
> >         ['RTE_MACHINE', '"armv8a"'],
> >         ['RTE_MAX_LCORE', 16],
> > @@ -63,6 +68,10 @@ flags_armada = [
> >         ['RTE_MAX_LCORE', 16]]
> >
> >  flags_default_extra = []
> > +flags_default_arm32_extra = [
> > +        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
> > +        ['RTE_ARCH_STRICT_ALIGN', true],
> > +        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false]]
> >  flags_n1sdp_extra = [
> >         ['RTE_MACHINE', '"n1sdp"'],
> >         ['RTE_MAX_NUMA_NODES', 1],
> > @@ -99,6 +108,9 @@ machine_args_generic = [
> >         ['0xd0b', ['-mcpu=cortex-a76']],
> >         ['0xd0c', ['-march=armv8.2-a+crc+crypto',
> > '-mcpu=neoverse-n1'], flags_n1sdp_extra]]
> >
> > +machine_args_generic_arm32 = [
> > +        ['default_arm32', ['-march=armv7-a', '-mtune=cortex-a9',
> > +'-mfpu=neon'], flags_default_arm32_extra]]
> > +
> >  machine_args_cavium = [
> >         ['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
> >         ['native', ['-march=native']], @@ -114,6 +126,7 @@
> > machine_args_emag = [
> >
> >  ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page
> > G7-5321)  impl_generic = ['Generic armv8', flags_generic,
> > machine_args_generic]
> > +impl_generic_arm32 = ['Generic armv7', flags_generic_arm32,
> > +machine_args_generic_arm32]
> >  impl_0x41 = ['Arm', flags_arm, machine_args_generic]
> >  impl_0x42 = ['Broadcom', flags_generic, machine_args_generic]
> >  impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium] @@ -136,74
> > +149,74 @@ if not dpdk_conf.get('RTE_ARCH_64')
> >         dpdk_conf.set('RTE_ARCH_ARMv7', 1)
> >         # the minimum architecture supported, armv7-a, needs the following,
> >         # mk/machine/armv7a/rte.vars.mk sets it too
> > -       machine_args += '-mfpu=neon'
> >  else
> >         dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
> >         dpdk_conf.set('RTE_ARCH_ARM64', 1)
> > +endif
> >
> > -       machine = []
> > -       cmd_generic = ['generic', '', '', 'default', '']
> > -       cmd_output = cmd_generic # Set generic by default
> > -       machine_args = [] # Clear previous machine args
> > -       if arm_force_default_march and not meson.is_cross_build()
> > +machine = []
> > +machine_args = [] # Clear previous machine args cmd_generic =
> > +['generic', '', '', 'default', ''] cmd_output = cmd_generic # Set
> > +generic by default if arm_force_default_march and not
> > +meson.is_cross_build()
> > +       machine = impl_generic
> > +       impl_pn = 'default'
> > +elif not meson.is_cross_build()
> > +       # The script returns ['Implementer', 'Variant', 'Architecture',
> > +       # 'Primary Part number', 'Revision']
> > +       detect_vendor = find_program(join_paths(
> > +                       meson.current_source_dir(), 'armv8_machine.py'))
> > +       cmd = run_command(detect_vendor.path())
> > +       if cmd.returncode() == 0
> > +               cmd_output = cmd.stdout().to_lower().strip().split(' ')
> > +       endif
> > +       # Set to generic if variable is not found
> > +       machine = get_variable('impl_' + cmd_output[0], ['generic'])
> > +       if machine[0] == 'generic'
> >                 machine = impl_generic
> > -               impl_pn = 'default'
> > -       elif not meson.is_cross_build()
> > -               # The script returns ['Implementer', 'Variant', 'Architecture',
> > -               # 'Primary Part number', 'Revision']
> > -               detect_vendor = find_program(join_paths(
> > -                               meson.current_source_dir(), 'armv8_machine.py'))
> > -               cmd = run_command(detect_vendor.path())
> > -               if cmd.returncode() == 0
> > -                       cmd_output = cmd.stdout().to_lower().strip().split(' ')
> > -               endif
> > -               # Set to generic if variable is not found
> > -               machine = get_variable('impl_' + cmd_output[0], ['generic'])
> > -               if machine[0] == 'generic'
> > -                       machine = impl_generic
> > -                       cmd_output = cmd_generic
> > -               endif
> > -               impl_pn = cmd_output[3]
> > -               if arm_force_native_march == true
> > -                       impl_pn = 'native'
> > -               endif
> > -       else
> > -               impl_id = meson.get_cross_property('implementor_id', 'generic')
> > -               impl_pn = meson.get_cross_property('implementor_pn', 'default')
> > -               machine = get_variable('impl_' + impl_id)
> > +               cmd_output = cmd_generic
> >         endif
> > -
> > -       # Apply Common Defaults. These settings may be overwritten by
> machine
> > -       # settings later.
> > -       foreach flag: flags_common_default
> > -               if flag.length() > 0
> > -                       dpdk_conf.set(flag[0], flag[1])
> > -               endif
> > -       endforeach
> > -
> > -       message('Implementer : ' + machine[0])
> > -       foreach flag: machine[1]
> > -               if flag.length() > 0
> > -                       dpdk_conf.set(flag[0], flag[1])
> > -               endif
> > -       endforeach
> > -
> > -       foreach marg: machine[2]
> > -               if marg[0] == impl_pn
> > -                       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
> > +       impl_pn = cmd_output[3]
> > +       if arm_force_native_march == true
> > +               impl_pn = 'native'
> > +       endif
> > +else
> > +       impl_id = meson.get_cross_property('implementor_id', 'generic')
> > +       impl_pn = meson.get_cross_property('implementor_pn', 'default')
> > +       machine = get_variable('impl_' + impl_id)
> >  endif
> > +
> > +# Apply Common Defaults. These settings may be overwritten by machine
> > +# settings later.
> > +foreach flag: flags_common_default
> > +       if flag.length() > 0
> > +               dpdk_conf.set(flag[0], flag[1])
> > +       endif
> > +endforeach
> > +
> > +message('Implementer : ' + machine[0]) foreach flag: machine[1]
> > +       if flag.length() > 0
> > +               dpdk_conf.set(flag[0], flag[1])
> > +       endif
> > +endforeach
> > +
> > +foreach marg: machine[2]
> > +       if marg[0] == impl_pn
> > +               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])
> > +                                message('Setting flag: @0@: @1@'.format(flag[0],
> flag[1]))
> > +                       endif
> > +               endforeach
> > +       endif
> > +endforeach
> >  message(machine_args)
> >
> >  if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
> > --
> > 2.20.1
> >

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
  2020-07-07 20:44         ` Honnappa Nagarahalli
@ 2020-07-08  8:33           ` Jerin Jacob
  2020-07-08 20:55             ` Honnappa Nagarahalli
  0 siblings, 1 reply; 122+ messages in thread
From: Jerin Jacob @ 2020-07-08  8:33 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Juraj Linkeš,
	Richardson, Bruce, Aaron Conole, Michael Santana, dpdk-dev, nd,
	Phil Yang, Ruifeng Wang, Jan Viktorin

On Wed, Jul 8, 2020 at 2:14 AM Honnappa Nagarahalli
<Honnappa.Nagarahalli@arm.com> wrote:
>
> <snip>
>
> > Subject: Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
> >
> > On Mon, Jul 6, 2020 at 1:59 PM Juraj Linkeš <juraj.linkes@pantheon.tech>
> > wrote:
> > >
> > > Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc.
> > > Omit driver flags which can be built on arm32.
> > >
> > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> >
> > Hi Juraj,
> >
> > Not strictly specific to this patch. Just to understand, How armv7 support has
> > been used?
> I do not know how armv7 support is being used. I have not heard of anything so far.
>
> In this patch arm32 is actually referring to aarch32.
>
> > - Is it for Running arm32 program on arm64 machines?
> I am not sure if anyone would run armv7 binaries on arm64 machines. I would think they will at least go through a re-compilation (to aarch32) and test phase.
>
> > - Is it for Native DPDK support from arm32. If so, What kind of PMD supports
> > native arm32 DPDK?
> Yes, this is for DPDK on aarch32 support. We do not have any plans to enable any PMD for aarch32. The current goal is to make sure that the code compiles for aarch32. Internally, we have validated few test cases for the libraries.

One thing is lack of PMD support and other is lack  PCI HW support for
armv7 machines in general.


>
> >
> > Or some other use case?
> >
> > I would like to understand the arm32 use case, so we can review it at that
> > angle.
>
> I believe armv7a compilation is not supported in meson. Do you have any thoughts? Do you plan to maintain the support for armv7a?

Armv7 is maintained by:
ARM v7
M: Jan Viktorin <viktorin@rehivetech.com>
M: Ruifeng Wang <ruifeng.wang@arm.com>
F: lib/librte_eal/arm/

My only concern is if there is no REAL use case for armv7 in DPDK, May
it is not worth to add a lot of code and make it complicated for
arm64.
At a minimum, If we are planning to add armv7 support then please
split config/arm/meson.build file as two for arm64 and armv7.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
  2020-07-08  8:33           ` Jerin Jacob
@ 2020-07-08 20:55             ` Honnappa Nagarahalli
  2020-07-09  4:49               ` Jerin Jacob
  0 siblings, 1 reply; 122+ messages in thread
From: Honnappa Nagarahalli @ 2020-07-08 20:55 UTC (permalink / raw)
  To: Jerin Jacob
  Cc: Juraj Linkeš,
	Richardson, Bruce, Aaron Conole, Michael Santana, dpdk-dev, nd,
	Phil Yang, Ruifeng Wang, Jan Viktorin, Honnappa Nagarahalli, nd

> > <snip>
> >
> > > Subject: Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build
> > > flags
> > >
> > > On Mon, Jul 6, 2020 at 1:59 PM Juraj Linkeš
> > > <juraj.linkes@pantheon.tech>
> > > wrote:
> > > >
> > > > Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc.
> > > > Omit driver flags which can be built on arm32.
> > > >
> > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > >
> > > Hi Juraj,
> > >
> > > Not strictly specific to this patch. Just to understand, How armv7
> > > support has been used?
> > I do not know how armv7 support is being used. I have not heard of
> anything so far.
> >
> > In this patch arm32 is actually referring to aarch32.
> >
> > > - Is it for Running arm32 program on arm64 machines?
> > I am not sure if anyone would run armv7 binaries on arm64 machines. I
> would think they will at least go through a re-compilation (to aarch32) and
> test phase.
> >
> > > - Is it for Native DPDK support from arm32. If so, What kind of PMD
> > > supports native arm32 DPDK?
> > Yes, this is for DPDK on aarch32 support. We do not have any plans to
> enable any PMD for aarch32. The current goal is to make sure that the code
> compiles for aarch32. Internally, we have validated few test cases for the
> libraries.
> 
> One thing is lack of PMD support and other is lack  PCI HW support for
> armv7 machines in general.
> 
> 
> >
> > >
> > > Or some other use case?
> > >
> > > I would like to understand the arm32 use case, so we can review it
> > > at that angle.
> >
> > I believe armv7a compilation is not supported in meson. Do you have any
> thoughts? Do you plan to maintain the support for armv7a?
> 
> Armv7 is maintained by:
> ARM v7
> M: Jan Viktorin <viktorin@rehivetech.com>
> M: Ruifeng Wang <ruifeng.wang@arm.com>
> F: lib/librte_eal/arm/
> 
> My only concern is if there is no REAL use case for armv7 in DPDK, May it is
> not worth to add a lot of code and make it complicated for arm64.
> At a minimum, If we are planning to add armv7 support then please split
> config/arm/meson.build file as two for arm64 and armv7.
If no one objects, may be we should skip armv7.
But, we need to do aarch32 for compilation/unit tests for libraries as platforms (N1 based) exist with aarch32+PCI. We can skip the PMD support right now. Is that ok?

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags
  2020-07-08 20:55             ` Honnappa Nagarahalli
@ 2020-07-09  4:49               ` Jerin Jacob
  0 siblings, 0 replies; 122+ messages in thread
From: Jerin Jacob @ 2020-07-09  4:49 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Juraj Linkeš,
	Richardson, Bruce, Aaron Conole, Michael Santana, dpdk-dev, nd,
	Phil Yang, Ruifeng Wang, Jan Viktorin

On Thu, Jul 9, 2020 at 2:25 AM Honnappa Nagarahalli
<Honnappa.Nagarahalli@arm.com> wrote:
>
> > > <snip>
> > >
> > > > Subject: Re: [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build
> > > > flags
> > > >
> > > > On Mon, Jul 6, 2020 at 1:59 PM Juraj Linkeš
> > > > <juraj.linkes@pantheon.tech>
> > > > wrote:
> > > > >
> > > > > Base the flags on config/defconfig_arm-armv7a-linuxapp-gcc.
> > > > > Omit driver flags which can be built on arm32.
> > > > >
> > > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > >
> > > > Hi Juraj,
> > > >
> > > > Not strictly specific to this patch. Just to understand, How armv7
> > > > support has been used?
> > > I do not know how armv7 support is being used. I have not heard of
> > anything so far.
> > >
> > > In this patch arm32 is actually referring to aarch32.
> > >
> > > > - Is it for Running arm32 program on arm64 machines?
> > > I am not sure if anyone would run armv7 binaries on arm64 machines. I
> > would think they will at least go through a re-compilation (to aarch32) and
> > test phase.
> > >
> > > > - Is it for Native DPDK support from arm32. If so, What kind of PMD
> > > > supports native arm32 DPDK?
> > > Yes, this is for DPDK on aarch32 support. We do not have any plans to
> > enable any PMD for aarch32. The current goal is to make sure that the code
> > compiles for aarch32. Internally, we have validated few test cases for the
> > libraries.
> >
> > One thing is lack of PMD support and other is lack  PCI HW support for
> > armv7 machines in general.
> >
> >
> > >
> > > >
> > > > Or some other use case?
> > > >
> > > > I would like to understand the arm32 use case, so we can review it
> > > > at that angle.
> > >
> > > I believe armv7a compilation is not supported in meson. Do you have any
> > thoughts? Do you plan to maintain the support for armv7a?
> >
> > Armv7 is maintained by:
> > ARM v7
> > M: Jan Viktorin <viktorin@rehivetech.com>
> > M: Ruifeng Wang <ruifeng.wang@arm.com>
> > F: lib/librte_eal/arm/
> >
> > My only concern is if there is no REAL use case for armv7 in DPDK, May it is
> > not worth to add a lot of code and make it complicated for arm64.
> > At a minimum, If we are planning to add armv7 support then please split
> > config/arm/meson.build file as two for arm64 and armv7.
> If no one objects, may be we should skip armv7.
> But, we need to do aarch32 for compilation/unit tests for libraries as platforms (N1 based) exist with aarch32+PCI. We can skip the PMD support right now. Is that ok?

aarch32 is fine as they may be some legacy 32bit application that can
run on N1. If no one objects, we should remove armv7 and it's not been
actively maintained as well.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support
  2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
                       ` (3 preceding siblings ...)
  2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
@ 2020-08-13  9:21     ` Juraj Linkeš
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
                         ` (5 more replies)
  4 siblings, 6 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-13  9:21 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add support for aarch32 cross build in meson
and add aarch64 -> aarch32 cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is
distinct from arvm7 build.

Tested here:
[v6] https://travis-ci.com/github/jlinkes/dpdk/builds/179252628

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying
failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

Juraj Linkeš (3):
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (1):
  net/bnxt: add support for aarch32

 .ci/linux-build.sh                            |  7 ++++-
 .travis.yml                                   | 19 ++++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 +++++++++++
 config/arm/meson.build                        | 20 +++++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
 drivers/net/bnxt/Makefile                     |  2 +-
 drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
 drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
 drivers/net/bnxt/bnxt_txr.h                   |  2 +-
 9 files changed, 87 insertions(+), 14 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v6 1/5] net/bnxt: add support for aarch32
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-08-13  9:21       ` Juraj Linkeš
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 2/5] build: add aarch32 meson build flags Juraj Linkeš
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-13  9:21 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev, Ruifeng Wang

From: Ruifeng Wang <ruifeng.wang@arm.com>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/bnxt/Makefile   | 2 +-
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
index 2c4cdd1c4..db8fdf293 100644
--- a/drivers/net/bnxt/Makefile
+++ b/drivers/net/bnxt/Makefile
@@ -43,7 +43,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
-ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
 endif
 
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index d5ce3b6d5..1c4027711 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 2bf46cd91..e2fba1647 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 7715c11b8..38e5ac9df 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v6 2/5] build: add aarch32 meson build flags
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-08-13  9:21       ` Juraj Linkeš
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
                         ` (3 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-13  9:21 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b29f27097 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -63,6 +63,11 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_aarch32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
+        ['RTE_MAX_LCORE', 256]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -90,6 +95,7 @@ flags_octeontx2_extra = [
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc']],
 	['native', ['-march=native']],
+	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -129,15 +135,23 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic]
 impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
 
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-
+update_flags = false
 if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARM', 1)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		impl_id = meson.get_cross_property('implementor_id', 'aarch32')
+		impl_pn = meson.get_cross_property('implementor_pn', 'default')
+		machine = get_variable('impl_' + impl_id)
+	else
+		machine_args += '-mfpu=neon'
+	endif
 else
+	update_flags = true
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
 
@@ -172,7 +186,9 @@ else
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
 		machine = get_variable('impl_' + impl_id)
 	endif
+endif
 
+if update_flags == true
 	# Apply Common Defaults. These settings may be overwritten by machine
 	# settings later.
 	foreach flag: flags_common_default
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v6 3/5] build: add aarch32 to meson cross-compilation
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 2/5] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-08-13  9:21       ` Juraj Linkeš
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                         ` (2 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-13  9:21 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 000000000..d3c4bce6c
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x41'
+implementor_pn = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v6 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                         ` (2 preceding siblings ...)
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-08-13  9:21       ` Juraj Linkeš
  2020-08-14  2:10         ` Ruifeng Wang
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 5/5] doc: add aarch32 build guidance Juraj Linkeš
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-13  9:21 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..c042b065c 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$AARCH32" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index 14f812423..966b657a7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _libabigail_build_packages: &libabigail_build_packages
   - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
 
@@ -124,6 +128,21 @@ jobs:
         packages:
           - *required_packages
           - *libabigail_build_packages
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v6 5/5] doc: add aarch32 build guidance
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                         ` (3 preceding siblings ...)
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-08-13  9:21       ` Juraj Linkeš
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-13  9:21 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index c5875a6d5..07085e3ea 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
+32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64.
+   An aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -88,18 +89,33 @@ To install it in Ubuntu::
 
    sudo apt-get install pkg-config-aarch64-linux-gnu
 
+.. note::
+
+    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
+    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
+    for aarch32 on aarch64. To install it in Ubuntu::
+
+       sudo dpkg --add-architecture armhf
+       sudo apt-get update
+       sudo apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make binutils
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
 	meson cross-build --cross-file <target_machine_configuration>
 	ninja -C cross-build
 
-For example if the target machine is arm64 we can use the following
+For example if the target machine is aarch64 we can use the following
 command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
 
+If the target machine is aarch32 we can use the following command::
+
+	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+	ninja -C arm32-build
+
 Configure and Cross Compile DPDK using Make
 -------------------------------------------
 To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v6 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-08-14  2:10         ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-08-14  2:10 UTC (permalink / raw)
  To: Juraj Linkeš, bruce.richardson, aconole, maicolgabriel; +Cc: dev, nd


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Juraj Linke?
> Sent: Thursday, August 13, 2020 5:21 PM
> To: bruce.richardson@intel.com; aconole@redhat.com;
> maicolgabriel@hotmail.com
> Cc: juraj.linkes@pantheon.tech; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v6 4/5] ci: add aarch64 -> aarch32 cross compiling
> jobs
> 
> Add two jobs (static and shared libs), both building on aarch64 and producing
> 32-bit arm binaries executable on armv8-a, but not armv7.
> Do not run tests in these jobs.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  .ci/linux-build.sh |  7 ++++++-
>  .travis.yml        | 19 +++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)
> 
Hi Juraj,

This patch has apply issue.
Can you rebase and send a new version?

Thanks.
/Ruifeng

> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index d079801d7..c042b065c
> 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
>      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
>  fi
> 
> +if [ "$AARCH32" = "1" ]; then
> +    # convert the arch specifier
> +    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
> +fi
> +
>  if [ "$BUILD_DOCS" = "1" ]; then
>      OPTS="$OPTS -Denable_docs=true"
>  fi
> @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
>  meson build --werror $OPTS
>  ninja -C build
> 
> -if [ "$AARCH64" != "1" ]; then
> +if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)";
> +then
>      devtools/test-null.sh
>  fi
> 
> diff --git a/.travis.yml b/.travis.yml
> index 14f812423..966b657a7 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
>    - *required_packages
>    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-
> gnu]
> 
> +_arm_32b_packages: &arm_32b_packages
> +  - *required_packages
> +  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross,
> +pkg-config-arm-linux-gnueabihf]
> +
>  _libabigail_build_packages: &libabigail_build_packages
>    - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
> 
> @@ -124,6 +128,21 @@ jobs:
>          packages:
>            - *required_packages
>            - *libabigail_build_packages
> +  # aarch64 cross-compiling aarch32 jobs
> +  - env: DEF_LIB="shared" AARCH32=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_32b_packages
> +  - env: DEF_LIB="static" AARCH32=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_32b_packages
>    # aarch64 clang jobs
>    - env: DEF_LIB="static"
>      arch: arm64
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support
  2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                         ` (4 preceding siblings ...)
  2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-08-14 10:31       ` Juraj Linkeš
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
                           ` (5 more replies)
  5 siblings, 6 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-14 10:31 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add support for aarch32 cross build in meson
and add aarch64 -> aarch32 cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is
distinct from arvm7 build.

Tested here:
[v6] https://travis-ci.com/github/jlinkes/dpdk/builds/179252628
[v7] https://travis-ci.com/github/jlinkes/dpdk/builds/179723067

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying
failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

Juraj Linkeš (3):
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (1):
  net/bnxt: add support for aarch32

 .ci/linux-build.sh                            |  7 ++++-
 .travis.yml                                   | 19 ++++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 +++++++++++
 config/arm/meson.build                        | 20 +++++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
 drivers/net/bnxt/Makefile                     |  2 +-
 drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
 drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
 drivers/net/bnxt/bnxt_txr.h                   |  2 +-
 9 files changed, 87 insertions(+), 14 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-08-14 10:31         ` Juraj Linkeš
  2020-08-19 17:45           ` Ajit Khaparde
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 2/5] build: add aarch32 meson build flags Juraj Linkeš
                           ` (4 subsequent siblings)
  5 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-14 10:31 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev, Ruifeng Wang

From: Ruifeng Wang <ruifeng.wang@arm.com>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/bnxt/Makefile   | 2 +-
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
index 0c5b74918..06a47dc49 100644
--- a/drivers/net/bnxt/Makefile
+++ b/drivers/net/bnxt/Makefile
@@ -43,7 +43,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
-ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
 endif
 
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index d5ce3b6d5..1c4027711 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 2bf46cd91..e2fba1647 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 7715c11b8..38e5ac9df 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v7 2/5] build: add aarch32 meson build flags
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-08-14 10:31         ` Juraj Linkeš
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
                           ` (3 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-14 10:31 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b29f27097 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -63,6 +63,11 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_aarch32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
+        ['RTE_MAX_LCORE', 256]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -90,6 +95,7 @@ flags_octeontx2_extra = [
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc']],
 	['native', ['-march=native']],
+	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -129,15 +135,23 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic]
 impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
 
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-
+update_flags = false
 if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARM', 1)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		impl_id = meson.get_cross_property('implementor_id', 'aarch32')
+		impl_pn = meson.get_cross_property('implementor_pn', 'default')
+		machine = get_variable('impl_' + impl_id)
+	else
+		machine_args += '-mfpu=neon'
+	endif
 else
+	update_flags = true
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
 
@@ -172,7 +186,9 @@ else
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
 		machine = get_variable('impl_' + impl_id)
 	endif
+endif
 
+if update_flags == true
 	# Apply Common Defaults. These settings may be overwritten by machine
 	# settings later.
 	foreach flag: flags_common_default
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v7 3/5] build: add aarch32 to meson cross-compilation
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 2/5] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-08-14 10:31         ` Juraj Linkeš
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                           ` (2 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-14 10:31 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 000000000..d3c4bce6c
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x41'
+implementor_pn = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v7 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                           ` (2 preceding siblings ...)
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-08-14 10:31         ` Juraj Linkeš
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 5/5] doc: add aarch32 build guidance Juraj Linkeš
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-14 10:31 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..c042b065c 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$AARCH32" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index d6eeab371..850faaac1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -98,6 +102,21 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v7 5/5] doc: add aarch32 build guidance
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                           ` (3 preceding siblings ...)
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-08-14 10:31         ` Juraj Linkeš
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-14 10:31 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index c5875a6d5..07085e3ea 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
+32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64.
+   An aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -88,18 +89,33 @@ To install it in Ubuntu::
 
    sudo apt-get install pkg-config-aarch64-linux-gnu
 
+.. note::
+
+    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
+    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
+    for aarch32 on aarch64. To install it in Ubuntu::
+
+       sudo dpkg --add-architecture armhf
+       sudo apt-get update
+       sudo apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make binutils
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
 	meson cross-build --cross-file <target_machine_configuration>
 	ninja -C cross-build
 
-For example if the target machine is arm64 we can use the following
+For example if the target machine is aarch64 we can use the following
 command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
 
+If the target machine is aarch32 we can use the following command::
+
+	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+	ninja -C arm32-build
+
 Configure and Cross Compile DPDK using Make
 -------------------------------------------
 To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-08-19 17:45           ` Ajit Khaparde
  2020-08-20  3:00             ` Ruifeng Wang
  0 siblings, 1 reply; 122+ messages in thread
From: Ajit Khaparde @ 2020-08-19 17:45 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: Bruce Richardson, Aaron Conole, maicolgabriel, dpdk-dev, Ruifeng Wang

On Fri, Aug 14, 2020 at 3:32 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
wrote:

> From: Ruifeng Wang <ruifeng.wang@arm.com>
>
> Expand vector PMD support to aarch32.
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  drivers/net/bnxt/Makefile   | 2 +-
>  drivers/net/bnxt/bnxt_rxq.h | 2 +-
>  drivers/net/bnxt/bnxt_rxr.h | 2 +-
>  drivers/net/bnxt/bnxt_txr.h | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
> index 0c5b74918..06a47dc49 100644
> --- a/drivers/net/bnxt/Makefile
> +++ b/drivers/net/bnxt/Makefile
> @@ -43,7 +43,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
>  ifeq ($(CONFIG_RTE_ARCH_X86), y)
>  SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
>  endif
> -ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
> +ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
>  SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
>  endif
>
Thanks for the changes.
With makefiles being deprecated, I don't think this will be required.
That said, I don't see drivers/net/bnxt/meson.build being modified.
Is that not required?


> diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
> index d5ce3b6d5..1c4027711 100644
> --- a/drivers/net/bnxt/bnxt_rxq.h
> +++ b/drivers/net/bnxt/bnxt_rxq.h
> @@ -22,7 +22,7 @@ struct bnxt_rx_queue {
>         uint16_t                nb_rx_hold; /* num held free RX desc */
>         uint16_t                rx_free_thresh; /* max free RX desc to
> hold */
>         uint16_t                queue_id; /* RX queue index */
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
>         uint16_t                rxrearm_nb; /* number of descs to reinit.
> */
>         uint16_t                rxrearm_start; /* next desc index to
> reinit. */
>  #endif
> diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
> index 2bf46cd91..e2fba1647 100644
> --- a/drivers/net/bnxt/bnxt_rxr.h
> +++ b/drivers/net/bnxt/bnxt_rxr.h
> @@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
>  int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>  int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
>  uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
>                             uint16_t nb_pkts);
>  int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
> diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
> index 7715c11b8..38e5ac9df 100644
> --- a/drivers/net/bnxt/bnxt_txr.h
> +++ b/drivers/net/bnxt/bnxt_txr.h
> @@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf
> **tx_pkts,
>                                uint16_t nb_pkts);
>  uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
>                               uint16_t nb_pkts);
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
>  uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
>                             uint16_t nb_pkts);
>  #endif
> --
> 2.20.1
>
>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32
  2020-08-19 17:45           ` Ajit Khaparde
@ 2020-08-20  3:00             ` Ruifeng Wang
  2020-08-20  9:13               ` Juraj Linkeš
  0 siblings, 1 reply; 122+ messages in thread
From: Ruifeng Wang @ 2020-08-20  3:00 UTC (permalink / raw)
  To: Ajit Khaparde (ajit.khaparde, Juraj Linkeš
  Cc: Bruce Richardson, Aaron Conole, maicolgabriel, dpdk-dev, nd

From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Sent: Thursday, August 20, 2020 1:46 AM
To: Juraj Linkeš <juraj.linkes@pantheon.tech>
Cc: Bruce Richardson <bruce.richardson@intel.com>; Aaron Conole <aconole@redhat.com>; maicolgabriel@hotmail.com; dpdk-dev <dev@dpdk.org>; Ruifeng Wang <Ruifeng.Wang@arm.com>
Subject: Re: [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32



On Fri, Aug 14, 2020 at 3:32 AM Juraj Linkeš <juraj.linkes@pantheon.tech<mailto:juraj.linkes@pantheon.tech>> wrote:
From: Ruifeng Wang <ruifeng.wang@arm.com<mailto:ruifeng.wang@arm.com>>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com<mailto:ruifeng.wang@arm.com>>
---
 drivers/net/bnxt/Makefile   | 2 +-
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
index 0c5b74918..06a47dc49 100644
--- a/drivers/net/bnxt/Makefile
+++ b/drivers/net/bnxt/Makefile
@@ -43,7 +43,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
-ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
 endif
Thanks for the changes.
With makefiles being deprecated, I don't think this will be required.
That said, I don't see drivers/net/bnxt/meson.build being modified.
Is that not required?

[Ruifeng] No, the meson.build doesn’t require to be modified.
It uses different method to flag inclusion of bnxt_rxtx_vec_neon.c and is compatible with aarch32 build.


diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index d5ce3b6d5..1c4027711 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
        uint16_t                nb_rx_hold; /* num held free RX desc */
        uint16_t                rx_free_thresh; /* max free RX desc to hold */
        uint16_t                queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
        uint16_t                rxrearm_nb; /* number of descs to reinit. */
        uint16_t                rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 2bf46cd91..e2fba1647 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);

-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                            uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 7715c11b8..38e5ac9df 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                               uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                              uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
                            uint16_t nb_pkts);
 #endif
--
2.20.1

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32
  2020-08-20  3:00             ` Ruifeng Wang
@ 2020-08-20  9:13               ` Juraj Linkeš
  0 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-20  9:13 UTC (permalink / raw)
  To: Ruifeng Wang, Ajit Khaparde (ajit.khaparde
  Cc: Bruce Richardson, Aaron Conole, maicolgabriel, dpdk-dev, nd



From: Ruifeng Wang <Ruifeng.Wang@arm.com>
Sent: Thursday, August 20, 2020 5:00 AM
To: Ajit Khaparde (ajit.khaparde@broadcom.com) <ajit.khaparde@broadcom.com>; Juraj Linkeš <juraj.linkes@pantheon.tech>
Cc: Bruce Richardson <bruce.richardson@intel.com>; Aaron Conole <aconole@redhat.com>; maicolgabriel@hotmail.com; dpdk-dev <dev@dpdk.org>; nd <nd@arm.com>
Subject: RE: [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32

From: Ajit Khaparde <ajit.khaparde@broadcom.com<mailto:ajit.khaparde@broadcom.com>>
Sent: Thursday, August 20, 2020 1:46 AM
To: Juraj Linkeš <juraj.linkes@pantheon.tech<mailto:juraj.linkes@pantheon.tech>>
Cc: Bruce Richardson <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>>; Aaron Conole <aconole@redhat.com<mailto:aconole@redhat.com>>; maicolgabriel@hotmail.com<mailto:maicolgabriel@hotmail.com>; dpdk-dev <dev@dpdk.org<mailto:dev@dpdk.org>>; Ruifeng Wang <Ruifeng.Wang@arm.com<mailto:Ruifeng.Wang@arm.com>>
Subject: Re: [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32



On Fri, Aug 14, 2020 at 3:32 AM Juraj Linkeš <juraj.linkes@pantheon.tech<mailto:juraj.linkes@pantheon.tech>> wrote:
From: Ruifeng Wang <ruifeng.wang@arm.com<mailto:ruifeng.wang@arm.com>>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com<mailto:ruifeng.wang@arm.com>>
---
 drivers/net/bnxt/Makefile   | 2 +-
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
index 0c5b74918..06a47dc49 100644
--- a/drivers/net/bnxt/Makefile
+++ b/drivers/net/bnxt/Makefile
@@ -43,7 +43,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c
 ifeq ($(CONFIG_RTE_ARCH_X86), y)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c
 endif
-ifeq ($(CONFIG_RTE_ARCH_ARM64), y)
+ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
 SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c
 endif
Thanks for the changes.
With makefiles being deprecated, I don't think this will be required.
That said, I don't see drivers/net/bnxt/meson.build being modified.
Is that not required?

[Ruifeng] No, the meson.build doesn’t require to be modified.
It uses different method to flag inclusion of bnxt_rxtx_vec_neon.c and is compatible with aarch32 build.

[Juraj] Since the makefile changes are not needed, I'll remove them in the next version.


diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index d5ce3b6d5..1c4027711 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
        uint16_t                nb_rx_hold; /* num held free RX desc */
        uint16_t                rx_free_thresh; /* max free RX desc to hold */
        uint16_t                queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
        uint16_t                rxrearm_nb; /* number of descs to reinit. */
        uint16_t                rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 2bf46cd91..e2fba1647 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);

-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                            uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 7715c11b8..38e5ac9df 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                               uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                              uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
                            uint16_t nb_pkts);
 #endif
--
2.20.1

^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support
  2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                           ` (4 preceding siblings ...)
  2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-08-25 13:04         ` Juraj Linkeš
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
                             ` (5 more replies)
  5 siblings, 6 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-25 13:04 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add support for aarch32 cross build in meson
and add aarch64 -> aarch32 cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is
distinct from arvm7 build.

Tested here:
[v6] https://travis-ci.com/github/jlinkes/dpdk/builds/179252628
[v7] https://travis-ci.com/github/jlinkes/dpdk/builds/179723067
[v8] https://travis-ci.com/github/jlinkes/dpdk/builds/181307330

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying
failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

v8:
Removed Makefile additions from net/bnxt patch.

Juraj Linkeš (3):
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (1):
  net/bnxt: add support for aarch32

 .ci/linux-build.sh                            |  7 ++++-
 .travis.yml                                   | 19 ++++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 +++++++++++
 config/arm/meson.build                        | 20 +++++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
 drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
 drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
 drivers/net/bnxt/bnxt_txr.h                   |  2 +-
 8 files changed, 86 insertions(+), 13 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v8 1/5] net/bnxt: add support for aarch32
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-08-25 13:04           ` Juraj Linkeš
  2020-08-25 19:05             ` Ajit Khaparde
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 2/5] build: add aarch32 meson build flags Juraj Linkeš
                             ` (4 subsequent siblings)
  5 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-25 13:04 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes, Ruifeng Wang

From: Ruifeng Wang <ruifeng.wang@arm.com>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index d5ce3b6d5..1c4027711 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 2bf46cd91..e2fba1647 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 7715c11b8..38e5ac9df 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v8 2/5] build: add aarch32 meson build flags
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-08-25 13:04           ` Juraj Linkeš
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
                             ` (3 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-25 13:04 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b29f27097 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -63,6 +63,11 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_aarch32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
+        ['RTE_MAX_LCORE', 256]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -90,6 +95,7 @@ flags_octeontx2_extra = [
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc']],
 	['native', ['-march=native']],
+	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -129,15 +135,23 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic]
 impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
 
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-
+update_flags = false
 if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARM', 1)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		impl_id = meson.get_cross_property('implementor_id', 'aarch32')
+		impl_pn = meson.get_cross_property('implementor_pn', 'default')
+		machine = get_variable('impl_' + impl_id)
+	else
+		machine_args += '-mfpu=neon'
+	endif
 else
+	update_flags = true
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
 
@@ -172,7 +186,9 @@ else
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
 		machine = get_variable('impl_' + impl_id)
 	endif
+endif
 
+if update_flags == true
 	# Apply Common Defaults. These settings may be overwritten by machine
 	# settings later.
 	foreach flag: flags_common_default
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v8 3/5] build: add aarch32 to meson cross-compilation
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 2/5] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-08-25 13:04           ` Juraj Linkeš
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                             ` (2 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-25 13:04 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 000000000..d3c4bce6c
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x41'
+implementor_pn = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                             ` (2 preceding siblings ...)
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-08-25 13:04           ` Juraj Linkeš
  2020-08-25 14:16             ` Aaron Conole
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 5/5] doc: add aarch32 build guidance Juraj Linkeš
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-25 13:04 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..c042b065c 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$AARCH32" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index d6eeab371..850faaac1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -98,6 +102,21 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v8 5/5] doc: add aarch32 build guidance
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                             ` (3 preceding siblings ...)
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-08-25 13:04           ` Juraj Linkeš
  2020-08-25 14:03             ` Aaron Conole
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-25 13:04 UTC (permalink / raw)
  To: bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index c5875a6d5..07085e3ea 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
+32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64.
+   An aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -88,18 +89,33 @@ To install it in Ubuntu::
 
    sudo apt-get install pkg-config-aarch64-linux-gnu
 
+.. note::
+
+    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
+    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
+    for aarch32 on aarch64. To install it in Ubuntu::
+
+       sudo dpkg --add-architecture armhf
+       sudo apt-get update
+       sudo apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make binutils
+
 To cross-compile DPDK on a desired target machine we can use the following
 command::
 
 	meson cross-build --cross-file <target_machine_configuration>
 	ninja -C cross-build
 
-For example if the target machine is arm64 we can use the following
+For example if the target machine is aarch64 we can use the following
 command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
 
+If the target machine is aarch32 we can use the following command::
+
+	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+	ninja -C arm32-build
+
 Configure and Cross Compile DPDK using Make
 -------------------------------------------
 To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v8 5/5] doc: add aarch32 build guidance
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-08-25 14:03             ` Aaron Conole
  2020-08-26  3:12               ` Phil Yang
  0 siblings, 1 reply; 122+ messages in thread
From: Aaron Conole @ 2020-08-25 14:03 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: bruce.richardson, maicolgabriel, dev, Phil Yang

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> From: Phil Yang <phil.yang@arm.com>
>
> Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.
>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> ---
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
>  1 file changed, 23 insertions(+), 7 deletions(-)
>
> diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> index c5875a6d5..07085e3ea 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -1,15 +1,16 @@
>  ..  SPDX-License-Identifier: BSD-3-Clause
>      Copyright(c) 2018 ARM Corporation.
>  
> -Cross compile DPDK for ARM64
> -============================
> -This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
> +Cross compile DPDK for aarch64 and aarch32
> +==========================================
> +This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
> +32-bit aarch32 DPDK from aarch64 build hosts.
>  
>  .. note::
>  
> -   Whilst it is recommended to natively build DPDK on ARM64 (just
> -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> -   ARM64 cross compile GNU toolchain is used for this.
> +   Whilst it is recommended to natively build DPDK on aarch64 (just
> +   like with x86), it is also possible to cross-build DPDK for aarch64.
> +   An aarch64 cross compile GNU toolchain is used for this.
>  
>  Obtain the cross tool chain
>  ---------------------------
> @@ -88,18 +89,33 @@ To install it in Ubuntu::
>  
>     sudo apt-get install pkg-config-aarch64-linux-gnu
>  
> +.. note::
> +
> +    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
> +    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
> +    for aarch32 on aarch64. To install it in Ubuntu::
> +
> +       sudo dpkg --add-architecture armhf
> +       sudo apt-get update
> +       sudo apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make binutils
> +

Is 'make' still needed?  I don't run Ubuntu, so I'm not sure.

>  To cross-compile DPDK on a desired target machine we can use the following
>  command::
>  
>  	meson cross-build --cross-file <target_machine_configuration>
>  	ninja -C cross-build
>  
> -For example if the target machine is arm64 we can use the following
> +For example if the target machine is aarch64 we can use the following
>  command::
>  
>  	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
>  	ninja -C arm64-build
>  
> +If the target machine is aarch32 we can use the following command::
> +
> +	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
> +	ninja -C arm32-build
> +
>  Configure and Cross Compile DPDK using Make
>  -------------------------------------------
>  To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-08-25 14:16             ` Aaron Conole
  2020-08-26  6:21               ` Juraj Linkeš
  0 siblings, 1 reply; 122+ messages in thread
From: Aaron Conole @ 2020-08-25 14:16 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: bruce.richardson, maicolgabriel, dev

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> Add two jobs (static and shared libs), both building on aarch64 and
> producing 32-bit arm binaries executable on armv8-a, but not armv7.
> Do not run tests in these jobs.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  .ci/linux-build.sh |  7 ++++++-
>  .travis.yml        | 19 +++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index d079801d7..c042b065c 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
>      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
>  fi
>  
> +if [ "$AARCH32" = "1" ]; then
> +    # convert the arch specifier
> +    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
> +fi
> +
>  if [ "$BUILD_DOCS" = "1" ]; then
>      OPTS="$OPTS -Denable_docs=true"
>  fi
> @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
>  meson build --werror $OPTS
>  ninja -C build
>  
> -if [ "$AARCH64" != "1" ]; then
> +if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; then

I'm not sure about this.  This will degrade the 32-bit x86 build, since it
will no longer execute the test-null.sh script.

Maybe we should re-use that flag for this series.  BUILD_32BIT ??

>      devtools/test-null.sh
>  fi
>  
> diff --git a/.travis.yml b/.travis.yml
> index d6eeab371..850faaac1 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
>    - *required_packages
>    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
>  
> +_arm_32b_packages: &arm_32b_packages
> +  - *required_packages
> +  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
> +
>  _build_32b_packages: &build_32b_packages
>    - *required_packages
>    - [gcc-multilib]
> @@ -98,6 +102,21 @@ jobs:
>          packages:
>            - *required_packages
>            - *doc_packages
> +  # aarch64 cross-compiling aarch32 jobs
> +  - env: DEF_LIB="shared" AARCH32=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_32b_packages
> +  - env: DEF_LIB="static" AARCH32=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_32b_packages
>    # aarch64 clang jobs
>    - env: DEF_LIB="static"
>      arch: arm64


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v8 1/5] net/bnxt: add support for aarch32
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-08-25 19:05             ` Ajit Khaparde
  0 siblings, 0 replies; 122+ messages in thread
From: Ajit Khaparde @ 2020-08-25 19:05 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: Bruce Richardson, Aaron Conole, maicolgabriel, dpdk-dev, Ruifeng Wang

On Tue, Aug 25, 2020 at 6:04 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
wrote:

> From: Ruifeng Wang <ruifeng.wang@arm.com>
>
> Expand vector PMD support to aarch32.
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
>

Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

> ---
>  drivers/net/bnxt/bnxt_rxq.h | 2 +-
>  drivers/net/bnxt/bnxt_rxr.h | 2 +-
>  drivers/net/bnxt/bnxt_txr.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
> index d5ce3b6d5..1c4027711 100644
> --- a/drivers/net/bnxt/bnxt_rxq.h
> +++ b/drivers/net/bnxt/bnxt_rxq.h
> @@ -22,7 +22,7 @@ struct bnxt_rx_queue {
>         uint16_t                nb_rx_hold; /* num held free RX desc */
>         uint16_t                rx_free_thresh; /* max free RX desc to
> hold */
>         uint16_t                queue_id; /* RX queue index */
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
>         uint16_t                rxrearm_nb; /* number of descs to reinit.
> */
>         uint16_t                rxrearm_start; /* next desc index to
> reinit. */
>  #endif
> diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
> index 2bf46cd91..e2fba1647 100644
> --- a/drivers/net/bnxt/bnxt_rxr.h
> +++ b/drivers/net/bnxt/bnxt_rxr.h
> @@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
>  int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>  int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
>  uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
>                             uint16_t nb_pkts);
>  int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
> diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
> index 7715c11b8..38e5ac9df 100644
> --- a/drivers/net/bnxt/bnxt_txr.h
> +++ b/drivers/net/bnxt/bnxt_txr.h
> @@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf
> **tx_pkts,
>                                uint16_t nb_pkts);
>  uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
>                               uint16_t nb_pkts);
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
>  uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
>                             uint16_t nb_pkts);
>  #endif
> --
> 2.20.1
>
>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v8 5/5] doc: add aarch32 build guidance
  2020-08-25 14:03             ` Aaron Conole
@ 2020-08-26  3:12               ` Phil Yang
  0 siblings, 0 replies; 122+ messages in thread
From: Phil Yang @ 2020-08-26  3:12 UTC (permalink / raw)
  To: Aaron Conole, Juraj Linkeš
  Cc: bruce.richardson, maicolgabriel, dev, nd, jerinj, nd

Aaron Conole <aconole@redhat.com> writes:

> Subject: Re: [PATCH v8 5/5] doc: add aarch32 build guidance
> 
> Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
> 
> > From: Phil Yang <phil.yang@arm.com>
> >
> > Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.
> >
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > ---
> >  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 30 ++++++++++++++-----
> >  1 file changed, 23 insertions(+), 7 deletions(-)
> >
> > diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > index c5875a6d5..07085e3ea 100644
> > --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > @@ -1,15 +1,16 @@
> >  ..  SPDX-License-Identifier: BSD-3-Clause
> >      Copyright(c) 2018 ARM Corporation.
> >
> > -Cross compile DPDK for ARM64
> > -============================
> > -This chapter describes how to cross compile DPDK for ARM64 from x86
> build hosts.
> > +Cross compile DPDK for aarch64 and aarch32
> > +==========================================
> > +This chapter describes how to cross compile DPDK for aarch64 from x86
> build hosts and compile
> > +32-bit aarch32 DPDK from aarch64 build hosts.
> >
> >  .. note::
> >
> > -   Whilst it is recommended to natively build DPDK on ARM64 (just
> > -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> > -   ARM64 cross compile GNU toolchain is used for this.
> > +   Whilst it is recommended to natively build DPDK on aarch64 (just
> > +   like with x86), it is also possible to cross-build DPDK for aarch64.
> > +   An aarch64 cross compile GNU toolchain is used for this.
> >
> >  Obtain the cross tool chain
> >  ---------------------------
> > @@ -88,18 +89,33 @@ To install it in Ubuntu::
> >
> >     sudo apt-get install pkg-config-aarch64-linux-gnu
> >
> > +.. note::
> > +
> > +    Some aarch64 platforms support EL0 aarch32 mode, which means the
> 32-bit aarch32 applications
> > +    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-
> gnueabihf`` is required
> > +    for aarch32 on aarch64. To install it in Ubuntu::
> > +
> > +       sudo dpkg --add-architecture armhf
> > +       sudo apt-get update
> > +       sudo apt-get install -y gcc gcc-arm-linux-gnueabihf libc6:armhf make
> binutils
> > +
> 
> Is 'make' still needed?  I don't run Ubuntu, so I'm not sure.


No, both 'GCC' and 'make' are not mandatory in this case.
Will update it in the next version.


> 
> >  To cross-compile DPDK on a desired target machine we can use the
> following
> >  command::
> >
> >  	meson cross-build --cross-file <target_machine_configuration>
> >  	ninja -C cross-build
> >
> > -For example if the target machine is arm64 we can use the following
                                                                                      ^^^ Will use 'users' instead               


> > +For example if the target machine is aarch64 we can use the following
                                                                                         ^^^ Will use 'users' instead

> >  command::
> >
> >  	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> >  	ninja -C arm64-build
> >
> > +If the target machine is aarch32 we can use the following command::
                                                                   ^^^ Will use 'users' instead

> > +
> > +	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
> > +	ninja -C arm32-build
> > +
> >  Configure and Cross Compile DPDK using Make
> >  -------------------------------------------
> >  To configure a build, choose one of the target configurations, like arm64-
> dpaa-linux-gcc and arm64-thunderx-linux-gcc.


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-08-25 14:16             ` Aaron Conole
@ 2020-08-26  6:21               ` Juraj Linkeš
  0 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-26  6:21 UTC (permalink / raw)
  To: Aaron Conole; +Cc: bruce.richardson, maicolgabriel, dev



> -----Original Message-----
> From: Aaron Conole <aconole@redhat.com>
> Sent: Tuesday, August 25, 2020 4:16 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: bruce.richardson@intel.com; maicolgabriel@hotmail.com; dev@dpdk.org
> Subject: Re: [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
> 
> Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
> 
> > Add two jobs (static and shared libs), both building on aarch64 and
> > producing 32-bit arm binaries executable on armv8-a, but not armv7.
> > Do not run tests in these jobs.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> >  .ci/linux-build.sh |  7 ++++++-
> >  .travis.yml        | 19 +++++++++++++++++++
> >  2 files changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > d079801d7..c042b065c 100755
> > --- a/.ci/linux-build.sh
> > +++ b/.ci/linux-build.sh
> > @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
> >      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> >  fi
> >
> > +if [ "$AARCH32" = "1" ]; then
> > +    # convert the arch specifier
> > +    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
> > +fi
> > +
> >  if [ "$BUILD_DOCS" = "1" ]; then
> >      OPTS="$OPTS -Denable_docs=true"
> >  fi
> > @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
> >  meson build --werror $OPTS
> >  ninja -C build
> >
> > -if [ "$AARCH64" != "1" ]; then
> > +if file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname
> > +-m)"; then
> 
> I'm not sure about this.  This will degrade the 32-bit x86 build, since it will no
> longer execute the test-null.sh script.
> 
> Maybe we should re-use that flag for this series.  BUILD_32BIT ??
> 

So this omits running test-null.sh with 32-bit builds on 64bit systems and we want to run that? Then it's probably the easiest to just disable the check for x86_64 -> aarch64 and x86_64 -> aarch32 builds. I wanted something more elegant here but it's a bit more complicated.

> >      devtools/test-null.sh
> >  fi
> >
> > diff --git a/.travis.yml b/.travis.yml index d6eeab371..850faaac1
> > 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
> >    - *required_packages
> >    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross,
> > pkg-config-aarch64-linux-gnu]
> >
> > +_arm_32b_packages: &arm_32b_packages
> > +  - *required_packages
> > +  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross,
> > +pkg-config-arm-linux-gnueabihf]
> > +
> >  _build_32b_packages: &build_32b_packages
> >    - *required_packages
> >    - [gcc-multilib]
> > @@ -98,6 +102,21 @@ jobs:
> >          packages:
> >            - *required_packages
> >            - *doc_packages
> > +  # aarch64 cross-compiling aarch32 jobs
> > +  - env: DEF_LIB="shared" AARCH32=1
> > +    arch: arm64
> > +    compiler: gcc
> > +    addons:
> > +      apt:
> > +        packages:
> > +          - *arm_32b_packages
> > +  - env: DEF_LIB="static" AARCH32=1
> > +    arch: arm64
> > +    compiler: gcc
> > +    addons:
> > +      apt:
> > +        packages:
> > +          - *arm_32b_packages
> >    # aarch64 clang jobs
> >    - env: DEF_LIB="static"
> >      arch: arm64
> 


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support
  2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                             ` (4 preceding siblings ...)
  2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-08-28 11:38           ` Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
                               ` (5 more replies)
  5 siblings, 6 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-28 11:38 UTC (permalink / raw)
  To: thomas, david.marchand, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add support for aarch32 cross build in meson
and add aarch64 -> aarch32 cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is
distinct from arvm7 build.

Tested here:
[v6] https://travis-ci.com/github/jlinkes/dpdk/builds/179252628
[v7] https://travis-ci.com/github/jlinkes/dpdk/builds/179723067
[v8] https://travis-ci.com/github/jlinkes/dpdk/builds/181307330
[v9] https://travis-ci.com/github/jlinkes/dpdk/builds/181781602

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying
failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

v8:
Removed Makefile additions from net/bnxt patch.

v9:
Changed ci test-null.sh condition, only run it if not
cross-compiling aarch64 nor aarch32.
Cleaned up docs.

Juraj Linkeš (3):
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (1):
  net/bnxt: add support for aarch32

 .ci/linux-build.sh                            |  7 +++-
 .travis.yml                                   | 19 +++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 ++++++++++
 config/arm/meson.build                        | 20 +++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
 drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
 drivers/net/bnxt/bnxt_txr.h                   |  2 +-
 8 files changed, 87 insertions(+), 16 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v9 1/5] net/bnxt: add support for aarch32
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-08-28 11:38             ` Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 2/5] build: add aarch32 meson build flags Juraj Linkeš
                               ` (4 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-28 11:38 UTC (permalink / raw)
  To: thomas, david.marchand, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng Wang

From: Ruifeng Wang <ruifeng.wang@arm.com>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index d5ce3b6d5..1c4027711 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 2bf46cd91..e2fba1647 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 7715c11b8..38e5ac9df 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v9 2/5] build: add aarch32 meson build flags
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-08-28 11:38             ` Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
                               ` (3 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-28 11:38 UTC (permalink / raw)
  To: thomas, david.marchand, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b29f27097 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -63,6 +63,11 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_aarch32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
+        ['RTE_MAX_LCORE', 256]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -90,6 +95,7 @@ flags_octeontx2_extra = [
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc']],
 	['native', ['-march=native']],
+	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -129,15 +135,23 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic]
 impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
 
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-
+update_flags = false
 if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARM', 1)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		impl_id = meson.get_cross_property('implementor_id', 'aarch32')
+		impl_pn = meson.get_cross_property('implementor_pn', 'default')
+		machine = get_variable('impl_' + impl_id)
+	else
+		machine_args += '-mfpu=neon'
+	endif
 else
+	update_flags = true
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
 
@@ -172,7 +186,9 @@ else
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
 		machine = get_variable('impl_' + impl_id)
 	endif
+endif
 
+if update_flags == true
 	# Apply Common Defaults. These settings may be overwritten by machine
 	# settings later.
 	foreach flag: flags_common_default
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v9 3/5] build: add aarch32 to meson cross-compilation
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 2/5] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-08-28 11:38             ` Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                               ` (2 subsequent siblings)
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-28 11:38 UTC (permalink / raw)
  To: thomas, david.marchand, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 000000000..d3c4bce6c
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x41'
+implementor_pn = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v9 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                               ` (2 preceding siblings ...)
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-08-28 11:38             ` Juraj Linkeš
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 5/5] doc: add aarch32 build guidance Juraj Linkeš
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-28 11:38 UTC (permalink / raw)
  To: thomas, david.marchand, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..dd32392a9 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$AARCH32" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if [ "$AARCH64" != "1" ] and [ "$AARCH32" != "1" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index d6eeab371..850faaac1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -98,6 +102,21 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v9 5/5] doc: add aarch32 build guidance
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                               ` (3 preceding siblings ...)
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-08-28 11:38             ` Juraj Linkeš
  2020-09-11 13:20               ` Aaron Conole
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  5 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-08-28 11:38 UTC (permalink / raw)
  To: thomas, david.marchand, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Change-Id: Ib4281defa37ed4d08e1c3210c94fb7ce73b36449
Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index c5875a6d5..fd0405d6d 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
+32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64.
+   An aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -88,18 +89,31 @@ To install it in Ubuntu::
 
    sudo apt-get install pkg-config-aarch64-linux-gnu
 
-To cross-compile DPDK on a desired target machine we can use the following
-command::
+.. note::
+
+    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
+    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
+    for aarch32 on aarch64. To install it in Ubuntu::
+
+       sudo dpkg --add-architecture armhf
+       sudo apt-get update
+       sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf binutils
+
+To cross-compile DPDK on a desired target machine use the following command::
 
 	meson cross-build --cross-file <target_machine_configuration>
 	ninja -C cross-build
 
-For example if the target machine is arm64 we can use the following
-command::
+For example if the target machine is aarch64 use the following command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
 
+If the target machine is aarch32 use the following command::
+
+	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+	ninja -C arm32-build
+
 Configure and Cross Compile DPDK using Make
 -------------------------------------------
 To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v9 5/5] doc: add aarch32 build guidance
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-09-11 13:20               ` Aaron Conole
  2020-09-16  8:04                 ` Juraj Linkeš
  0 siblings, 1 reply; 122+ messages in thread
From: Aaron Conole @ 2020-09-11 13:20 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: thomas, david.marchand, maicolgabriel, dev, Phil Yang

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> From: Phil Yang <phil.yang@arm.com>
>
> Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.
>
> Change-Id: Ib4281defa37ed4d08e1c3210c94fb7ce73b36449
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> ---

I think Change-Id is not a tag that is used in DPDK.  Otherwise, this
looks good to me.

Consider the series ACK with 'Change-Id' removed.

>  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
>  1 file changed, 24 insertions(+), 10 deletions(-)
>
> diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> index c5875a6d5..fd0405d6d 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -1,15 +1,16 @@
>  ..  SPDX-License-Identifier: BSD-3-Clause
>      Copyright(c) 2018 ARM Corporation.
>  
> -Cross compile DPDK for ARM64
> -============================
> -This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
> +Cross compile DPDK for aarch64 and aarch32
> +==========================================
> +This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
> +32-bit aarch32 DPDK from aarch64 build hosts.
>  
>  .. note::
>  
> -   Whilst it is recommended to natively build DPDK on ARM64 (just
> -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> -   ARM64 cross compile GNU toolchain is used for this.
> +   Whilst it is recommended to natively build DPDK on aarch64 (just
> +   like with x86), it is also possible to cross-build DPDK for aarch64.
> +   An aarch64 cross compile GNU toolchain is used for this.
>  
>  Obtain the cross tool chain
>  ---------------------------
> @@ -88,18 +89,31 @@ To install it in Ubuntu::
>  
>     sudo apt-get install pkg-config-aarch64-linux-gnu
>  
> -To cross-compile DPDK on a desired target machine we can use the following
> -command::
> +.. note::
> +
> +    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
> +    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
> +    for aarch32 on aarch64. To install it in Ubuntu::
> +
> +       sudo dpkg --add-architecture armhf
> +       sudo apt-get update
> +       sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf binutils
> +
> +To cross-compile DPDK on a desired target machine use the following command::
>  
>  	meson cross-build --cross-file <target_machine_configuration>
>  	ninja -C cross-build
>  
> -For example if the target machine is arm64 we can use the following
> -command::
> +For example if the target machine is aarch64 use the following command::
>  
>  	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
>  	ninja -C arm64-build
>  
> +If the target machine is aarch32 use the following command::
> +
> +	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
> +	ninja -C arm32-build
> +
>  Configure and Cross Compile DPDK using Make
>  -------------------------------------------
>  To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v9 5/5] doc: add aarch32 build guidance
  2020-09-11 13:20               ` Aaron Conole
@ 2020-09-16  8:04                 ` Juraj Linkeš
  0 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-09-16  8:04 UTC (permalink / raw)
  To: Aaron Conole; +Cc: thomas, david.marchand, maicolgabriel, dev, Phil Yang



> -----Original Message-----
> From: Aaron Conole <aconole@redhat.com>
> Sent: Friday, September 11, 2020 3:20 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: thomas@monjalon.net; david.marchand@redhat.com;
> maicolgabriel@hotmail.com; dev@dpdk.org; Phil Yang <phil.yang@arm.com>
> Subject: Re: [PATCH v9 5/5] doc: add aarch32 build guidance
> 
> Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
> 
> > From: Phil Yang <phil.yang@arm.com>
> >
> > Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.
> >
> > Change-Id: Ib4281defa37ed4d08e1c3210c94fb7ce73b36449
> > Signed-off-by: Phil Yang <phil.yang@arm.com>
> > ---
> 
> I think Change-Id is not a tag that is used in DPDK.  Otherwise, this looks good to
> me.
> 
> Consider the series ACK with 'Change-Id' removed.
> 

Great, I'll resubmit.

> >  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34
> > +++++++++++++------
> >  1 file changed, 24 insertions(+), 10 deletions(-)
> >
> > diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > index c5875a6d5..fd0405d6d 100644
> > --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> > @@ -1,15 +1,16 @@
> >  ..  SPDX-License-Identifier: BSD-3-Clause
> >      Copyright(c) 2018 ARM Corporation.
> >
> > -Cross compile DPDK for ARM64
> > -============================
> > -This chapter describes how to cross compile DPDK for ARM64 from x86 build
> hosts.
> > +Cross compile DPDK for aarch64 and aarch32
> > +==========================================
> > +This chapter describes how to cross compile DPDK for aarch64 from x86
> > +build hosts and compile 32-bit aarch32 DPDK from aarch64 build hosts.
> >
> >  .. note::
> >
> > -   Whilst it is recommended to natively build DPDK on ARM64 (just
> > -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> > -   ARM64 cross compile GNU toolchain is used for this.
> > +   Whilst it is recommended to natively build DPDK on aarch64 (just
> > +   like with x86), it is also possible to cross-build DPDK for aarch64.
> > +   An aarch64 cross compile GNU toolchain is used for this.
> >
> >  Obtain the cross tool chain
> >  ---------------------------
> > @@ -88,18 +89,31 @@ To install it in Ubuntu::
> >
> >     sudo apt-get install pkg-config-aarch64-linux-gnu
> >
> > -To cross-compile DPDK on a desired target machine we can use the
> > following
> > -command::
> > +.. note::
> > +
> > +    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-
> bit aarch32 applications
> > +    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-
> gnueabihf`` is required
> > +    for aarch32 on aarch64. To install it in Ubuntu::
> > +
> > +       sudo dpkg --add-architecture armhf
> > +       sudo apt-get update
> > +       sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf
> > + binutils
> > +
> > +To cross-compile DPDK on a desired target machine use the following
> command::
> >
> >  	meson cross-build --cross-file <target_machine_configuration>
> >  	ninja -C cross-build
> >
> > -For example if the target machine is arm64 we can use the following
> > -command::
> > +For example if the target machine is aarch64 use the following command::
> >
> >  	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
> >  	ninja -C arm64-build
> >
> > +If the target machine is aarch32 use the following command::
> > +
> > +	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
> > +	ninja -C arm32-build
> > +
> >  Configure and Cross Compile DPDK using Make
> >  -------------------------------------------
> >  To configure a build, choose one of the target configurations, like arm64-
> dpaa-linux-gcc and arm64-thunderx-linux-gcc.
> 


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support
  2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                               ` (4 preceding siblings ...)
  2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-09-16  8:21             ` Juraj Linkeš
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
                                 ` (8 more replies)
  5 siblings, 9 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-09-16  8:21 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add support for aarch32 cross build in meson
and add aarch64 -> aarch32 cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is
distinct from arvm7 build.

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying
failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

v8:
Removed Makefile additions from net/bnxt patch.

v9:
Changed ci test-null.sh condition, only run it if not
cross-compiling aarch64 nor aarch32.
Cleaned up docs.

v10:
Fixed doc: add aarch32 build guidance commit message.

Juraj Linkeš (3):
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (1):
  net/bnxt: add support for aarch32

 .ci/linux-build.sh                            |  7 +++-
 .travis.yml                                   | 19 +++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 ++++++++++
 config/arm/meson.build                        | 20 +++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
 drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
 drivers/net/bnxt/bnxt_txr.h                   |  2 +-
 8 files changed, 87 insertions(+), 16 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-09-16  8:21               ` Juraj Linkeš
  2020-11-04 18:30                 ` Lance Richardson
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags Juraj Linkeš
                                 ` (7 subsequent siblings)
  8 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-09-16  8:21 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: juraj.linkes, dev, Ruifeng Wang

From: Ruifeng Wang <ruifeng.wang@arm.com>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index d5ce3b6d5..1c4027711 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -22,7 +22,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_hold; /* num held free RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 2bf46cd91..e2fba1647 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 7715c11b8..38e5ac9df 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
 uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			      uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-09-16  8:21               ` Juraj Linkeš
  2020-10-21 14:24                 ` Ruifeng Wang
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
                                 ` (6 subsequent siblings)
  8 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-09-16  8:21 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b29f27097 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -63,6 +63,11 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_aarch32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
+        ['RTE_MAX_LCORE', 256]]
 flags_n1sdp_extra = [
 	['RTE_MACHINE', '"n1sdp"'],
 	['RTE_MAX_NUMA_NODES', 1],
@@ -90,6 +95,7 @@ flags_octeontx2_extra = [
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc']],
 	['native', ['-march=native']],
+	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -129,15 +135,23 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic]
 impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
 
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-
+update_flags = false
 if not dpdk_conf.get('RTE_ARCH_64')
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARM', 1)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		impl_id = meson.get_cross_property('implementor_id', 'aarch32')
+		impl_pn = meson.get_cross_property('implementor_pn', 'default')
+		machine = get_variable('impl_' + impl_id)
+	else
+		machine_args += '-mfpu=neon'
+	endif
 else
+	update_flags = true
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
 
@@ -172,7 +186,9 @@ else
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
 		machine = get_variable('impl_' + impl_id)
 	endif
+endif
 
+if update_flags == true
 	# Apply Common Defaults. These settings may be overwritten by machine
 	# settings later.
 	foreach flag: flags_common_default
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-compilation
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-09-16  8:21               ` Juraj Linkeš
  2020-10-21 14:27                 ` Ruifeng Wang
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                                 ` (5 subsequent siblings)
  8 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-09-16  8:21 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 000000000..d3c4bce6c
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x41'
+implementor_pn = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                 ` (2 preceding siblings ...)
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-09-16  8:21               ` Juraj Linkeš
  2020-10-21 14:29                 ` Ruifeng Wang
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance Juraj Linkeš
                                 ` (4 subsequent siblings)
  8 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-09-16  8:21 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: juraj.linkes, dev

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..cdb371565 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$AARCH32" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if [ "$AARCH64" != "1" ] && [ "$AARCH32" != "1" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index d6eeab371..850faaac1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -98,6 +102,21 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                 ` (3 preceding siblings ...)
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-09-16  8:21               ` Juraj Linkeš
  2020-10-21 14:32                 ` Ruifeng Wang
  2020-10-21 11:42               ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                 ` (3 subsequent siblings)
  8 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-09-16  8:21 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: juraj.linkes, dev, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index 8a1d0e88b..1f2ff751d 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
+32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64.
+   An aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -88,14 +89,27 @@ To install it in Ubuntu::
 
    sudo apt-get install pkg-config-aarch64-linux-gnu
 
-To cross-compile DPDK on a desired target machine we can use the following
-command::
+.. note::
+
+    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
+    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
+    for aarch32 on aarch64. To install it in Ubuntu::
+
+       sudo dpkg --add-architecture armhf
+       sudo apt-get update
+       sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf binutils
+
+To cross-compile DPDK on a desired target machine use the following command::
 
 	meson cross-build --cross-file <target_machine_configuration>
 	ninja -C cross-build
 
-For example if the target machine is arm64 we can use the following
-command::
+For example if the target machine is aarch64 use the following command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
+
+If the target machine is aarch32 use the following command::
+
+	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+	ninja -C arm32-build
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                 ` (4 preceding siblings ...)
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-10-21 11:42               ` Juraj Linkeš
  2020-10-21 11:52                 ` Thomas Monjalon
  2020-10-28  9:22               ` Jerin Jacob
                                 ` (2 subsequent siblings)
  8 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-10-21 11:42 UTC (permalink / raw)
  To: Juraj Linkeš, thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, Honnappa Nagarahalli, Ruifeng.Wang

Hi Folks,

This patch series has been submitted more than a month ago. There have been no comments. Should I just wait a bit more or what should I do?

Thanks,
Juraj

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Wednesday, September 16, 2020 10:21 AM
> To: thomas@monjalon.net; bruce.richardson@intel.com; aconole@redhat.com;
> maicolgabriel@hotmail.com
> Cc: Juraj Linkeš <juraj.linkes@pantheon.tech>; dev@dpdk.org
> Subject: [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support
> 
> Add support for aarch32 cross build in meson and add aarch64 -> aarch32 cross
> build to Travis.
> 
> Aarch32 is an execution state that allows execution of 32-bit code on
> armv8 machines. This execution state contains a superset of previous
> armv7 32-bit instructions and features. Thus the aarch32 build is distinct from
> arvm7 build.
> 
> v4:
> Removed disabled drivers which actually build on arm32.
> Also tested the patchset with series 9609 which fixes underlying failures.
> 
> v5:
> Changed the condition for running test-null.sh in ci.
> Re-uploaded after underlying fixes have been committed.
> 
> v6:
> Changed the condition for running test-null.sh again.
> Reworked the patch to do aarch32 build instead of arvm7-a build.
> Simplified meson build flags. Changed commit msgs.
> Added 32b qualifier to .travis.yml.
> Added a patch with fixes for bnxt.
> Added a patch with cross compilation docs.
> 
> v7:
> Rebased the patchset.
> 
> v8:
> Removed Makefile additions from net/bnxt patch.
> 
> v9:
> Changed ci test-null.sh condition, only run it if not cross-compiling aarch64 nor
> aarch32.
> Cleaned up docs.
> 
> v10:
> Fixed doc: add aarch32 build guidance commit message.
> 
> Juraj Linkeš (3):
>   build: add aarch32 meson build flags
>   build: add aarch32 to meson cross-compilation
>   ci: add aarch64 -> aarch32 cross compiling jobs
> 
> Phil Yang (1):
>   doc: add aarch32 build guidance
> 
> Ruifeng Wang (1):
>   net/bnxt: add support for aarch32
> 
>  .ci/linux-build.sh                            |  7 +++-
>  .travis.yml                                   | 19 +++++++++++
>  config/arm/arm32_armv8a_linux_gcc             | 17 ++++++++++
>  config/arm/meson.build                        | 20 +++++++++--
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
>  drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
>  drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
>  drivers/net/bnxt/bnxt_txr.h                   |  2 +-
>  8 files changed, 87 insertions(+), 16 deletions(-)  create mode 100644
> config/arm/arm32_armv8a_linux_gcc
> 
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support
  2020-10-21 11:42               ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-10-21 11:52                 ` Thomas Monjalon
  0 siblings, 0 replies; 122+ messages in thread
From: Thomas Monjalon @ 2020-10-21 11:52 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: bruce.richardson, aconole, maicolgabriel, dev,
	Honnappa Nagarahalli, Ruifeng.Wang

21/10/2020 13:42, Juraj Linkeš:
> Hi Folks,
> 
> This patch series has been submitted more than a month ago.
> There have been no comments.
> Should I just wait a bit more or what should I do?

First thing to do is to get acks from Arm maintainers.
There are other patchset in the same area that I'm not sure they are ready.
It seems Arm team is a bit behind recently.




^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-10-21 14:24                 ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-10-21 14:24 UTC (permalink / raw)
  To: Juraj Linkeš, thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, nd


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Juraj Linke?
> Sent: Wednesday, September 16, 2020 4:21 PM
> To: thomas@monjalon.net; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com
> Cc: juraj.linkes@pantheon.tech; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags
> 
> Add aarch32 extra build flags and aarch32 machine flags to generic machine
> args.
> Also modify how arm flags are updated in meson build - for 32-bit build,
> update only if cross-compiling.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  config/arm/meson.build | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/config/arm/meson.build b/config/arm/meson.build index
> 8728051d5..b29f27097 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -63,6 +63,11 @@ flags_armada = [
>  	['RTE_MAX_LCORE', 16]]
> 
>  flags_default_extra = []
> +flags_aarch32_extra = [
> +        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
> +        ['RTE_ARCH_STRICT_ALIGN', true],
> +        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
> +        ['RTE_MAX_LCORE', 256]]
>  flags_n1sdp_extra = [
>  	['RTE_MACHINE', '"n1sdp"'],
>  	['RTE_MAX_NUMA_NODES', 1],
> @@ -90,6 +95,7 @@ flags_octeontx2_extra = [  machine_args_generic = [
>  	['default', ['-march=armv8-a+crc']],
>  	['native', ['-march=native']],
> +	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
>  	['0xd03', ['-mcpu=cortex-a53']],
>  	['0xd04', ['-mcpu=cortex-a35']],
>  	['0xd07', ['-mcpu=cortex-a57']],
> @@ -129,15 +135,23 @@ impl_0x69 = ['Intel', flags_generic,
> machine_args_generic]  impl_dpaa = ['NXP DPAA', flags_dpaa,
> machine_args_generic]
> 
>  dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
> -
> +update_flags = false
>  if not dpdk_conf.get('RTE_ARCH_64')
>  	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
>  	dpdk_conf.set('RTE_ARCH_ARM', 1)
>  	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
>  	# the minimum architecture supported, armv7-a, needs the following,
>  	# mk/machine/armv7a/rte.vars.mk sets it too
> -	machine_args += '-mfpu=neon'
> +	if meson.is_cross_build()
> +		update_flags = true
> +		impl_id = meson.get_cross_property('implementor_id',
> 'aarch32')
> +		impl_pn = meson.get_cross_property('implementor_pn',
> 'default')
> +		machine = get_variable('impl_' + impl_id)
> +	else
> +		machine_args += '-mfpu=neon'
> +	endif
>  else
> +	update_flags = true
>  	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
>  	dpdk_conf.set('RTE_ARCH_ARM64', 1)
> 
> @@ -172,7 +186,9 @@ else
>  		impl_pn = meson.get_cross_property('implementor_pn',
> 'default')
>  		machine = get_variable('impl_' + impl_id)
>  	endif
> +endif
> 
> +if update_flags == true
>  	# Apply Common Defaults. These settings may be overwritten by
> machine
>  	# settings later.
>  	foreach flag: flags_common_default
> --
> 2.20.1

Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-compilation
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-10-21 14:27                 ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-10-21 14:27 UTC (permalink / raw)
  To: Juraj Linkeš, thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, nd


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Juraj Linke?
> Sent: Wednesday, September 16, 2020 4:21 PM
> To: thomas@monjalon.net; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com
> Cc: juraj.linkes@pantheon.tech; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-
> compilation
> 
> Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
> toolset which comes with standard packages on most used systems, such as
> Ubuntu and CentOS.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 config/arm/arm32_armv8a_linux_gcc
> 
> diff --git a/config/arm/arm32_armv8a_linux_gcc
> b/config/arm/arm32_armv8a_linux_gcc
> new file mode 100644
> index 000000000..d3c4bce6c
> --- /dev/null
> +++ b/config/arm/arm32_armv8a_linux_gcc
> @@ -0,0 +1,17 @@
> +[binaries]
> +c = 'arm-linux-gnueabihf-gcc'
> +cpp = 'arm-linux-gnueabihf-cpp'
> +ar = 'arm-linux-gnueabihf-gcc-ar'
> +strip = 'arm-linux-gnueabihf-strip'
> +pkgconfig = 'arm-linux-gnueabihf-pkg-config'
> +pcap-config = ''
> +
> +[host_machine]
> +system = 'linux'
> +cpu_family = 'aarch64'
> +cpu = 'armv8-a'
> +endian = 'little'
> +
> +[properties]
> +implementor_id = '0x41'
> +implementor_pn = 'aarch32'
> --
> 2.20.1

Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-10-21 14:29                 ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-10-21 14:29 UTC (permalink / raw)
  To: Juraj Linkeš, thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, nd


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Juraj Linke?
> Sent: Wednesday, September 16, 2020 4:21 PM
> To: thomas@monjalon.net; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com
> Cc: juraj.linkes@pantheon.tech; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross
> compiling jobs
> 
> Add two jobs (static and shared libs), both building on aarch64 and producing
> 32-bit arm binaries executable on armv8-a, but not armv7.
> Do not run tests in these jobs.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  .ci/linux-build.sh |  7 ++++++-
>  .travis.yml        | 19 +++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index d079801d7..cdb371565
> 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
>      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
>  fi
> 
> +if [ "$AARCH32" = "1" ]; then
> +    # convert the arch specifier
> +    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
> +fi
> +
>  if [ "$BUILD_DOCS" = "1" ]; then
>      OPTS="$OPTS -Denable_docs=true"
>  fi
> @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
>  meson build --werror $OPTS
>  ninja -C build
> 
> -if [ "$AARCH64" != "1" ]; then
> +if [ "$AARCH64" != "1" ] && [ "$AARCH32" != "1" ]; then
>      devtools/test-null.sh
>  fi
> 
> diff --git a/.travis.yml b/.travis.yml
> index d6eeab371..850faaac1 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
>    - *required_packages
>    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-
> gnu]
> 
> +_arm_32b_packages: &arm_32b_packages
> +  - *required_packages
> +  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross,
> +pkg-config-arm-linux-gnueabihf]
> +
>  _build_32b_packages: &build_32b_packages
>    - *required_packages
>    - [gcc-multilib]
> @@ -98,6 +102,21 @@ jobs:
>          packages:
>            - *required_packages
>            - *doc_packages
> +  # aarch64 cross-compiling aarch32 jobs
> +  - env: DEF_LIB="shared" AARCH32=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_32b_packages
> +  - env: DEF_LIB="static" AARCH32=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_32b_packages
>    # aarch64 clang jobs
>    - env: DEF_LIB="static"
>      arch: arm64
> --
> 2.20.1

Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-10-21 14:32                 ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-10-21 14:32 UTC (permalink / raw)
  To: Juraj Linkeš, thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, Phil Yang, nd


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Juraj Linke?
> Sent: Wednesday, September 16, 2020 4:21 PM
> To: thomas@monjalon.net; bruce.richardson@intel.com;
> aconole@redhat.com; maicolgabriel@hotmail.com
> Cc: juraj.linkes@pantheon.tech; dev@dpdk.org; Phil Yang
> <Phil.Yang@arm.com>
> Subject: [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance
> 
> From: Phil Yang <phil.yang@arm.com>
> 
> Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.
> 
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> ---
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
>  1 file changed, 24 insertions(+), 10 deletions(-)
> 
> diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> index 8a1d0e88b..1f2ff751d 100644
> --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
> @@ -1,15 +1,16 @@
>  ..  SPDX-License-Identifier: BSD-3-Clause
>      Copyright(c) 2018 ARM Corporation.
> 
> -Cross compile DPDK for ARM64
> -============================
> -This chapter describes how to cross compile DPDK for ARM64 from x86 build
> hosts.
> +Cross compile DPDK for aarch64 and aarch32
> +==========================================
> +This chapter describes how to cross compile DPDK for aarch64 from x86
> +build hosts and compile 32-bit aarch32 DPDK from aarch64 build hosts.
> 
>  .. note::
> 
> -   Whilst it is recommended to natively build DPDK on ARM64 (just
> -   like with x86), it is also possible to cross-build DPDK for ARM64. An
> -   ARM64 cross compile GNU toolchain is used for this.
> +   Whilst it is recommended to natively build DPDK on aarch64 (just
> +   like with x86), it is also possible to cross-build DPDK for aarch64.
> +   An aarch64 cross compile GNU toolchain is used for this.
> 
>  Obtain the cross tool chain
>  ---------------------------
> @@ -88,14 +89,27 @@ To install it in Ubuntu::
> 
>     sudo apt-get install pkg-config-aarch64-linux-gnu
> 
> -To cross-compile DPDK on a desired target machine we can use the
> following
> -command::
> +.. note::
> +
> +    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-
> bit aarch32 applications
> +    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-
> gnueabihf`` is required
> +    for aarch32 on aarch64. To install it in Ubuntu::
> +
> +       sudo dpkg --add-architecture armhf
> +       sudo apt-get update
> +       sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf
> + binutils
> +
> +To cross-compile DPDK on a desired target machine use the following
> command::
> 
>  	meson cross-build --cross-file <target_machine_configuration>
>  	ninja -C cross-build
> 
> -For example if the target machine is arm64 we can use the following
> -command::
> +For example if the target machine is aarch64 use the following command::
> 
>  	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
>  	ninja -C arm64-build
> +
> +If the target machine is aarch32 use the following command::
> +
> +	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
> +	ninja -C arm32-build
> --
> 2.20.1

Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                 ` (5 preceding siblings ...)
  2020-10-21 11:42               ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-10-28  9:22               ` Jerin Jacob
  2020-11-30 14:03               ` Aaron Conole
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
  8 siblings, 0 replies; 122+ messages in thread
From: Jerin Jacob @ 2020-10-28  9:22 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: Thomas Monjalon, Richardson, Bruce, Aaron Conole,
	Michael Santana, dpdk-dev

On Wed, Sep 16, 2020 at 1:51 PM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
> Add support for aarch32 cross build in meson
> and add aarch64 -> aarch32 cross build to Travis.
>
> Aarch32 is an execution state that allows execution of 32-bit code on
> armv8 machines. This execution state contains a superset of previous
> armv7 32-bit instructions and features. Thus the aarch32 build is
> distinct from arvm7 build.
>
> v4:
> Removed disabled drivers which actually build on arm32.
> Also tested the patchset with series 9609 which fixes underlying
> failures.
>
> v5:
> Changed the condition for running test-null.sh in ci.
> Re-uploaded after underlying fixes have been committed.
>
> v6:
> Changed the condition for running test-null.sh again.
> Reworked the patch to do aarch32 build instead of arvm7-a build.
> Simplified meson build flags. Changed commit msgs.
> Added 32b qualifier to .travis.yml.
> Added a patch with fixes for bnxt.
> Added a patch with cross compilation docs.
>
> v7:
> Rebased the patchset.
>
> v8:
> Removed Makefile additions from net/bnxt patch.
>
> v9:
> Changed ci test-null.sh condition, only run it if not
> cross-compiling aarch64 nor aarch32.
> Cleaned up docs.
>
> v10:
> Fixed doc: add aarch32 build guidance commit message.

LGTM,

Series Acked-by: Jerin Jacob <jerinj@marvell.com>



>
> Juraj Linkeš (3):
>   build: add aarch32 meson build flags
>   build: add aarch32 to meson cross-compilation
>   ci: add aarch64 -> aarch32 cross compiling jobs
>
> Phil Yang (1):
>   doc: add aarch32 build guidance
>
> Ruifeng Wang (1):
>   net/bnxt: add support for aarch32
>
>  .ci/linux-build.sh                            |  7 +++-
>  .travis.yml                                   | 19 +++++++++++
>  config/arm/arm32_armv8a_linux_gcc             | 17 ++++++++++
>  config/arm/meson.build                        | 20 +++++++++--
>  .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
>  drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
>  drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
>  drivers/net/bnxt/bnxt_txr.h                   |  2 +-
>  8 files changed, 87 insertions(+), 16 deletions(-)
>  create mode 100644 config/arm/arm32_armv8a_linux_gcc
>
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32
  2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-11-04 18:30                 ` Lance Richardson
  2020-11-05  7:20                   ` Ruifeng Wang
  0 siblings, 1 reply; 122+ messages in thread
From: Lance Richardson @ 2020-11-04 18:30 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: Thomas Monjalon, Bruce Richardson, aconole, maicolgabriel, dev,
	Ruifeng Wang

On Wed, Sep 16, 2020 at 4:21 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
> From: Ruifeng Wang <ruifeng.wang@arm.com>
>
> Expand vector PMD support to aarch32.
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_rxq.h | 2 +-
>  drivers/net/bnxt/bnxt_rxr.h | 2 +-
>  drivers/net/bnxt/bnxt_txr.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
> index d5ce3b6d5..1c4027711 100644
> --- a/drivers/net/bnxt/bnxt_rxq.h
> +++ b/drivers/net/bnxt/bnxt_rxq.h
> @@ -22,7 +22,7 @@ struct bnxt_rx_queue {
>         uint16_t                nb_rx_hold; /* num held free RX desc */
>         uint16_t                rx_free_thresh; /* max free RX desc to hold */
>         uint16_t                queue_id; /* RX queue index */
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
>         uint16_t                rxrearm_nb; /* number of descs to reinit. */
>         uint16_t                rxrearm_start; /* next desc index to reinit. */
>  #endif
> diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
> index 2bf46cd91..e2fba1647 100644
> --- a/drivers/net/bnxt/bnxt_rxr.h
> +++ b/drivers/net/bnxt/bnxt_rxr.h
> @@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
>  int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>  int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
>  uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
>                             uint16_t nb_pkts);
>  int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
> diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
> index 7715c11b8..38e5ac9df 100644
> --- a/drivers/net/bnxt/bnxt_txr.h
> +++ b/drivers/net/bnxt/bnxt_txr.h
> @@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
>                                uint16_t nb_pkts);
>  uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
>                               uint16_t nb_pkts);
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
>  uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
>                             uint16_t nb_pkts);
>  #endif
> --
> 2.20.1
>

Hi Juraj,

I might be missing something, but I don't
believe these changes are sufficient to
enable vector mode for ARM32. For one
thing, bnxt_receive_function() in bnxt_ethdev.c
would need to be changed to enable the
selection of the vector receive function.

Also, meson.build has this condition
for building bnxt_rxtx_vec_neon.c:

if arch_subdir == 'x86'
        sources += files('bnxt_rxtx_vec_sse.c')
elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
        sources += files('bnxt_rxtx_vec_neon.c')
endif

Were you able to build with these changes
and confirm that the vector mode functions
are selected and used? (There is a log at INFO
level to indicate which function is selected,
as should "show rxq info ..." from the
testpmd CLI.

Thanks,

   Lance

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32
  2020-11-04 18:30                 ` Lance Richardson
@ 2020-11-05  7:20                   ` Ruifeng Wang
  2020-11-05 13:41                     ` Lance Richardson
  0 siblings, 1 reply; 122+ messages in thread
From: Ruifeng Wang @ 2020-11-05  7:20 UTC (permalink / raw)
  To: Lance Richardson, Juraj Linkeš
  Cc: thomas, Bruce Richardson, aconole, maicolgabriel, dev, nd


> -----Original Message-----
> From: Lance Richardson <lance.richardson@broadcom.com>
> Sent: Thursday, November 5, 2020 2:30 AM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: thomas@monjalon.net; Bruce Richardson <bruce.richardson@intel.com>;
> aconole@redhat.com; maicolgabriel@hotmail.com; dev@dpdk.org; Ruifeng
> Wang <Ruifeng.Wang@arm.com>
> Subject: Re: [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32
> 
> On Wed, Sep 16, 2020 at 4:21 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
> wrote:
> >
> > From: Ruifeng Wang <ruifeng.wang@arm.com>
> >
> > Expand vector PMD support to aarch32.
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > ---
> >  drivers/net/bnxt/bnxt_rxq.h | 2 +-
> >  drivers/net/bnxt/bnxt_rxr.h | 2 +-
> >  drivers/net/bnxt/bnxt_txr.h | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
> > index d5ce3b6d5..1c4027711 100644
> > --- a/drivers/net/bnxt/bnxt_rxq.h
> > +++ b/drivers/net/bnxt/bnxt_rxq.h
> > @@ -22,7 +22,7 @@ struct bnxt_rx_queue {
> >         uint16_t                nb_rx_hold; /* num held free RX desc */
> >         uint16_t                rx_free_thresh; /* max free RX desc to hold */
> >         uint16_t                queue_id; /* RX queue index */
> > -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> > +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
> >         uint16_t                rxrearm_nb; /* number of descs to reinit. */
> >         uint16_t                rxrearm_start; /* next desc index to reinit. */
> >  #endif
> > diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
> > index 2bf46cd91..e2fba1647 100644
> > --- a/drivers/net/bnxt/bnxt_rxr.h
> > +++ b/drivers/net/bnxt/bnxt_rxr.h
> > @@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue
> *rxq);
> >  int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
> >  int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
> >
> > -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> > +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
> >  uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
> >                             uint16_t nb_pkts);
> >  int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
> > diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
> > index 7715c11b8..38e5ac9df 100644
> > --- a/drivers/net/bnxt/bnxt_txr.h
> > +++ b/drivers/net/bnxt/bnxt_txr.h
> > @@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct
> rte_mbuf **tx_pkts,
> >                                uint16_t nb_pkts);
> >  uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf
> **tx_pkts,
> >                               uint16_t nb_pkts);
> > -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> > +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
> >  uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
> >                             uint16_t nb_pkts);
> >  #endif
> > --
> > 2.20.1
> >
> 
> Hi Juraj,
> 
> I might be missing something, but I don't
> believe these changes are sufficient to
> enable vector mode for ARM32. For one
> thing, bnxt_receive_function() in bnxt_ethdev.c
> would need to be changed to enable the
> selection of the vector receive function.

Hi Lance,

This patch set aimed to enable aarch32 compilation and run some basic unit tests.
So changes in this patch fixed some 'symbol not found' issues when building for aarch32.
However, it do need a respin because a patch that changed Arm flags has been merged. 

> 
> Also, meson.build has this condition
> for building bnxt_rxtx_vec_neon.c:
> 
> if arch_subdir == 'x86'
>         sources += files('bnxt_rxtx_vec_sse.c')
> elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
>         sources += files('bnxt_rxtx_vec_neon.c')
> endif
> 
> Were you able to build with these changes

Yes. I was able to build with these changes.
As you can find in 3/5 of this patch set, aarch32 uses (cpu_family = 'aarch64').
So condition in meson.build is not a problem.

> and confirm that the vector mode functions
> are selected and used? (There is a log at INFO
> level to indicate which function is selected,
> as should "show rxq info ..." from the
> testpmd CLI.
> 
> Thanks,
Thanks for your review.
> 
>    Lance

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32
  2020-11-05  7:20                   ` Ruifeng Wang
@ 2020-11-05 13:41                     ` Lance Richardson
  2020-11-05 15:13                       ` Ruifeng Wang
  0 siblings, 1 reply; 122+ messages in thread
From: Lance Richardson @ 2020-11-05 13:41 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: Juraj Linkeš,
	thomas, Bruce Richardson, aconole, maicolgabriel, dev, nd

> > Hi Juraj,
> >
> > I might be missing something, but I don't
> > believe these changes are sufficient to
> > enable vector mode for ARM32. For one
> > thing, bnxt_receive_function() in bnxt_ethdev.c
> > would need to be changed to enable the
> > selection of the vector receive function.
>
> Hi Lance,
>
> This patch set aimed to enable aarch32 compilation and run some basic unit tests.
> So changes in this patch fixed some 'symbol not found' issues when building for aarch32.
> However, it do need a respin because a patch that changed Arm flags has been merged.
>
> >
> > Also, meson.build has this condition
> > for building bnxt_rxtx_vec_neon.c:
> >
> > if arch_subdir == 'x86'
> >         sources += files('bnxt_rxtx_vec_sse.c')
> > elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
> >         sources += files('bnxt_rxtx_vec_neon.c')
> > endif
> >
> > Were you able to build with these changes
>
> Yes. I was able to build with these changes.
> As you can find in 3/5 of this patch set, aarch32 uses (cpu_family = 'aarch64').
> So condition in meson.build is not a problem.
>
> > and confirm that the vector mode functions
> > are selected and used? (There is a log at INFO
> > level to indicate which function is selected,
> > as should "show rxq info ..." from the
> > testpmd CLI.
> >
> > Thanks,
> Thanks for your review.
> >
> >    Lance

Hi Juraj,

Have you tried building with this patch set lately? Changes
have been made to bnxt_rxtx_vec_neon.c for 20.11 that
require 64-bit (for example, the intrinsic vzip1q_u32() is
used, this intrinsic is only available for 64-bit targets), as
I was able to confirm by applying your patch set and
attempting to build.

I think the only change that is actually needed is this
in drivers/net/bnxt/meson.build:

-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and
host_machine.cpu_family().startswith('aarch64') and
dpdk_conf.get('RTE_ARCH_64')

BTW, there are compilation failures in sfc_efx due to lack
of support for __int128 for Arm 32-bit targets.

Thanks,
    Lance

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32
  2020-11-05 13:41                     ` Lance Richardson
@ 2020-11-05 15:13                       ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-11-05 15:13 UTC (permalink / raw)
  To: Lance Richardson
  Cc: Juraj Linkeš,
	thomas, Bruce Richardson, aconole, maicolgabriel, dev, nd, nd


> -----Original Message-----
> From: Lance Richardson <lance.richardson@broadcom.com>
> Sent: Thursday, November 5, 2020 9:42 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: Juraj Linkeš <juraj.linkes@pantheon.tech>; thomas@monjalon.net;
> Bruce Richardson <bruce.richardson@intel.com>; aconole@redhat.com;
> maicolgabriel@hotmail.com; dev@dpdk.org; nd <nd@arm.com>
> Subject: Re: [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32
> 
> > > Hi Juraj,
> > >
> > > I might be missing something, but I don't
> > > believe these changes are sufficient to
> > > enable vector mode for ARM32. For one
> > > thing, bnxt_receive_function() in bnxt_ethdev.c
> > > would need to be changed to enable the
> > > selection of the vector receive function.
> >
> > Hi Lance,
> >
> > This patch set aimed to enable aarch32 compilation and run some basic unit
> tests.
> > So changes in this patch fixed some 'symbol not found' issues when
> building for aarch32.
> > However, it do need a respin because a patch that changed Arm flags has
> been merged.
> >
> > >
> > > Also, meson.build has this condition
> > > for building bnxt_rxtx_vec_neon.c:
> > >
> > > if arch_subdir == 'x86'
> > >         sources += files('bnxt_rxtx_vec_sse.c')
> > > elif arch_subdir == 'arm' and
> host_machine.cpu_family().startswith('aarch64')
> > >         sources += files('bnxt_rxtx_vec_neon.c')
> > > endif
> > >
> > > Were you able to build with these changes
> >
> > Yes. I was able to build with these changes.
> > As you can find in 3/5 of this patch set, aarch32 uses (cpu_family =
> 'aarch64').
> > So condition in meson.build is not a problem.
> >
> > > and confirm that the vector mode functions
> > > are selected and used? (There is a log at INFO
> > > level to indicate which function is selected,
> > > as should "show rxq info ..." from the
> > > testpmd CLI.
> > >
> > > Thanks,
> > Thanks for your review.
> > >
> > >    Lance
> 
> Hi Juraj,
> 
> Have you tried building with this patch set lately? Changes
> have been made to bnxt_rxtx_vec_neon.c for 20.11 that
> require 64-bit (for example, the intrinsic vzip1q_u32() is
> used, this intrinsic is only available for 64-bit targets), as
> I was able to confirm by applying your patch set and
> attempting to build.

When the patch set was posted, it did compile. There was a Travis job added, and it passed.
But now the patch set is stale because it has been in Patchwork for over a month and
many other changes has been made during that time.
Definitely it needs rework.
Will respin the patch set and send out new version.

> 
> I think the only change that is actually needed is this
> in drivers/net/bnxt/meson.build:
> 
> -elif arch_subdir == 'arm' and
> host_machine.cpu_family().startswith('aarch64')
> +elif arch_subdir == 'arm' and
> host_machine.cpu_family().startswith('aarch64') and
> dpdk_conf.get('RTE_ARCH_64')

Will look into this.

> 
> BTW, there are compilation failures in sfc_efx due to lack
> of support for __int128 for Arm 32-bit targets.

Thanks for reminding.
Will look into this.

> 
> Thanks,
>     Lance

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                 ` (6 preceding siblings ...)
  2020-10-28  9:22               ` Jerin Jacob
@ 2020-11-30 14:03               ` Aaron Conole
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
  8 siblings, 0 replies; 122+ messages in thread
From: Aaron Conole @ 2020-11-30 14:03 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: thomas, bruce.richardson, maicolgabriel, dev

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> Add support for aarch32 cross build in meson
> and add aarch64 -> aarch32 cross build to Travis.
>
> Aarch32 is an execution state that allows execution of 32-bit code on
> armv8 machines. This execution state contains a superset of previous
> armv7 32-bit instructions and features. Thus the aarch32 build is
> distinct from arvm7 build.
>
> v4:
> Removed disabled drivers which actually build on arm32.
> Also tested the patchset with series 9609 which fixes underlying
> failures.
>
> v5:
> Changed the condition for running test-null.sh in ci.
> Re-uploaded after underlying fixes have been committed.
>
> v6:
> Changed the condition for running test-null.sh again.
> Reworked the patch to do aarch32 build instead of arvm7-a build.
> Simplified meson build flags. Changed commit msgs.
> Added 32b qualifier to .travis.yml.
> Added a patch with fixes for bnxt.
> Added a patch with cross compilation docs.
>
> v7:
> Rebased the patchset.
>
> v8:
> Removed Makefile additions from net/bnxt patch.
>
> v9:
> Changed ci test-null.sh condition, only run it if not
> cross-compiling aarch64 nor aarch32.
> Cleaned up docs.
>
> v10:
> Fixed doc: add aarch32 build guidance commit message.
>

Acked-by: Aaron Conole <aconole@redhat.com>

I previously thought I sent an ACK for this series.


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 0/7] aarch64 -> aarch32 cross compilation support
  2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                 ` (7 preceding siblings ...)
  2020-11-30 14:03               ` Aaron Conole
@ 2020-12-09 12:59               ` Juraj Linkeš
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 1/7] net/sfc: fix aarch32 build Juraj Linkeš
                                   ` (7 more replies)
  8 siblings, 8 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add support for aarch32 cross build in meson and add aarch64 -> aarch32
cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is distinct
from arvm7 build.

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

v8:
Removed Makefile additions from net/bnxt patch.

v9:
Changed ci test-null.sh condition, only run it if not cross-compiling
aarch64 nor aarch32.
Cleaned up docs.

v10:
Fixed doc: add aarch32 build guidance commit message.

v11:
Rebase and fix scf and bnxt after rebase.

Acked-by: Aaron Conole <aconole@redhat.com>

Juraj Linkeš (3):
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (3):
  net/sfc: fix aarch32 build
  net/bnxt: fix aarch32 build
  net/bnxt: add support for aarch32

 .ci/linux-build.sh                            |  7 +++-
 .travis.yml                                   | 19 +++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 ++++++++++
 config/arm/meson.build                        | 22 ++++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 drivers/common/sfc_efx/meson.build            |  2 +-
 drivers/net/bnxt/bnxt_rxq.h                   |  2 +-
 drivers/net/bnxt/bnxt_rxr.h                   |  2 +-
 drivers/net/bnxt/bnxt_txr.h                   |  2 +-
 drivers/net/bnxt/meson.build                  |  2 +-
 drivers/net/sfc/meson.build                   |  2 +-
 11 files changed, 91 insertions(+), 20 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 1/7] net/sfc: fix aarch32 build
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
@ 2020-12-09 12:59                 ` Juraj Linkeš
  2020-12-09 13:37                   ` [dpdk-dev] ***Spam*** " Andrew Rybchenko
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 2/7] net/bnxt: " Juraj Linkeš
                                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng Wang, arybchenko, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

The sfc PMD was enabled for aarch32 which is 32-bit mode but has
cpu_family set to aarch64.
As sfc support only 64-bit system, it should be disabled for aarch32.

Updated meson file to disable sfc for aarch32 build.

Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
Cc: arybchenko@solarflare.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/common/sfc_efx/meson.build | 2 +-
 drivers/net/sfc/meson.build        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
index 6cb9f0737..0200c6752 100644
--- a/drivers/common/sfc_efx/meson.build
+++ b/drivers/common/sfc_efx/meson.build
@@ -5,7 +5,7 @@
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index be888bd87..cfd31ca3a 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -6,7 +6,7 @@
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 2/7] net/bnxt: fix aarch32 build
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 1/7] net/sfc: fix aarch32 build Juraj Linkeš
@ 2020-12-09 12:59                 ` Juraj Linkeš
  2020-12-09 14:10                   ` Lance Richardson
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32 Juraj Linkeš
                                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng Wang, lance.richardson, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.

Fixed aarch32 build by updating meson file to execule NEON vector
implementation for aarch32.

Fixes: 398358341419 ("net/bnxt: support NEON")
Cc: lance.richardson@broadcom.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/net/bnxt/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 2896337b5..a2fd494da 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -74,6 +74,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
 	sources += files('bnxt_rxtx_vec_neon.c')
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 1/7] net/sfc: fix aarch32 build Juraj Linkeš
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 2/7] net/bnxt: " Juraj Linkeš
@ 2020-12-09 12:59                 ` Juraj Linkeš
  2020-12-09 13:59                   ` Lance Richardson
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 4/7] build: add aarch32 meson build flags Juraj Linkeš
                                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng Wang

From: Ruifeng Wang <ruifeng.wang@arm.com>

Expand vector PMD support to aarch32.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.h | 2 +-
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 drivers/net/bnxt/bnxt_txr.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index c72105cf0..199bf976e 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -21,7 +21,7 @@ struct bnxt_rx_queue {
 	uint16_t		nb_rx_desc; /* num of RX desc */
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 	uint16_t		rxrearm_nb; /* number of descs to reinit. */
 	uint16_t		rxrearm_start; /* next desc index to reinit. */
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 3fc901fdf..dcc07c713 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -83,7 +83,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
 int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			    uint16_t nb_pkts);
 int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 3dfc8ef9b..3a47c3db7 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -49,7 +49,7 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
 int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id);
 uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
 #endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 4/7] build: add aarch32 meson build flags
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
                                   ` (2 preceding siblings ...)
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-12-09 12:59                 ` Juraj Linkeš
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
                                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/meson.build | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 42b4e43c7..19a7ea194 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -62,6 +62,11 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_aarch32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
+        ['RTE_MAX_LCORE', 256]]
 flags_thunderx_extra = [
 	['RTE_MACHINE', '"thunderx"'],
 	['RTE_USE_C11_MEM_MODEL', false]]
@@ -93,6 +98,7 @@ flags_n1generic_extra = [
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
 	['native', ['-march=native']],
+	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -133,21 +139,28 @@ impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
 
 dpdk_conf.set('RTE_ARCH_ARM', 1)
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-
+update_flags = false
 if dpdk_conf.get('RTE_ARCH_32')
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		impl_id = meson.get_cross_property('implementor_id', 'aarch32')
+		impl_pn = meson.get_cross_property('implementor_pn', 'default')
+		machine = get_variable('impl_' + impl_id)
+	else
+		machine_args += '-mfpu=neon'
+	endif
 else
+	update_flags = true
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
 
 	machine = []
 	cmd_generic = ['generic', '', '', 'default', '']
 	cmd_output = cmd_generic # Set generic by default
-	machine_args = [] # Clear previous machine args
 	if arm_force_default_march and not meson.is_cross_build()
 		machine = impl_generic
 		impl_pn = 'default'
@@ -175,7 +188,10 @@ else
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
 		machine = get_variable('impl_' + impl_id)
 	endif
+endif
 
+if update_flags == true
+	machine_args = [] # Clear previous machine args
 	# Apply Common Defaults. These settings may be overwritten by machine
 	# settings later.
 	foreach flag: flags_common_default
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 5/7] build: add aarch32 to meson cross-compilation
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
                                   ` (3 preceding siblings ...)
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 4/7] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-12-09 12:59                 ` Juraj Linkeš
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 000000000..d3c4bce6c
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x41'
+implementor_pn = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 6/7] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
                                   ` (4 preceding siblings ...)
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-12-09 12:59                 ` Juraj Linkeš
  2020-12-09 15:29                   ` Aaron Conole
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 7/7] doc: add aarch32 build guidance Juraj Linkeš
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  7 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..cdb371565 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$AARCH32" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if [ "$AARCH64" != "1" ] && [ "$AARCH32" != "1" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index 5e12db23b..5e87029cb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -104,6 +108,21 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v11 7/7] doc: add aarch32 build guidance
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
                                   ` (5 preceding siblings ...)
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-12-09 12:59                 ` Juraj Linkeš
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-09 12:59 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index 8a1d0e88b..1f2ff751d 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
+32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64.
+   An aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -88,14 +89,27 @@ To install it in Ubuntu::
 
    sudo apt-get install pkg-config-aarch64-linux-gnu
 
-To cross-compile DPDK on a desired target machine we can use the following
-command::
+.. note::
+
+    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
+    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
+    for aarch32 on aarch64. To install it in Ubuntu::
+
+       sudo dpkg --add-architecture armhf
+       sudo apt-get update
+       sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf binutils
+
+To cross-compile DPDK on a desired target machine use the following command::
 
 	meson cross-build --cross-file <target_machine_configuration>
 	ninja -C cross-build
 
-For example if the target machine is arm64 we can use the following
-command::
+For example if the target machine is aarch64 use the following command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
+
+If the target machine is aarch32 use the following command::
+
+	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+	ninja -C arm32-build
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] ***Spam*** [PATCH v11 1/7] net/sfc: fix aarch32 build
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 1/7] net/sfc: fix aarch32 build Juraj Linkeš
@ 2020-12-09 13:37                   ` Andrew Rybchenko
  0 siblings, 0 replies; 122+ messages in thread
From: Andrew Rybchenko @ 2020-12-09 13:37 UTC (permalink / raw)
  To: Juraj Linkeš, thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, Ruifeng Wang, stable

On 12/9/20 3:59 PM, Juraj Linkeš wrote:
> From: Ruifeng Wang <ruifeng.wang@arm.com>
> 
> The sfc PMD was enabled for aarch32 which is 32-bit mode but has
> cpu_family set to aarch64.
> As sfc support only 64-bit system, it should be disabled for aarch32.
> 
> Updated meson file to disable sfc for aarch32 build.
> 
> Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
> Cc: arybchenko@solarflare.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Many thanks for the fix.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32 Juraj Linkeš
@ 2020-12-09 13:59                   ` Lance Richardson
  2020-12-09 14:11                     ` Ruifeng Wang
  0 siblings, 1 reply; 122+ messages in thread
From: Lance Richardson @ 2020-12-09 13:59 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: Thomas Monjalon, Bruce Richardson, aconole, maicolgabriel, dev,
	Ruifeng Wang

On Wed, Dec 9, 2020 at 8:00 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
> From: Ruifeng Wang <ruifeng.wang@arm.com>
>
> Expand vector PMD support to aarch32.
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_rxq.h | 2 +-
>  drivers/net/bnxt/bnxt_rxr.h | 2 +-
>  drivers/net/bnxt/bnxt_txr.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
> index c72105cf0..199bf976e 100644
> --- a/drivers/net/bnxt/bnxt_rxq.h
> +++ b/drivers/net/bnxt/bnxt_rxq.h
> @@ -21,7 +21,7 @@ struct bnxt_rx_queue {
>         uint16_t                nb_rx_desc; /* num of RX desc */
>         uint16_t                rx_free_thresh; /* max free RX desc to hold */
>         uint16_t                queue_id; /* RX queue index */
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
>         uint16_t                rxrearm_nb; /* number of descs to reinit. */
>         uint16_t                rxrearm_start; /* next desc index to reinit. */
>  #endif
> diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
> index 3fc901fdf..dcc07c713 100644
> --- a/drivers/net/bnxt/bnxt_rxr.h
> +++ b/drivers/net/bnxt/bnxt_rxr.h
> @@ -83,7 +83,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
>  int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>  int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
>
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
>  uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
>                             uint16_t nb_pkts);
>  int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
> diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
> index 3dfc8ef9b..3a47c3db7 100644
> --- a/drivers/net/bnxt/bnxt_txr.h
> +++ b/drivers/net/bnxt/bnxt_txr.h
> @@ -49,7 +49,7 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
>  int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id);
>  uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
>                                uint16_t nb_pkts);
> -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM)
>  uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
>                             uint16_t nb_pkts);
>  #endif
> --
> 2.20.1
>

NAK (still).

These changes are pointless since bnxt_rxtx_vec_neon.c cannot be
compiled in 32-bit mode.

Regards,
    Lance

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v11 2/7] net/bnxt: fix aarch32 build
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 2/7] net/bnxt: " Juraj Linkeš
@ 2020-12-09 14:10                   ` Lance Richardson
  2020-12-09 14:16                     ` Ruifeng Wang
  0 siblings, 1 reply; 122+ messages in thread
From: Lance Richardson @ 2020-12-09 14:10 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: Thomas Monjalon, Bruce Richardson, aconole, maicolgabriel, dev,
	Ruifeng Wang, stable

On Wed, Dec 9, 2020 at 7:59 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
> From: Ruifeng Wang <ruifeng.wang@arm.com>
>
> NEON vector path of the PMD needs aarch64 support. But it was
> enabled for aarch32 build as well because aarch32 build had
> cpu_family set to aarch64. So build for aarch32 will fail due
> to unsupported intrinsics.
>
> Fixed aarch32 build by updating meson file to execule NEON vector
> implementation for aarch32.
>
> Fixes: 398358341419 ("net/bnxt: support NEON")
> Cc: lance.richardson@broadcom.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  drivers/net/bnxt/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
> index 2896337b5..a2fd494da 100644
> --- a/drivers/net/bnxt/meson.build
> +++ b/drivers/net/bnxt/meson.build
> @@ -74,6 +74,6 @@ sources = files('bnxt_cpr.c',
>
>  if arch_subdir == 'x86'
>         sources += files('bnxt_rxtx_vec_sse.c')
> -elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
> +elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
>         sources += files('bnxt_rxtx_vec_neon.c')
>  endif
> --
> 2.20.1
>
With this change, there should be no need for
http://patchwork.dpdk.org/patch/84864/

Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32
  2020-12-09 13:59                   ` Lance Richardson
@ 2020-12-09 14:11                     ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-12-09 14:11 UTC (permalink / raw)
  To: Lance Richardson, Juraj Linkeš
  Cc: thomas, Bruce Richardson, aconole, maicolgabriel, dev, nd

> -----Original Message-----
> From: Lance Richardson <lance.richardson@broadcom.com>
> Sent: Wednesday, December 9, 2020 10:00 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: thomas@monjalon.net; Bruce Richardson <bruce.richardson@intel.com>;
> aconole@redhat.com; maicolgabriel@hotmail.com; dev@dpdk.org; Ruifeng
> Wang <Ruifeng.Wang@arm.com>
> Subject: Re: [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32
> 
> On Wed, Dec 9, 2020 at 8:00 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
> wrote:
> >
> > From: Ruifeng Wang <ruifeng.wang@arm.com>
> >
> > Expand vector PMD support to aarch32.
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > ---
> >  drivers/net/bnxt/bnxt_rxq.h | 2 +-
> >  drivers/net/bnxt/bnxt_rxr.h | 2 +-
> >  drivers/net/bnxt/bnxt_txr.h | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
> > index c72105cf0..199bf976e 100644
> > --- a/drivers/net/bnxt/bnxt_rxq.h
> > +++ b/drivers/net/bnxt/bnxt_rxq.h
> > @@ -21,7 +21,7 @@ struct bnxt_rx_queue {
> >         uint16_t                nb_rx_desc; /* num of RX desc */
> >         uint16_t                rx_free_thresh; /* max free RX desc to hold */
> >         uint16_t                queue_id; /* RX queue index */
> > -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> > +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
> >         uint16_t                rxrearm_nb; /* number of descs to reinit. */
> >         uint16_t                rxrearm_start; /* next desc index to reinit. */
> >  #endif
> > diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
> > index 3fc901fdf..dcc07c713 100644
> > --- a/drivers/net/bnxt/bnxt_rxr.h
> > +++ b/drivers/net/bnxt/bnxt_rxr.h
> > @@ -83,7 +83,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
> >  int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
> >  int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
> >
> > -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> > +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
> >  uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
> >                             uint16_t nb_pkts);
> >  int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq);
> > diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
> > index 3dfc8ef9b..3a47c3db7 100644
> > --- a/drivers/net/bnxt/bnxt_txr.h
> > +++ b/drivers/net/bnxt/bnxt_txr.h
> > @@ -49,7 +49,7 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
> >  int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int
> socket_id);
> >  uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
> >                                uint16_t nb_pkts);
> > -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
> > +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) ||
> defined(RTE_ARCH_ARM)
> >  uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
> >                             uint16_t nb_pkts);
> >  #endif
> > --
> > 2.20.1
> >
> 
> NAK (still).
> 
> These changes are pointless since bnxt_rxtx_vec_neon.c cannot be
> compiled in 32-bit mode.
> 
This should be a mistake. Patch from prior version was picked.

Hi Juraj,

Can you please check?
We have an updated version for BNXT PMD.

Thanks.
> Regards,
>     Lance
> 
> --
> This electronic communication and the information and any files transmitted
> with it, or attached to it, are confidential and are intended solely for
> the use of the individual or entity to whom it is addressed and may contain
> information that is confidential, legally privileged, protected by privacy
> laws, or otherwise restricted from disclosure to anyone else. If you are
> not the intended recipient or the person responsible for delivering the
> e-mail to the intended recipient, you are hereby notified that any use,
> copying, distributing, dissemination, forwarding, printing, or copying of
> this e-mail is strictly prohibited. If you received this e-mail in error,
> please return the e-mail to the sender, delete it from your computer, and
> destroy any printed copy of it.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v11 2/7] net/bnxt: fix aarch32 build
  2020-12-09 14:10                   ` Lance Richardson
@ 2020-12-09 14:16                     ` Ruifeng Wang
  0 siblings, 0 replies; 122+ messages in thread
From: Ruifeng Wang @ 2020-12-09 14:16 UTC (permalink / raw)
  To: Lance Richardson, Juraj Linkeš
  Cc: thomas, Bruce Richardson, aconole, maicolgabriel, dev, stable, nd

> -----Original Message-----
> From: Lance Richardson <lance.richardson@broadcom.com>
> Sent: Wednesday, December 9, 2020 10:10 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: thomas@monjalon.net; Bruce Richardson <bruce.richardson@intel.com>;
> aconole@redhat.com; maicolgabriel@hotmail.com; dev@dpdk.org; Ruifeng
> Wang <Ruifeng.Wang@arm.com>; stable@dpdk.org
> Subject: Re: [PATCH v11 2/7] net/bnxt: fix aarch32 build
> 
> On Wed, Dec 9, 2020 at 7:59 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
> wrote:
> >
> > From: Ruifeng Wang <ruifeng.wang@arm.com>
> >
> > NEON vector path of the PMD needs aarch64 support. But it was
> > enabled for aarch32 build as well because aarch32 build had
> > cpu_family set to aarch64. So build for aarch32 will fail due
> > to unsupported intrinsics.
> >
> > Fixed aarch32 build by updating meson file to execule NEON vector
> > implementation for aarch32.
> >
> > Fixes: 398358341419 ("net/bnxt: support NEON")
> > Cc: lance.richardson@broadcom.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > ---
> >  drivers/net/bnxt/meson.build | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
> > index 2896337b5..a2fd494da 100644
> > --- a/drivers/net/bnxt/meson.build
> > +++ b/drivers/net/bnxt/meson.build
> > @@ -74,6 +74,6 @@ sources = files('bnxt_cpr.c',
> >
> >  if arch_subdir == 'x86'
> >         sources += files('bnxt_rxtx_vec_sse.c')
> > -elif arch_subdir == 'arm' and
> host_machine.cpu_family().startswith('aarch64')
> > +elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
> >         sources += files('bnxt_rxtx_vec_neon.c')
> >  endif
> > --
> > 2.20.1
> >
> With this change, there should be no need for
> http://patchwork.dpdk.org/patch/84864/

Yes.
Patch 3/7 in this series should be dropped. It is from prior series and is superseded by 2/7 in this series.
 
> 
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> 
> --
> This electronic communication and the information and any files transmitted
> with it, or attached to it, are confidential and are intended solely for
> the use of the individual or entity to whom it is addressed and may contain
> information that is confidential, legally privileged, protected by privacy
> laws, or otherwise restricted from disclosure to anyone else. If you are
> not the intended recipient or the person responsible for delivering the
> e-mail to the intended recipient, you are hereby notified that any use,
> copying, distributing, dissemination, forwarding, printing, or copying of
> this e-mail is strictly prohibited. If you received this e-mail in error,
> please return the e-mail to the sender, delete it from your computer, and
> destroy any printed copy of it.

^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v11 6/7] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-12-09 15:29                   ` Aaron Conole
  0 siblings, 0 replies; 122+ messages in thread
From: Aaron Conole @ 2020-12-09 15:29 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: thomas, bruce.richardson, maicolgabriel, dev

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> Add two jobs (static and shared libs), both building on aarch64 and
> producing 32-bit arm binaries executable on armv8-a, but not armv7.
> Do not run tests in these jobs.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

FYI, travis is intermittent right now due to their planned switch to a
credit system.


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support
  2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
                                   ` (6 preceding siblings ...)
  2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 7/7] doc: add aarch32 build guidance Juraj Linkeš
@ 2020-12-11  8:26                 ` Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 1/6] net/sfc: fix aarch32 build Juraj Linkeš
                                     ` (6 more replies)
  7 siblings, 7 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-11  8:26 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add support for aarch32 cross build in meson and add aarch64 -> aarch32
cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is distinct
from arvm7 build.

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

v8:
Removed Makefile additions from net/bnxt patch.

v9:
Changed ci test-null.sh condition, only run it if not cross-compiling
aarch64 nor aarch32.
Cleaned up docs.

v10:
Fixed doc: add aarch32 build guidance commit message.

v11:
Rebase and fix scf and bnxt after rebase.

v12:
Dropped one superfluous net/bnxt patch.

Acked-by: Aaron Conole <aconole@redhat.com>

Juraj Linkeš (3):
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (2):
  net/sfc: fix aarch32 build
  net/bnxt: fix aarch32 build

 .ci/linux-build.sh                            |  7 +++-
 .travis.yml                                   | 19 +++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 ++++++++++
 config/arm/meson.build                        | 22 ++++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 drivers/common/sfc_efx/meson.build            |  2 +-
 drivers/net/bnxt/meson.build                  |  2 +-
 drivers/net/sfc/meson.build                   |  2 +-
 8 files changed, 88 insertions(+), 17 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v12 1/6] net/sfc: fix aarch32 build
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2020-12-11  8:26                   ` Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 2/6] net/bnxt: " Juraj Linkeš
                                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-11  8:26 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng Wang, arybchenko, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

The sfc PMD was enabled for aarch32 which is 32-bit mode but has
cpu_family set to aarch64.
As sfc support only 64-bit system, it should be disabled for aarch32.

Updated meson file to disable sfc for aarch32 build.

Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
Cc: arybchenko@solarflare.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/meson.build | 2 +-
 drivers/net/sfc/meson.build        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
index 6cb9f0737..0200c6752 100644
--- a/drivers/common/sfc_efx/meson.build
+++ b/drivers/common/sfc_efx/meson.build
@@ -5,7 +5,7 @@
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index be888bd87..cfd31ca3a 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -6,7 +6,7 @@
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v12 2/6] net/bnxt: fix aarch32 build
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 1/6] net/sfc: fix aarch32 build Juraj Linkeš
@ 2020-12-11  8:26                   ` Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 3/6] build: add aarch32 meson build flags Juraj Linkeš
                                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-11  8:26 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng Wang, lance.richardson, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.

Fixed aarch32 build by updating meson file to execule NEON vector
implementation for aarch32.

Fixes: 398358341419 ("net/bnxt: support NEON")
Cc: lance.richardson@broadcom.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 2896337b5..a2fd494da 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -74,6 +74,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
 	sources += files('bnxt_rxtx_vec_neon.c')
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v12 3/6] build: add aarch32 meson build flags
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 1/6] net/sfc: fix aarch32 build Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 2/6] net/bnxt: " Juraj Linkeš
@ 2020-12-11  8:26                   ` Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 4/6] build: add aarch32 to meson cross-compilation Juraj Linkeš
                                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-11  8:26 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/meson.build | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 42b4e43c7..19a7ea194 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -62,6 +62,11 @@ flags_armada = [
 	['RTE_MAX_LCORE', 16]]
 
 flags_default_extra = []
+flags_aarch32_extra = [
+        ['RTE_ARCH_ARM_NEON_MEMCPY', false],
+        ['RTE_ARCH_STRICT_ALIGN', true],
+        ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false],
+        ['RTE_MAX_LCORE', 256]]
 flags_thunderx_extra = [
 	['RTE_MACHINE', '"thunderx"'],
 	['RTE_USE_C11_MEM_MODEL', false]]
@@ -93,6 +98,7 @@ flags_n1generic_extra = [
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
 	['native', ['-march=native']],
+	['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -133,21 +139,28 @@ impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic]
 
 dpdk_conf.set('RTE_ARCH_ARM', 1)
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-
+update_flags = false
 if dpdk_conf.get('RTE_ARCH_32')
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
 	# the minimum architecture supported, armv7-a, needs the following,
 	# mk/machine/armv7a/rte.vars.mk sets it too
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		impl_id = meson.get_cross_property('implementor_id', 'aarch32')
+		impl_pn = meson.get_cross_property('implementor_pn', 'default')
+		machine = get_variable('impl_' + impl_id)
+	else
+		machine_args += '-mfpu=neon'
+	endif
 else
+	update_flags = true
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
 	dpdk_conf.set('RTE_ARCH_ARM64', 1)
 
 	machine = []
 	cmd_generic = ['generic', '', '', 'default', '']
 	cmd_output = cmd_generic # Set generic by default
-	machine_args = [] # Clear previous machine args
 	if arm_force_default_march and not meson.is_cross_build()
 		machine = impl_generic
 		impl_pn = 'default'
@@ -175,7 +188,10 @@ else
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
 		machine = get_variable('impl_' + impl_id)
 	endif
+endif
 
+if update_flags == true
+	machine_args = [] # Clear previous machine args
 	# Apply Common Defaults. These settings may be overwritten by machine
 	# settings later.
 	foreach flag: flags_common_default
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v12 4/6] build: add aarch32 to meson cross-compilation
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                     ` (2 preceding siblings ...)
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 3/6] build: add aarch32 meson build flags Juraj Linkeš
@ 2020-12-11  8:26                   ` Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 5/6] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-11  8:26 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 000000000..d3c4bce6c
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x41'
+implementor_pn = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v12 5/6] ci: add aarch64 -> aarch32 cross compiling jobs
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                     ` (3 preceding siblings ...)
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 4/6] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2020-12-11  8:26                   ` Juraj Linkeš
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 6/6] doc: add aarch32 build guidance Juraj Linkeš
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-11  8:26 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel; +Cc: dev, juraj.linkes

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..cdb371565 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$AARCH32" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "1" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "1" ]; then
+if [ "$AARCH64" != "1" ] && [ "$AARCH32" != "1" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index 5e12db23b..5e87029cb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -104,6 +108,21 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v12 6/6] doc: add aarch32 build guidance
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                     ` (4 preceding siblings ...)
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 5/6] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2020-12-11  8:26                   ` Juraj Linkeš
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2020-12-11  8:26 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 34 +++++++++++++------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index 8a1d0e88b..1f2ff751d 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
     Copyright(c) 2018 ARM Corporation.
 
-Cross compile DPDK for ARM64
-============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile
+32-bit aarch32 DPDK from aarch64 build hosts.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross-build DPDK for ARM64. An
-   ARM64 cross compile GNU toolchain is used for this.
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross-build DPDK for aarch64.
+   An aarch64 cross compile GNU toolchain is used for this.
 
 Obtain the cross tool chain
 ---------------------------
@@ -88,14 +89,27 @@ To install it in Ubuntu::
 
    sudo apt-get install pkg-config-aarch64-linux-gnu
 
-To cross-compile DPDK on a desired target machine we can use the following
-command::
+.. note::
+
+    Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications
+    can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required
+    for aarch32 on aarch64. To install it in Ubuntu::
+
+       sudo dpkg --add-architecture armhf
+       sudo apt-get update
+       sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf binutils
+
+To cross-compile DPDK on a desired target machine use the following command::
 
 	meson cross-build --cross-file <target_machine_configuration>
 	ninja -C cross-build
 
-For example if the target machine is arm64 we can use the following
-command::
+For example if the target machine is aarch64 use the following command::
 
 	meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc
 	ninja -C arm64-build
+
+If the target machine is aarch32 use the following command::
+
+	meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+	ninja -C arm32-build
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support
  2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                     ` (5 preceding siblings ...)
  2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 6/6] doc: add aarch32 build guidance Juraj Linkeš
@ 2021-03-09  8:36                   ` Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 1/7] net/sfc: fix aarch32 build Juraj Linkeš
                                       ` (7 more replies)
  6 siblings, 8 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Add support for aarch32 cross build in meson and add aarch64 -> aarch32
cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is distinct
from arvm7 build.

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

v8:
Removed Makefile additions from net/bnxt patch.

v9:
Changed ci test-null.sh condition, only run it if not cross-compiling
aarch64 nor aarch32.
Cleaned up docs.

v10:
Fixed doc: add aarch32 build guidance commit message.

v11:
Rebase and fix scf and bnxt after rebase.

v12:
Dropped one superfluous net/bnxt patch.

v13:
Rebased and fixed net/virtio build by removing NEON for aarch32.

Acked-by: Aaron Conole <aconole@redhat.com>

Juraj Linkeš (4):
  net/virtio: fix aarch32 build
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (2):
  net/sfc: fix aarch32 build
  net/bnxt: fix aarch32 build

 .ci/linux-build.sh                            |  7 +++-
 .travis.yml                                   | 19 ++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 +++++++++
 config/arm/meson.build                        | 24 ++++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 37 +++++++++++++++----
 drivers/common/sfc_efx/meson.build            |  2 +-
 drivers/net/bnxt/meson.build                  |  2 +-
 drivers/net/sfc/meson.build                   |  2 +-
 drivers/net/virtio/meson.build                |  2 +-
 9 files changed, 97 insertions(+), 15 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 1/7] net/sfc: fix aarch32 build
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2021-03-09  8:36                     ` Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 2/7] net/bnxt: " Juraj Linkeš
                                       ` (6 subsequent siblings)
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli,
	Ruifeng Wang, arybchenko, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

The sfc PMD was enabled for aarch32 which is 32-bit mode but has
cpu_family set to aarch64.
As sfc support only 64-bit system, it should be disabled for aarch32.

Updated meson file to disable sfc for aarch32 build.

Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
Cc: arybchenko@solarflare.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/meson.build | 2 +-
 drivers/net/sfc/meson.build        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
index 6cb9f0737f..0200c67521 100644
--- a/drivers/common/sfc_efx/meson.build
+++ b/drivers/common/sfc_efx/meson.build
@@ -5,7 +5,7 @@
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index c3ecdbe197..669038a47e 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -12,7 +12,7 @@ if is_windows
 	subdir_done()
 endif
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 2/7] net/bnxt: fix aarch32 build
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 1/7] net/sfc: fix aarch32 build Juraj Linkeš
@ 2021-03-09  8:36                     ` Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 3/7] net/virtio: " Juraj Linkeš
                                       ` (5 subsequent siblings)
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli,
	Ruifeng Wang, lance.richardson, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.

Fix aarch32 build by updating meson file to exclude NEON vector
implementation for aarch32.

Fixes: 398358341419 ("net/bnxt: support NEON")
Cc: lance.richardson@broadcom.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 092655697f..710aef6b7b 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -80,6 +80,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
 	sources += files('bnxt_rxtx_vec_neon.c')
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 3/7] net/virtio: fix aarch32 build
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 1/7] net/sfc: fix aarch32 build Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 2/7] net/bnxt: " Juraj Linkeš
@ 2021-03-09  8:36                     ` Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 4/7] build: add aarch32 meson build flags Juraj Linkeš
                                       ` (4 subsequent siblings)
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli, stable

NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.

Fix aarch32 build by updating meson file to exclude NEON vector
implementation for aarch32.

Fixes: 749799482a72 ("net/virtio: add to meson build")
Cc: bruce.richardson@intel.com
Cc: stable@dpdk.org

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 drivers/net/virtio/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index d595cfdcab..88e231565e 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -39,7 +39,7 @@ if arch_subdir == 'x86'
 	sources += files('virtio_rxtx_simple_sse.c')
 elif arch_subdir == 'ppc'
 	sources += files('virtio_rxtx_simple_altivec.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
 	sources += files('virtio_rxtx_packed.c')
 	sources += files('virtio_rxtx_simple_neon.c')
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 4/7] build: add aarch32 meson build flags
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                       ` (2 preceding siblings ...)
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 3/7] net/virtio: " Juraj Linkeš
@ 2021-03-09  8:36                     ` Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
                                       ` (3 subsequent siblings)
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/meson.build | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 00bc4610a3..0f14741ebe 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -69,7 +69,14 @@ part_number_config_arm = {
 			['RTE_ARM_FEATURE_ATOMICS', true],
 			['RTE_MAX_LCORE', 64]
 		]
-	}
+	},
+	'aarch32': {
+		'machine_args': ['-march=armv8-a',
+				 '-mfpu=neon'],
+		'flags': [
+			['RTE_ARCH_ARM_NEON_MEMCPY', false],
+			['RTE_ARCH_STRICT_ALIGN', true]
+		]}
 }
 implementer_arm = {
 	'description': 'Arm',
@@ -199,14 +206,23 @@ implementers = {
 dpdk_conf.set('RTE_ARCH_ARM', 1)
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
 
+update_flags = false
 if dpdk_conf.get('RTE_ARCH_32')
 	# armv7 build
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
-	# the minimum architecture supported, armv7-a, needs the following,
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		implementer_id = meson.get_cross_property('implementer_id')
+		part_number = meson.get_cross_property('part_number')
+		flags_common = []
+	else
+		# the minimum architecture supported, armv7-a, needs the following,
+		machine_args += '-mfpu=neon'
+	endif
 else
 	# aarch64 build
+	update_flags = true
 	if not meson.is_cross_build()
 		if machine == 'default'
 			# default build
@@ -232,7 +248,9 @@ else
 		implementer_id = meson.get_cross_property('implementer_id')
 		part_number = meson.get_cross_property('part_number')
 	endif
+endif
 
+if update_flags
 	if implementers.has_key(implementer_id)
 		implementer_config = implementers[implementer_id]
 	else
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 5/7] build: add aarch32 to meson cross-compilation
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                       ` (3 preceding siblings ...)
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 4/7] build: add aarch32 meson build flags Juraj Linkeš
@ 2021-03-09  8:36                     ` Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
                                       ` (2 subsequent siblings)
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 0000000000..6299d5c887
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch32'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementer_id = '0x41'
+part_number = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 6/7] ci: add aarch64 -> aarch32 cross compiling jobs
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                       ` (4 preceding siblings ...)
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2021-03-09  8:36                     ` Juraj Linkeš
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 7/7] doc: add aarch32 build guidance Juraj Linkeš
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  7 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 91e43a975b..73a9c234ca 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -62,6 +62,11 @@ if [ "$AARCH64" = "true" ]; then
     fi
 fi
 
+if [ "$AARCH32" = "true" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "true" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -84,7 +89,7 @@ OPTS="$OPTS -Dcheck_includes=true"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "true" ]; then
+if [ "$AARCH64" != "true" ] && [ "$AARCH32" != "true" ]; then
     failed=
     configure_coredump
     devtools/test-null.sh || failed="true"
diff --git a/.travis.yml b/.travis.yml
index 7ed982ac07..c4bd2d079b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,6 +25,10 @@ _aarch64_clang_packages: &aarch64_clang_packages
   - *required_packages
   - [libgcc-7-dev-arm64-cross, libatomic1-arm64-cross, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _libabigail_build_packages: &libabigail_build_packages
   - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
 
@@ -168,3 +172,18 @@ jobs:
     virt: vm
     group: edge
     compiler: clang
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=true
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=true
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v13 7/7] doc: add aarch32 build guidance
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                       ` (5 preceding siblings ...)
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2021-03-09  8:36                     ` Juraj Linkeš
  2021-03-09 13:46                       ` Aaron Conole
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  7 siblings, 1 reply; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-09  8:36 UTC (permalink / raw)
  To: thomas, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 37 +++++++++++++++----
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index faaf24b95b..8595150ace 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
-    Copyright(c) 2020 ARM Corporation.
+    Copyright(c) 2021 ARM Corporation.
 
-Cross compiling DPDK for ARM64
-==============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 on x86 build
+machines and compile 32-bit aarch32 DPDK on aarch64 build machines.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross compile DPDK for ARM64.
-   An ARM64 cross compiler GNU toolchain or an LLVM/clang toolchain
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross compile DPDK for aarch64.
+   An aarch64 cross compiler GNU toolchain or an LLVM/clang toolchain
    may be used for cross-compilation.
 
 
@@ -54,6 +55,11 @@ To install it in Ubuntu::
    sudo apt install pkg-config-aarch64-linux-gnu
 
 
+For aarch32, install ``pkg-config-arm-linux-gnueabihf``::
+
+   sudo apt install pkg-config-aarch64-linux-gnu
+
+
 GNU toolchain
 -------------
 
@@ -72,16 +78,28 @@ the following description is an example of this version.
 
 .. code-block:: console
 
+   # aarch64 binaries
    wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
 
+.. code-block:: console
+
+   # aarch32 binaries
+   wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
+
+
 Unzip and add into the PATH
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. code-block:: console
 
+   # aarch64
    tar -xvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
    export PATH=$PATH:<cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin
 
+.. code-block:: console
+   tar -xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
+   export PATH=$PATH:<cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin
+
 .. note::
 
    For the host requirements and other info, refer to the release note section: https://releases.linaro.org/components/toolchain/binaries/
@@ -118,6 +136,10 @@ command::
    meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc
    ninja -C aarch64-build-gcc
 
+If the target machine is aarch32 we can use the following command::
+
+   meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+   ninja -C arm32-build
 
 LLVM/Clang toolchain
 --------------------
@@ -211,6 +233,7 @@ you may use various combinations of implementer/part number::
       '0xd0a':   cortex-a75
       '0xd0b':   cortex-a76
       '0xd0c':   neoverse-n1
+      'aarch32': armv8 aarch32 execution mode build
 
    Supported part_numbers for 0x43:
       '0xa1':    thunderxt88
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* Re: [dpdk-dev] [PATCH v13 7/7] doc: add aarch32 build guidance
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 7/7] doc: add aarch32 build guidance Juraj Linkeš
@ 2021-03-09 13:46                       ` Aaron Conole
  0 siblings, 0 replies; 122+ messages in thread
From: Aaron Conole @ 2021-03-09 13:46 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: thomas, bruce.richardson, maicolgabriel, dev, Ruifeng.Wang,
	Honnappa.Nagarahalli, Phil Yang

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> From: Phil Yang <phil.yang@arm.com>
>
> Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.
>
> Signed-off-by: Phil Yang <phil.yang@arm.com>
> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support
  2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                       ` (6 preceding siblings ...)
  2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 7/7] doc: add aarch32 build guidance Juraj Linkeš
@ 2021-03-17 13:35                     ` Juraj Linkeš
  2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 1/7] net/sfc: fix aarch32 build Juraj Linkeš
                                         ` (6 more replies)
  7 siblings, 7 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:35 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Add support for aarch32 cross build in meson and add aarch64 -> aarch32
cross build to Travis.

Aarch32 is an execution state that allows execution of 32-bit code on
armv8 machines. This execution state contains a superset of previous
armv7 32-bit instructions and features. Thus the aarch32 build is distinct
from arvm7 build.

v4:
Removed disabled drivers which actually build on arm32.
Also tested the patchset with series 9609 which fixes underlying failures.

v5:
Changed the condition for running test-null.sh in ci.
Re-uploaded after underlying fixes have been committed.

v6:
Changed the condition for running test-null.sh again.
Reworked the patch to do aarch32 build instead of arvm7-a build.
Simplified meson build flags. Changed commit msgs.
Added 32b qualifier to .travis.yml.
Added a patch with fixes for bnxt.
Added a patch with cross compilation docs.

v7:
Rebased the patchset.

v8:
Removed Makefile additions from net/bnxt patch.

v9:
Changed ci test-null.sh condition, only run it if not cross-compiling
aarch64 nor aarch32.
Cleaned up docs.

v10:
Fixed doc: add aarch32 build guidance commit message.

v11:
Rebase and fix scf and bnxt after rebase.

v12:
Dropped one superfluous net/bnxt patch.

v13:
Rebased and fixed net/virtio build by removing NEON for aarch32.

v14:
Fixed docs build.

Acked-by: Aaron Conole <aconole@redhat.com>

Juraj Linkeš (4):
  net/virtio: fix aarch32 build
  build: add aarch32 meson build flags
  build: add aarch32 to meson cross-compilation
  ci: add aarch64 -> aarch32 cross compiling jobs

Phil Yang (1):
  doc: add aarch32 build guidance

Ruifeng Wang (2):
  net/sfc: fix aarch32 build
  net/bnxt: fix aarch32 build

 .ci/linux-build.sh                            |  7 +++-
 .travis.yml                                   | 19 ++++++++++
 config/arm/arm32_armv8a_linux_gcc             | 17 +++++++++
 config/arm/meson.build                        | 24 ++++++++++--
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 38 +++++++++++++++----
 drivers/common/sfc_efx/meson.build            |  2 +-
 drivers/net/bnxt/meson.build                  |  2 +-
 drivers/net/sfc/meson.build                   |  2 +-
 drivers/net/virtio/meson.build                |  2 +-
 9 files changed, 98 insertions(+), 15 deletions(-)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 1/7] net/sfc: fix aarch32 build
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
@ 2021-03-17 13:35                       ` Juraj Linkeš
  2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 2/7] net/bnxt: " Juraj Linkeš
                                         ` (5 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:35 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli,
	Ruifeng Wang, arybchenko, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

The sfc PMD was enabled for aarch32 which is 32-bit mode but has
cpu_family set to aarch64.
As sfc support only 64-bit system, it should be disabled for aarch32.

Updated meson file to disable sfc for aarch32 build.

Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
Cc: arybchenko@solarflare.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/meson.build | 2 +-
 drivers/net/sfc/meson.build        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
index 6cb9f0737f..0200c67521 100644
--- a/drivers/common/sfc_efx/meson.build
+++ b/drivers/common/sfc_efx/meson.build
@@ -5,7 +5,7 @@
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index c3ecdbe197..669038a47e 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -12,7 +12,7 @@ if is_windows
 	subdir_done()
 endif
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 2/7] net/bnxt: fix aarch32 build
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 1/7] net/sfc: fix aarch32 build Juraj Linkeš
@ 2021-03-17 13:35                       ` Juraj Linkeš
  2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 3/7] net/virtio: " Juraj Linkeš
                                         ` (4 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:35 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli,
	Ruifeng Wang, lance.richardson, stable

From: Ruifeng Wang <ruifeng.wang@arm.com>

NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.

Fix aarch32 build by updating meson file to exclude NEON vector
implementation for aarch32.

Fixes: 398358341419 ("net/bnxt: support NEON")
Cc: lance.richardson@broadcom.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 092655697f..710aef6b7b 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -80,6 +80,6 @@ sources = files('bnxt_cpr.c',
 
 if arch_subdir == 'x86'
 	sources += files('bnxt_rxtx_vec_sse.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
 	sources += files('bnxt_rxtx_vec_neon.c')
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 3/7] net/virtio: fix aarch32 build
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
  2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 1/7] net/sfc: fix aarch32 build Juraj Linkeš
  2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 2/7] net/bnxt: " Juraj Linkeš
@ 2021-03-17 13:35                       ` Juraj Linkeš
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 4/7] build: add aarch32 meson build flags Juraj Linkeš
                                         ` (3 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:35 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli, stable

NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.

Fix aarch32 build by updating meson file to exclude NEON vector
implementation for aarch32.

Fixes: 749799482a72 ("net/virtio: add to meson build")
Cc: bruce.richardson@intel.com
Cc: stable@dpdk.org

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 drivers/net/virtio/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index d595cfdcab..88e231565e 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -39,7 +39,7 @@ if arch_subdir == 'x86'
 	sources += files('virtio_rxtx_simple_sse.c')
 elif arch_subdir == 'ppc'
 	sources += files('virtio_rxtx_simple_altivec.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
 	sources += files('virtio_rxtx_packed.c')
 	sources += files('virtio_rxtx_simple_neon.c')
 endif
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 4/7] build: add aarch32 meson build flags
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                         ` (2 preceding siblings ...)
  2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 3/7] net/virtio: " Juraj Linkeš
@ 2021-03-17 13:36                       ` Juraj Linkeš
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
                                         ` (2 subsequent siblings)
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:36 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/meson.build | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 00bc4610a3..0f14741ebe 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -69,7 +69,14 @@ part_number_config_arm = {
 			['RTE_ARM_FEATURE_ATOMICS', true],
 			['RTE_MAX_LCORE', 64]
 		]
-	}
+	},
+	'aarch32': {
+		'machine_args': ['-march=armv8-a',
+				 '-mfpu=neon'],
+		'flags': [
+			['RTE_ARCH_ARM_NEON_MEMCPY', false],
+			['RTE_ARCH_STRICT_ALIGN', true]
+		]}
 }
 implementer_arm = {
 	'description': 'Arm',
@@ -199,14 +206,23 @@ implementers = {
 dpdk_conf.set('RTE_ARCH_ARM', 1)
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
 
+update_flags = false
 if dpdk_conf.get('RTE_ARCH_32')
 	# armv7 build
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
-	# the minimum architecture supported, armv7-a, needs the following,
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		implementer_id = meson.get_cross_property('implementer_id')
+		part_number = meson.get_cross_property('part_number')
+		flags_common = []
+	else
+		# the minimum architecture supported, armv7-a, needs the following,
+		machine_args += '-mfpu=neon'
+	endif
 else
 	# aarch64 build
+	update_flags = true
 	if not meson.is_cross_build()
 		if machine == 'default'
 			# default build
@@ -232,7 +248,9 @@ else
 		implementer_id = meson.get_cross_property('implementer_id')
 		part_number = meson.get_cross_property('part_number')
 	endif
+endif
 
+if update_flags
 	if implementers.has_key(implementer_id)
 		implementer_config = implementers[implementer_id]
 	else
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 5/7] build: add aarch32 to meson cross-compilation
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                         ` (3 preceding siblings ...)
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 4/7] build: add aarch32 meson build flags Juraj Linkeš
@ 2021-03-17 13:36                       ` Juraj Linkeš
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 7/7] doc: add aarch32 build guidance Juraj Linkeš
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:36 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Create meson cross file arm32_armv8a_linux_gcc. Use arm-linux-gnueabihf-
toolset which comes with standard packages on most used systems, such as
Ubuntu and CentOS.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/arm32_armv8a_linux_gcc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 config/arm/arm32_armv8a_linux_gcc

diff --git a/config/arm/arm32_armv8a_linux_gcc b/config/arm/arm32_armv8a_linux_gcc
new file mode 100644
index 0000000000..6299d5c887
--- /dev/null
+++ b/config/arm/arm32_armv8a_linux_gcc
@@ -0,0 +1,17 @@
+[binaries]
+c = 'arm-linux-gnueabihf-gcc'
+cpp = 'arm-linux-gnueabihf-cpp'
+ar = 'arm-linux-gnueabihf-gcc-ar'
+strip = 'arm-linux-gnueabihf-strip'
+pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pcap-config = ''
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch32'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementer_id = '0x41'
+part_number = 'aarch32'
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 6/7] ci: add aarch64 -> aarch32 cross compiling jobs
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                         ` (4 preceding siblings ...)
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
@ 2021-03-17 13:36                       ` Juraj Linkeš
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 7/7] doc: add aarch32 build guidance Juraj Linkeš
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:36 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli

Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 91e43a975b..73a9c234ca 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -62,6 +62,11 @@ if [ "$AARCH64" = "true" ]; then
     fi
 fi
 
+if [ "$AARCH32" = "true" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "true" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -84,7 +89,7 @@ OPTS="$OPTS -Dcheck_includes=true"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "true" ]; then
+if [ "$AARCH64" != "true" ] && [ "$AARCH32" != "true" ]; then
     failed=
     configure_coredump
     devtools/test-null.sh || failed="true"
diff --git a/.travis.yml b/.travis.yml
index 7ed982ac07..c4bd2d079b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,6 +25,10 @@ _aarch64_clang_packages: &aarch64_clang_packages
   - *required_packages
   - [libgcc-7-dev-arm64-cross, libatomic1-arm64-cross, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _libabigail_build_packages: &libabigail_build_packages
   - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
 
@@ -168,3 +172,18 @@ jobs:
     virt: vm
     group: edge
     compiler: clang
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=true
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=true
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

* [dpdk-dev] [PATCH v14 7/7] doc: add aarch32 build guidance
  2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
                                         ` (5 preceding siblings ...)
  2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
@ 2021-03-17 13:36                       ` Juraj Linkeš
  6 siblings, 0 replies; 122+ messages in thread
From: Juraj Linkeš @ 2021-03-17 13:36 UTC (permalink / raw)
  To: thomas, david.marchand, bruce.richardson, aconole, maicolgabriel
  Cc: dev, juraj.linkes, Ruifeng.Wang, Honnappa.Nagarahalli, Phil Yang

From: Phil Yang <phil.yang@arm.com>

Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst  | 38 +++++++++++++++----
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index faaf24b95b..87d7fba78a 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -1,15 +1,16 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
-    Copyright(c) 2020 ARM Corporation.
+    Copyright(c) 2021 ARM Corporation.
 
-Cross compiling DPDK for ARM64
-==============================
-This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts.
+Cross compile DPDK for aarch64 and aarch32
+==========================================
+This chapter describes how to cross compile DPDK for aarch64 on x86 build
+machines and compile 32-bit aarch32 DPDK on aarch64 build machines.
 
 .. note::
 
-   Whilst it is recommended to natively build DPDK on ARM64 (just
-   like with x86), it is also possible to cross compile DPDK for ARM64.
-   An ARM64 cross compiler GNU toolchain or an LLVM/clang toolchain
+   Whilst it is recommended to natively build DPDK on aarch64 (just
+   like with x86), it is also possible to cross compile DPDK for aarch64.
+   An aarch64 cross compiler GNU toolchain or an LLVM/clang toolchain
    may be used for cross-compilation.
 
 
@@ -54,6 +55,11 @@ To install it in Ubuntu::
    sudo apt install pkg-config-aarch64-linux-gnu
 
 
+For aarch32, install ``pkg-config-arm-linux-gnueabihf``::
+
+   sudo apt install pkg-config-aarch64-linux-gnu
+
+
 GNU toolchain
 -------------
 
@@ -72,16 +78,29 @@ the following description is an example of this version.
 
 .. code-block:: console
 
+   # aarch64 binaries
    wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
 
+.. code-block:: console
+
+   # aarch32 binaries
+   wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
+
+
 Unzip and add into the PATH
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. code-block:: console
 
+   # aarch64
    tar -xvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
    export PATH=$PATH:<cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin
 
+.. code-block:: console
+
+   tar -xvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
+   export PATH=$PATH:<cross_install_dir>/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin
+
 .. note::
 
    For the host requirements and other info, refer to the release note section: https://releases.linaro.org/components/toolchain/binaries/
@@ -118,6 +137,10 @@ command::
    meson aarch64-build-gcc --cross-file config/arm/arm64_armv8_linux_gcc
    ninja -C aarch64-build-gcc
 
+If the target machine is aarch32 we can use the following command::
+
+   meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc
+   ninja -C arm32-build
 
 LLVM/Clang toolchain
 --------------------
@@ -211,6 +234,7 @@ you may use various combinations of implementer/part number::
       '0xd0a':   cortex-a75
       '0xd0b':   cortex-a76
       '0xd0c':   neoverse-n1
+      'aarch32': armv8 aarch32 execution mode build
 
    Supported part_numbers for 0x43:
       '0xa1':    thunderxt88
-- 
2.20.1


^ permalink raw reply	[flat|nested] 122+ messages in thread

end of thread, other threads:[~2021-03-17 13:37 UTC | newest]

Thread overview: 122+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15  9:03 [dpdk-dev] [PATCH v3 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 1/4] build: port arm32 options from make to meson Juraj Linkeš
2020-04-15 11:45   ` Luca Boccassi
2020-04-16  6:16     ` Juraj Linkeš
2020-04-16  8:53       ` Luca Boccassi
2020-04-16 11:25         ` Juraj Linkeš
2020-04-16 12:00           ` Luca Boccassi
2020-04-16 12:22             ` Juraj Linkeš
2020-04-16 15:11               ` Ruifeng Wang
2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 2/4] build: add arm32 meson build flags Juraj Linkeš
2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 3/4] build: add arm32 meson cross file Juraj Linkeš
2020-04-15  9:03 ` [dpdk-dev] [PATCH v3 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
2020-04-29 10:24 ` [dpdk-dev] [PATCH v4 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 2/4] build: add arm32 meson build flags Juraj Linkeš
2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 3/4] build: add arm32 meson cross file Juraj Linkeš
2020-04-29 10:24   ` [dpdk-dev] [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
2020-05-05 18:56     ` Aaron Conole
2020-05-11  7:05       ` Juraj Linkeš
2020-07-06  8:28   ` [dpdk-dev] [PATCH v5 0/4] aarch64 -> arm32 cross compilation support Juraj Linkeš
2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 1/4] build: disable vhost NUMA for arm32 Juraj Linkeš
2020-07-06  8:56       ` David Marchand
2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 2/4] build: add arm32 meson build flags Juraj Linkeš
2020-07-06  9:11       ` Jerin Jacob
2020-07-07 20:44         ` Honnappa Nagarahalli
2020-07-08  8:33           ` Jerin Jacob
2020-07-08 20:55             ` Honnappa Nagarahalli
2020-07-09  4:49               ` Jerin Jacob
2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 3/4] build: add arm32 meson cross file Juraj Linkeš
2020-07-06  8:28     ` [dpdk-dev] [PATCH v5 4/4] ci: add aarch64 -> arm32 cross compiling jobs Juraj Linkeš
2020-07-06  9:11       ` Juraj Linkeš
2020-08-13  9:21     ` [dpdk-dev] [PATCH v6 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 2/5] build: add aarch32 meson build flags Juraj Linkeš
2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2020-08-14  2:10         ` Ruifeng Wang
2020-08-13  9:21       ` [dpdk-dev] [PATCH v6 5/5] doc: add aarch32 build guidance Juraj Linkeš
2020-08-14 10:31       ` [dpdk-dev] [PATCH v7 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
2020-08-19 17:45           ` Ajit Khaparde
2020-08-20  3:00             ` Ruifeng Wang
2020-08-20  9:13               ` Juraj Linkeš
2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 2/5] build: add aarch32 meson build flags Juraj Linkeš
2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2020-08-14 10:31         ` [dpdk-dev] [PATCH v7 5/5] doc: add aarch32 build guidance Juraj Linkeš
2020-08-25 13:04         ` [dpdk-dev] [PATCH v8 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
2020-08-25 19:05             ` Ajit Khaparde
2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 2/5] build: add aarch32 meson build flags Juraj Linkeš
2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2020-08-25 14:16             ` Aaron Conole
2020-08-26  6:21               ` Juraj Linkeš
2020-08-25 13:04           ` [dpdk-dev] [PATCH v8 5/5] doc: add aarch32 build guidance Juraj Linkeš
2020-08-25 14:03             ` Aaron Conole
2020-08-26  3:12               ` Phil Yang
2020-08-28 11:38           ` [dpdk-dev] [PATCH v9 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 2/5] build: add aarch32 meson build flags Juraj Linkeš
2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2020-08-28 11:38             ` [dpdk-dev] [PATCH v9 5/5] doc: add aarch32 build guidance Juraj Linkeš
2020-09-11 13:20               ` Aaron Conole
2020-09-16  8:04                 ` Juraj Linkeš
2020-09-16  8:21             ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32 Juraj Linkeš
2020-11-04 18:30                 ` Lance Richardson
2020-11-05  7:20                   ` Ruifeng Wang
2020-11-05 13:41                     ` Lance Richardson
2020-11-05 15:13                       ` Ruifeng Wang
2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags Juraj Linkeš
2020-10-21 14:24                 ` Ruifeng Wang
2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-compilation Juraj Linkeš
2020-10-21 14:27                 ` Ruifeng Wang
2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2020-10-21 14:29                 ` Ruifeng Wang
2020-09-16  8:21               ` [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance Juraj Linkeš
2020-10-21 14:32                 ` Ruifeng Wang
2020-10-21 11:42               ` [dpdk-dev] [PATCH v10 0/5] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2020-10-21 11:52                 ` Thomas Monjalon
2020-10-28  9:22               ` Jerin Jacob
2020-11-30 14:03               ` Aaron Conole
2020-12-09 12:59               ` [dpdk-dev] [PATCH v11 0/7] " Juraj Linkeš
2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 1/7] net/sfc: fix aarch32 build Juraj Linkeš
2020-12-09 13:37                   ` [dpdk-dev] ***Spam*** " Andrew Rybchenko
2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 2/7] net/bnxt: " Juraj Linkeš
2020-12-09 14:10                   ` Lance Richardson
2020-12-09 14:16                     ` Ruifeng Wang
2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 3/7] net/bnxt: add support for aarch32 Juraj Linkeš
2020-12-09 13:59                   ` Lance Richardson
2020-12-09 14:11                     ` Ruifeng Wang
2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 4/7] build: add aarch32 meson build flags Juraj Linkeš
2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2020-12-09 15:29                   ` Aaron Conole
2020-12-09 12:59                 ` [dpdk-dev] [PATCH v11 7/7] doc: add aarch32 build guidance Juraj Linkeš
2020-12-11  8:26                 ` [dpdk-dev] [PATCH v12 0/6] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 1/6] net/sfc: fix aarch32 build Juraj Linkeš
2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 2/6] net/bnxt: " Juraj Linkeš
2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 3/6] build: add aarch32 meson build flags Juraj Linkeš
2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 4/6] build: add aarch32 to meson cross-compilation Juraj Linkeš
2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 5/6] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2020-12-11  8:26                   ` [dpdk-dev] [PATCH v12 6/6] doc: add aarch32 build guidance Juraj Linkeš
2021-03-09  8:36                   ` [dpdk-dev] [PATCH v13 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 1/7] net/sfc: fix aarch32 build Juraj Linkeš
2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 2/7] net/bnxt: " Juraj Linkeš
2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 3/7] net/virtio: " Juraj Linkeš
2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 4/7] build: add aarch32 meson build flags Juraj Linkeš
2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2021-03-09  8:36                     ` [dpdk-dev] [PATCH v13 7/7] doc: add aarch32 build guidance Juraj Linkeš
2021-03-09 13:46                       ` Aaron Conole
2021-03-17 13:35                     ` [dpdk-dev] [PATCH v14 0/7] aarch64 -> aarch32 cross compilation support Juraj Linkeš
2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 1/7] net/sfc: fix aarch32 build Juraj Linkeš
2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 2/7] net/bnxt: " Juraj Linkeš
2021-03-17 13:35                       ` [dpdk-dev] [PATCH v14 3/7] net/virtio: " Juraj Linkeš
2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 4/7] build: add aarch32 meson build flags Juraj Linkeš
2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 5/7] build: add aarch32 to meson cross-compilation Juraj Linkeš
2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 6/7] ci: add aarch64 -> aarch32 cross compiling jobs Juraj Linkeš
2021-03-17 13:36                       ` [dpdk-dev] [PATCH v14 7/7] doc: add aarch32 build guidance Juraj Linkeš

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git