From patchwork Wed Jul 7 13:25:37 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: 95504 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 C5B8CA0C4A; Wed, 7 Jul 2021 15:25:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DC4741519; Wed, 7 Jul 2021 15:25:52 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 9803241391; Wed, 7 Jul 2021 15:25:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id EDFF6E7574; Wed, 7 Jul 2021 15:25:47 +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 p5N7HoRNJuKV; Wed, 7 Jul 2021 15:25:45 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id B85F3E756D; Wed, 7 Jul 2021 15:25:44 +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, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, jerinj@marvell.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Ruifeng Wang , arybchenko@solarflare.com, stable@dpdk.org Date: Wed, 7 Jul 2021 15:25:37 +0200 Message-Id: <1625664343-26498-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> References: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v18 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 --- 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 f42ccf609c..0cf0a23bf8 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 ccf5984d87..18e7edb568 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 Wed Jul 7 13:25:38 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: 95505 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 E359CA0C4A; Wed, 7 Jul 2021 15:26:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AFA74151D; Wed, 7 Jul 2021 15:25:55 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id A19AC4151D; Wed, 7 Jul 2021 15:25:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id A23E4E757A; Wed, 7 Jul 2021 15:25:51 +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 Av_c2AULG4vS; Wed, 7 Jul 2021 15:25:49 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 99A96E756F; Wed, 7 Jul 2021 15:25:45 +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, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, jerinj@marvell.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Ruifeng Wang , lance.richardson@broadcom.com, stable@dpdk.org Date: Wed, 7 Jul 2021 15:25:38 +0200 Message-Id: <1625664343-26498-3-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> References: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v18 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 41c4796366..53a324b4a8 100644 --- a/drivers/net/bnxt/meson.build +++ b/drivers/net/bnxt/meson.build @@ -99,6 +99,6 @@ if arch_subdir == 'x86' c_args: [cflags, '-mavx2']) objs += bnxt_avx2_lib.extract_objects('bnxt_rxtx_vec_avx2.c') endif -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 Wed Jul 7 13:25:39 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: 95506 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 5E071A0C4A; Wed, 7 Jul 2021 15:26:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79F2F41526; Wed, 7 Jul 2021 15:25:56 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id A92A84151E; Wed, 7 Jul 2021 15:25:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 4E9D6E7576; Wed, 7 Jul 2021 15:25:51 +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 1rE8m556GvfQ; Wed, 7 Jul 2021 15:25:50 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 6BAB5E7570; Wed, 7 Jul 2021 15:25:46 +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, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, jerinj@marvell.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, stable@dpdk.org Date: Wed, 7 Jul 2021 15:25:39 +0200 Message-Id: <1625664343-26498-4-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> References: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v18 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š 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 Wed Jul 7 13:25:40 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: 95507 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 2829CA0C4A; Wed, 7 Jul 2021 15:26:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3971A4152D; Wed, 7 Jul 2021 15:25:59 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 32FB541529 for ; Wed, 7 Jul 2021 15:25:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id A01BCE7570; Wed, 7 Jul 2021 15:25:55 +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 LAi5qN7QyqRC; Wed, 7 Jul 2021 15:25:53 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 304BCE7572; Wed, 7 Jul 2021 15:25:47 +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, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, jerinj@marvell.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Wed, 7 Jul 2021 15:25:40 +0200 Message-Id: <1625664343-26498-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> References: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v18 4/7] 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š --- lib/eal/arm/include/rte_cpuflags_32.h | 1 + lib/eal/arm/rte_cpuflags.c | 11 ++++++++++- 2 files changed, 11 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 d84c9fc09f..93461191c7 100644 --- a/lib/eal/arm/rte_cpuflags.c +++ b/lib/eal/arm/rte_cpuflags.c @@ -46,8 +46,13 @@ 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[] = { FEAT_DEF(SWP, REG_HWCAP, 0) @@ -77,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" const struct feature_entry rte_cpu_feature_table[] = { From patchwork Wed Jul 7 13:25: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: 95508 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 D65ABA0C4A; Wed, 7 Jul 2021 15:26:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF7EC41535; Wed, 7 Jul 2021 15:26:00 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 76BD241529 for ; Wed, 7 Jul 2021 15:25:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id DE565E757D; Wed, 7 Jul 2021 15:25:55 +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 UDUHmwjuSe0Y; Wed, 7 Jul 2021 15:25:53 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id C2F54E7575; Wed, 7 Jul 2021 15:25:48 +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, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, jerinj@marvell.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Wed, 7 Jul 2021 15:25:41 +0200 Message-Id: <1625664343-26498-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> References: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v18 5/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 armv8 SoC to build config. 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 | 88 +++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 27 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 9b147c0b93..4170b14c80 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -24,9 +24,9 @@ flags_common = [ ] ## Part numbers are specific to Arm implementers -# implementer specific aarch64 flags have middle priority +# implementer specific armv8 flags have middle priority # (will overwrite common flags) -# part number specific aarch64 flags have higher priority +# part number specific armv8 flags have higher priority # (will overwrite both common and implementer specific flags) implementer_generic = { 'description': 'Generic armv8', @@ -37,7 +37,18 @@ implementer_generic = { ['RTE_MAX_NUMA_NODES', 4] ], 'part_number_config': { - 'generic': {'machine_args': ['-march=armv8-a+crc', '-moutline-atomics']} + 'generic': { + 'machine_args': ['-march=armv8-a+crc', '-moutline-atomics'] + }, + 'generic_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], + ['RTE_CACHE_LINE_SIZE', 64] + ] + } } } @@ -193,14 +204,20 @@ implementers = { '0x51': implementer_qualcomm } -# SoC specific aarch64 flags have the highest priority +# SoC specific armv8 flags have the highest priority # (will overwrite all other flags) soc_generic = { - 'description': 'Generic un-optimized build for all aarch64 machines', + 'description': 'Generic un-optimized build for armv8 aarch64 exec mode', 'implementer': 'generic', 'part_number': 'generic' } +soc_generic_aarch32 = { + 'description': 'Generic un-optimized build for armv8 aarch32 exec mode', + 'implementer': 'generic', + 'part_number': 'generic_aarch32' +} + soc_armada = { 'description': 'Marvell ARMADA', 'implementer': '0x41', @@ -330,28 +347,30 @@ soc_thunderxt88 = { ''' Start of SoCs list -generic: Generic un-optimized build for all aarch64 machines. -armada: Marvell ARMADA -bluefield: NVIDIA BlueField -centriq2400: Qualcomm Centriq 2400 -cn10k: Marvell OCTEON 10 -dpaa: NXP DPAA -emag: Ampere eMAG -graviton2: AWS Graviton2 -kunpeng920: HiSilicon Kunpeng 920 -kunpeng930: HiSilicon Kunpeng 930 -n1sdp: Arm Neoverse N1SDP -n2: Arm Neoverse N2 -octeontx2: Marvell OCTEON TX2 -stingray: Broadcom Stingray -thunderx2: Marvell ThunderX2 T99 -thunderxt88: Marvell ThunderX T88 +generic: Generic un-optimized build for armv8 aarch64 execution mode. +generic_aarch32: Generic un-optimized build for armv8 aarch32 execution mode. +armada: Marvell ARMADA +bluefield: NVIDIA BlueField +centriq2400: Qualcomm Centriq 2400 +cn10k: Marvell OCTEON 10 +dpaa: NXP DPAA +emag: Ampere eMAG +graviton2: AWS Graviton2 +kunpeng920: HiSilicon Kunpeng 920 +kunpeng930: HiSilicon Kunpeng 930 +n1sdp: Arm Neoverse N1SDP +n2: Arm Neoverse N2 +octeontx2: Marvell OCTEON TX2 +stingray: Broadcom Stingray +thunderx2: Marvell ThunderX2 T99 +thunderxt88: Marvell ThunderX T88 End of SoCs list ''' # The string above is included in the documentation, keep it in sync with the # SoCs list below. socs = { 'generic': soc_generic, + 'generic_aarch32': soc_generic_aarch32, 'armada': soc_armada, 'bluefield': soc_bluefield, 'centriq2400': soc_centriq2400, @@ -372,14 +391,28 @@ 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 + soc = meson.get_cross_property('platform', '') + if soc == '' + error('Arm SoC must be specified in the cross file.') + endif + soc_config = socs.get(soc, {'not_supported': true}) + 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 + # armv8 build + update_flags = true soc = get_option('platform') soc_config = {} if not meson.is_cross_build() @@ -415,8 +448,9 @@ else endif soc_config = socs.get(soc, {'not_supported': true}) endif +endif - soc_flags = [] +if update_flags if soc_config.has_key('not_supported') error('SoC @0@ not supported.'.format(soc)) elif soc_config != {} From patchwork Wed Jul 7 13:25: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: 95510 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 D0E35A0C4A; Wed, 7 Jul 2021 15:26:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C0004152F; Wed, 7 Jul 2021 15:26:04 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 6BE9641534 for ; Wed, 7 Jul 2021 15:26:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 3CCB1E7575; Wed, 7 Jul 2021 15:25:59 +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 iLNf9Lzxkw6O; Wed, 7 Jul 2021 15:25:57 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 0773CD57BC; Wed, 7 Jul 2021 15:25:49 +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, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, jerinj@marvell.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Wed, 7 Jul 2021 15:25:42 +0200 Message-Id: <1625664343-26498-7-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> References: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v18 6/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_armv8_linux_gcc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 config/arm/arm32_armv8_linux_gcc diff --git a/config/arm/arm32_armv8_linux_gcc b/config/arm/arm32_armv8_linux_gcc new file mode 100644 index 0000000000..89f8a12881 --- /dev/null +++ b/config/arm/arm32_armv8_linux_gcc @@ -0,0 +1,16 @@ +[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] +platform = 'generic_aarch32' From patchwork Wed Jul 7 13:25:43 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: 95509 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 A565FA0C4A; Wed, 7 Jul 2021 15:26:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9F7641538; Wed, 7 Jul 2021 15:26:01 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id D0CB841533 for ; Wed, 7 Jul 2021 15:25:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 99059E7572; Wed, 7 Jul 2021 15:25:58 +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 CZKAgprEWUsy; Wed, 7 Jul 2021 15:25:57 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id D4104E756D; Wed, 7 Jul 2021 15:25:50 +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, ajit.khaparde@broadcom.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, jerinj@marvell.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Phil Yang Date: Wed, 7 Jul 2021 15:25:43 +0200 Message-Id: <1625664343-26498-8-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> References: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> <1625664343-26498-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v18 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 | 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 2fa9702c1b..0896e98d66 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_armv8_linux_gcc + ninja -C aarch32-build LLVM/Clang toolchain --------------------