From patchwork Tue Mar 9 08:36:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 88730 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0CE9A0567; Tue, 9 Mar 2021 09:36:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03E0622A3F0; Tue, 9 Mar 2021 09:36:51 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 6424722A3E6; Tue, 9 Mar 2021 09:36:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 6B1D7C480D; Tue, 9 Mar 2021 09:36:48 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YhY5sIigxQQh; Tue, 9 Mar 2021 09:36:47 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 6B673C3E9F; Tue, 9 Mar 2021 09:36:46 +0100 (CET) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, Ruifeng Wang , arybchenko@solarflare.com, stable@dpdk.org Date: Tue, 9 Mar 2021 09:36:39 +0100 Message-Id: <1615279005-30278-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> References: <1607675213-12061-1-git-send-email-juraj.linkes@pantheon.tech> <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v13 1/7] net/sfc: fix aarch32 build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ruifeng Wang 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 Acked-by: Andrew Rybchenko --- 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 From patchwork Tue Mar 9 08:36:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 88731 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0FBCA0567; Tue, 9 Mar 2021 09:37:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56E0422A409; Tue, 9 Mar 2021 09:36:52 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 6169B22A3F9; Tue, 9 Mar 2021 09:36:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id C1FD3C4809; Tue, 9 Mar 2021 09:36:49 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kk5CXe2u_1LA; Tue, 9 Mar 2021 09:36:48 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 1ABDCC4806; Tue, 9 Mar 2021 09:36:47 +0100 (CET) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, Ruifeng Wang , lance.richardson@broadcom.com, stable@dpdk.org Date: Tue, 9 Mar 2021 09:36:40 +0100 Message-Id: <1615279005-30278-3-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> References: <1607675213-12061-1-git-send-email-juraj.linkes@pantheon.tech> <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v13 2/7] net/bnxt: fix aarch32 build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ruifeng Wang 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 Reviewed-by: Lance Richardson --- 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 From patchwork Tue Mar 9 08:36:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 88732 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A96DA0567; Tue, 9 Mar 2021 09:37:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3FEE22A402; Tue, 9 Mar 2021 09:36:54 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 5459A22A408; Tue, 9 Mar 2021 09:36:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 0B96EC4815; Tue, 9 Mar 2021 09:36:50 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M6_I0KowLsuT; Tue, 9 Mar 2021 09:36:50 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id D8E2BC480C; Tue, 9 Mar 2021 09:36:47 +0100 (CET) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, stable@dpdk.org Date: Tue, 9 Mar 2021 09:36:41 +0100 Message-Id: <1615279005-30278-4-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> References: <1607675213-12061-1-git-send-email-juraj.linkes@pantheon.tech> <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v13 3/7] net/virtio: fix aarch32 build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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š --- 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 From patchwork Tue Mar 9 08:36:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 88733 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96E0FA0567; Tue, 9 Mar 2021 09:37:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C87A22A420; Tue, 9 Mar 2021 09:36:56 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 8F02322A408 for ; Tue, 9 Mar 2021 09:36:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id AE461C4806; Tue, 9 Mar 2021 09:36:52 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zCtaqms3DVsf; Tue, 9 Mar 2021 09:36:51 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id CF5E4C480F; Tue, 9 Mar 2021 09:36:48 +0100 (CET) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com Date: Tue, 9 Mar 2021 09:36:42 +0100 Message-Id: <1615279005-30278-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> References: <1607675213-12061-1-git-send-email-juraj.linkes@pantheon.tech> <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v13 4/7] build: add aarch32 meson build flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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š Acked-by: Ruifeng Wang --- 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 From patchwork Tue Mar 9 08:36:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 88734 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA263A0567; Tue, 9 Mar 2021 09:37:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C95222A428; Tue, 9 Mar 2021 09:36:57 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id E0CDF22A414 for ; Tue, 9 Mar 2021 09:36:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 03957C480C; Tue, 9 Mar 2021 09:36:52 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a9n9GuHKVs_6; Tue, 9 Mar 2021 09:36:52 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 9D1D8C3E9E; Tue, 9 Mar 2021 09:36:49 +0100 (CET) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com Date: Tue, 9 Mar 2021 09:36:43 +0100 Message-Id: <1615279005-30278-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> References: <1607675213-12061-1-git-send-email-juraj.linkes@pantheon.tech> <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v13 5/7] build: add aarch32 to meson cross-compilation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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š Acked-by: Ruifeng Wang --- 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' From patchwork Tue Mar 9 08:36:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 88735 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9DA79A0567; Tue, 9 Mar 2021 09:37:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7695122A432; Tue, 9 Mar 2021 09:36:58 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 09CF322A410 for ; Tue, 9 Mar 2021 09:36:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 4D58FC3E9F; Tue, 9 Mar 2021 09:36:54 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iG7hNJCyZjxW; Tue, 9 Mar 2021 09:36:53 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 6F29CC4811; Tue, 9 Mar 2021 09:36:50 +0100 (CET) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com Date: Tue, 9 Mar 2021 09:36:44 +0100 Message-Id: <1615279005-30278-7-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> References: <1607675213-12061-1-git-send-email-juraj.linkes@pantheon.tech> <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v13 6/7] ci: add aarch64 -> aarch32 cross compiling jobs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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š Reviewed-by: Ruifeng Wang Acked-by: Aaron Conole --- .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 From patchwork Tue Mar 9 08:36:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 88736 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58361A0567; Tue, 9 Mar 2021 09:37:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37ED422A450; Tue, 9 Mar 2021 09:37:00 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id AA16E22A41A for ; Tue, 9 Mar 2021 09:36:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id DD1C4C4809; Tue, 9 Mar 2021 09:36:54 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AIei_O3r56_T; Tue, 9 Mar 2021 09:36:53 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 3BE92C4816; Tue, 9 Mar 2021 09:36:51 +0100 (CET) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, Phil Yang Date: Tue, 9 Mar 2021 09:36:45 +0100 Message-Id: <1615279005-30278-8-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> References: <1607675213-12061-1-git-send-email-juraj.linkes@pantheon.tech> <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v13 7/7] doc: add aarch32 build guidance X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Phil Yang Add cross-compiling guidance for 32-bit aarch32 DPDK on aarch64 host. Signed-off-by: Phil Yang Acked-by: Ruifeng Wang Acked-by: Aaron Conole --- .../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:/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:/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