From patchwork Thu Apr 22 12:49:02 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: 92021 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 11381A09E4; Thu, 22 Apr 2021 14:49:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A91E641D58; Thu, 22 Apr 2021 14:49:19 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 365C641D23; Thu, 22 Apr 2021 14:49:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id B7D84C5F66; Thu, 22 Apr 2021 14:49:13 +0200 (CEST) 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 sEZj5qtwmP2z; Thu, 22 Apr 2021 14:49:12 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 96846C5F63; Thu, 22 Apr 2021 14:49:11 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Ruifeng Wang , arybchenko@solarflare.com, stable@dpdk.org Date: Thu, 22 Apr 2021 14:49:02 +0200 Message-Id: <1619095749-7948-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v17 1/8] 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 --- 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 d87ba396b4..2d14186ecd 100644 --- a/drivers/common/sfc_efx/meson.build +++ b/drivers/common/sfc_efx/meson.build @@ -10,7 +10,7 @@ if is_windows reason = 'not supported on Windows' 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' and arch_subdir != 'arm') or (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 b58425bf99..619d1e3b7d 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' and arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64')) build = false reason = 'only supported on x86_64 and aarch64' endif From patchwork Thu Apr 22 12:49:03 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: 92022 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 1FF94A09E4; Thu, 22 Apr 2021 14:49:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E926341D64; Thu, 22 Apr 2021 14:49:21 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 14C3A41D5B; Thu, 22 Apr 2021 14:49:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 4D322C5F6B; Thu, 22 Apr 2021 14:49:17 +0200 (CEST) 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 sVcnECeFNIW3; Thu, 22 Apr 2021 14:49:16 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 8D65EC5F64; Thu, 22 Apr 2021 14:49:12 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Ruifeng Wang , lance.richardson@broadcom.com, stable@dpdk.org Date: Thu, 22 Apr 2021 14:49:03 +0200 Message-Id: <1619095749-7948-3-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v17 2/8] 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 Acked-by: Ajit Khaparde --- 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 117c753489..5a72989915 100644 --- a/drivers/net/bnxt/meson.build +++ b/drivers/net/bnxt/meson.build @@ -82,6 +82,6 @@ sources = files( 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 Thu Apr 22 12:49:04 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: 92023 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 223B4A09E4; Thu, 22 Apr 2021 14:49:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20FDA41D68; Thu, 22 Apr 2021 14:49:23 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 67F6B41D5B; Thu, 22 Apr 2021 14:49:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id CA301C5F6D; Thu, 22 Apr 2021 14:49:17 +0200 (CEST) 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 803tf9v9jOCY; Thu, 22 Apr 2021 14:49:16 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 683CCC5F65; Thu, 22 Apr 2021 14:49:13 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, stable@dpdk.org Date: Thu, 22 Apr 2021 14:49:04 +0200 Message-Id: <1619095749-7948-4-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v17 3/8] 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š Reviewed-by: Maxime Coquelin --- 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 81b0a61baf..01a333ada2 100644 --- a/drivers/net/virtio/meson.build +++ b/drivers/net/virtio/meson.build @@ -41,7 +41,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 Thu Apr 22 12:49:05 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: 92024 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 5F8A3A09E4; Thu, 22 Apr 2021 14:49:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF87141D6E; Thu, 22 Apr 2021 14:49:25 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 937F341D66 for ; Thu, 22 Apr 2021 14:49:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 27E23C5F65; Thu, 22 Apr 2021 14:49:21 +0200 (CEST) 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 WkDgIWQetnRB; Thu, 22 Apr 2021 14:49:19 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 21123C5F6A; Thu, 22 Apr 2021 14:49:15 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Thu, 22 Apr 2021 14:49:05 +0200 Message-Id: <1619095749-7948-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v17 4/8] eal/arm: update CPU 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" There are two execution states on armv8 architecture, aarch64 and aarch32. Add PLATFORM_STR for the latter and update RTE_ARCH_* flags according to e9b97392640. Signed-off-by: Juraj Linkeš Acked-by: Ruifeng Wang --- lib/eal/arm/include/rte_cpuflags_32.h | 1 + lib/eal/arm/rte_cpuflags.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/eal/arm/include/rte_cpuflags_32.h b/lib/eal/arm/include/rte_cpuflags_32.h index b5347be1ec..4e254428a2 100644 --- a/lib/eal/arm/include/rte_cpuflags_32.h +++ b/lib/eal/arm/include/rte_cpuflags_32.h @@ -41,6 +41,7 @@ enum rte_cpu_flag_t { RTE_CPUFLAG_SHA2, RTE_CPUFLAG_CRC32, RTE_CPUFLAG_V7L, + RTE_CPUFLAG_V8L, /* The last item */ RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */ }; diff --git a/lib/eal/arm/rte_cpuflags.c b/lib/eal/arm/rte_cpuflags.c index e3a53bcece..9e5b68b066 100644 --- a/lib/eal/arm/rte_cpuflags.c +++ b/lib/eal/arm/rte_cpuflags.c @@ -46,8 +46,12 @@ struct feature_entry { #define FEAT_DEF(name, reg, bit) \ [RTE_CPUFLAG_##name] = {reg, bit, #name}, +#ifdef RTE_ARCH_32 #ifdef RTE_ARCH_ARMv7 #define PLATFORM_STR "v7l" +#elif defined RTE_ARCH_ARMv8_AARCH32 +#define PLATFORM_STR "v8l" +#endif typedef Elf32_auxv_t _Elfx_auxv_t; const struct feature_entry rte_cpu_feature_table[] = { @@ -78,10 +82,14 @@ const struct feature_entry rte_cpu_feature_table[] = { FEAT_DEF(SHA1, REG_HWCAP2, 2) FEAT_DEF(SHA2, REG_HWCAP2, 3) FEAT_DEF(CRC32, REG_HWCAP2, 4) + #ifdef RTE_ARCH_ARMv7 FEAT_DEF(V7L, REG_PLATFORM, 0) + #elif defined RTE_ARCH_ARMv8_AARCH32 + FEAT_DEF(V8L, REG_PLATFORM, 0) + #endif }; -#elif defined RTE_ARCH_ARM64 +#elif defined RTE_ARCH_64 #define PLATFORM_STR "aarch64" typedef Elf64_auxv_t _Elfx_auxv_t; From patchwork Thu Apr 22 12:49:06 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: 92025 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 F267FA09E4; Thu, 22 Apr 2021 14:49:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1CD9B41D78; Thu, 22 Apr 2021 14:49:27 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id EB26241D5E for ; Thu, 22 Apr 2021 14:49:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 7ABE6C5F6F; Thu, 22 Apr 2021 14:49:21 +0200 (CEST) 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 DYvKkxL-QzD1; Thu, 22 Apr 2021 14:49:20 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 73167C5F5E; Thu, 22 Apr 2021 14:49:16 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Thu, 22 Apr 2021 14:49:06 +0200 Message-Id: <1619095749-7948-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v17 5/8] 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 | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 22cd81319c..f0da1b8cb9 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -67,7 +67,15 @@ part_number_config_arm = { ['RTE_MAX_LCORE', 64], ['RTE_MAX_NUMA_NODES', 1] ] - } + }, + 'aarch32': { + 'machine_args': ['-march=armv8-a', + '-mfpu=neon'], + 'flags': [ + ['RTE_ARCH_ARM_NEON_MEMCPY', false], + ['RTE_ARCH_STRICT_ALIGN', true], + ['RTE_ARCH_ARMv8_AARCH32', true] + ]} } implementer_arm = { 'description': 'Arm', @@ -342,14 +350,25 @@ socs = { dpdk_conf.set('RTE_ARCH_ARM', 1) dpdk_conf.set('RTE_FORCE_INTRINSICS', 1) +update_flags = false +soc_flags = [] if dpdk_conf.get('RTE_ARCH_32') - # armv7 build + # 32-bit 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 + # armv7 build + dpdk_conf.set('RTE_ARCH_ARMv7', true) + # the minimum architecture supported, armv7-a, needs the following, + machine_args += '-mfpu=neon' + endif else # aarch64 build + update_flags = true soc = get_option('platform') soc_config = {} if not meson.is_cross_build() @@ -386,7 +405,6 @@ else soc_config = socs.get(soc, {'not_supported': true}) endif - soc_flags = [] if soc_config.has_key('not_supported') error('SoC @0@ not supported.'.format(soc)) elif soc_config != {} @@ -401,7 +419,9 @@ else disable_drivers += ',' + soc_config.get('disable_drivers', '') enable_drivers += ',' + soc_config.get('enable_drivers', '') endif +endif +if update_flags if implementers.has_key(implementer_id) implementer_config = implementers[implementer_id] else From patchwork Thu Apr 22 12:49:07 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: 92026 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 0061DA09E4; Thu, 22 Apr 2021 14:49:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7846141D7C; Thu, 22 Apr 2021 14:49:28 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 9D7FF41D74 for ; Thu, 22 Apr 2021 14:49:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 3B4B4C5F5E; Thu, 22 Apr 2021 14:49:23 +0200 (CEST) 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 g6RaYJ6JMj9V; Thu, 22 Apr 2021 14:49:22 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 49E25C5F63; Thu, 22 Apr 2021 14:49:17 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Thu, 22 Apr 2021 14:49:07 +0200 Message-Id: <1619095749-7948-7-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v17 6/8] 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 Thu Apr 22 12:49:08 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: 92027 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 082ABA09E4; Thu, 22 Apr 2021 14:50:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C057441D82; Thu, 22 Apr 2021 14:49:29 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id EAE4E41D6E for ; Thu, 22 Apr 2021 14:49:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 9B721C5F66; Thu, 22 Apr 2021 14:49:23 +0200 (CEST) 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 05l_zbBEm4Xf; Thu, 22 Apr 2021 14:49:22 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id DE104C5F6E; Thu, 22 Apr 2021 14:49:18 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Thu, 22 Apr 2021 14:49:08 +0200 Message-Id: <1619095749-7948-8-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v17 7/8] 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 898cffd998..bb94221d08 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 Thu Apr 22 12:49:09 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: 92028 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 14B36A09E4; Thu, 22 Apr 2021 14:50:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06EB941D88; Thu, 22 Apr 2021 14:49:32 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id CF06841D6F for ; Thu, 22 Apr 2021 14:49:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id B3672C5F63; Thu, 22 Apr 2021 14:49:25 +0200 (CEST) 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 R8ueYY6YQBhZ; Thu, 22 Apr 2021 14:49:24 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 1AD60C5F64; Thu, 22 Apr 2021 14:49:20 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Phil Yang Date: Thu, 22 Apr 2021 14:49:09 +0200 Message-Id: <1619095749-7948-9-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v17 8/8] 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 | 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 3857cdefe9..df10383aa8 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-arm-linux-gnueabihf + + GNU toolchain ------------- @@ -72,16 +78,30 @@ 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 + + # aarch32 + 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 +138,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 aarch32-build --cross-file config/arm/arm32_armv8a_linux_gcc + ninja -C aarch32-build LLVM/Clang toolchain --------------------