From patchwork Wed Mar 17 13:35:57 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: 89395 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 BCCAFA00C2; Wed, 17 Mar 2021 14:36:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91B5B140EC8; Wed, 17 Mar 2021 14:36:11 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 48E484067E; Wed, 17 Mar 2021 14:36:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 459D7C4827; Wed, 17 Mar 2021 14:36:05 +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 mBjzi5mEgr3t; Wed, 17 Mar 2021 14:36:04 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 357B2C4819; Wed, 17 Mar 2021 14:36:04 +0100 (CET) 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 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: Wed, 17 Mar 2021 14:35:57 +0100 Message-Id: <1615988163-17371-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> References: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v14 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 Wed Mar 17 13:35:58 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: 89396 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 C988EA00C2; Wed, 17 Mar 2021 14:36:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4163B140EFB; Wed, 17 Mar 2021 14:36:14 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id A0D2D140EBD; Wed, 17 Mar 2021 14:36:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 932E7C482B; Wed, 17 Mar 2021 14:36:08 +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 DJA_ZwrSaVn1; Wed, 17 Mar 2021 14:36:06 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id EF276C4826; Wed, 17 Mar 2021 14:36:04 +0100 (CET) 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 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: Wed, 17 Mar 2021 14:35:58 +0100 Message-Id: <1615988163-17371-3-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> References: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v14 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 Wed Mar 17 13:35:59 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: 89397 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 9D3ABA00C2; Wed, 17 Mar 2021 14:36:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACFFC140F05; Wed, 17 Mar 2021 14:36:15 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id DE659140EBD; Wed, 17 Mar 2021 14:36:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id DDA08C482F; Wed, 17 Mar 2021 14:36:08 +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 M-a9GWNeW1F4; Wed, 17 Mar 2021 14:36:08 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id DF501C4824; Wed, 17 Mar 2021 14:36:05 +0100 (CET) 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 Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, stable@dpdk.org Date: Wed, 17 Mar 2021 14:35:59 +0100 Message-Id: <1615988163-17371-4-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> References: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v14 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 Wed Mar 17 13:36:00 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: 89398 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 C6C3CA00C2; Wed, 17 Mar 2021 14:36:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDE6B140F0B; Wed, 17 Mar 2021 14:36:16 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 56D3A140EE1 for ; Wed, 17 Mar 2021 14:36:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 4F037C4824; Wed, 17 Mar 2021 14:36:11 +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 9cO5vICGaOs9; Wed, 17 Mar 2021 14:36:10 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 2BFEDC4816; Wed, 17 Mar 2021 14:36:07 +0100 (CET) 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 Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com Date: Wed, 17 Mar 2021 14:36:00 +0100 Message-Id: <1615988163-17371-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> References: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v14 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 Wed Mar 17 13:36:01 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: 89399 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 4E5BCA00C2; Wed, 17 Mar 2021 14:36:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41D62140F10; Wed, 17 Mar 2021 14:36:18 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id A032B140EE1 for ; Wed, 17 Mar 2021 14:36:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 9B0D3C4826; Wed, 17 Mar 2021 14:36:11 +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 XtdwLv-MZwbx; Wed, 17 Mar 2021 14:36:10 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id F2F18C482A; Wed, 17 Mar 2021 14:36:07 +0100 (CET) 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 Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com Date: Wed, 17 Mar 2021 14:36:01 +0100 Message-Id: <1615988163-17371-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> References: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v14 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 Wed Mar 17 13:36:02 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: 89400 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 94F94A00C2; Wed, 17 Mar 2021 14:36:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B52D140F1B; Wed, 17 Mar 2021 14:36:21 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id D1135140EFD for ; Wed, 17 Mar 2021 14:36:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 14E27C4816; Wed, 17 Mar 2021 14:36:13 +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 a0-ZLdjodtEA; Wed, 17 Mar 2021 14:36:12 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 8023BC4819; Wed, 17 Mar 2021 14:36:08 +0100 (CET) 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 Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com Date: Wed, 17 Mar 2021 14:36:02 +0100 Message-Id: <1615988163-17371-7-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> References: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v14 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 Wed Mar 17 13:36: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: 89401 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 BB27EA00C2; Wed, 17 Mar 2021 14:37:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCDD4140F21; Wed, 17 Mar 2021 14:36:22 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id A029C140EFF for ; Wed, 17 Mar 2021 14:36:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id BCE28C4819; Wed, 17 Mar 2021 14:36:13 +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 jsJMShDa21oq; Wed, 17 Mar 2021 14:36:12 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id BC633C4831; Wed, 17 Mar 2021 14:36:09 +0100 (CET) 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 Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, Phil Yang Date: Wed, 17 Mar 2021 14:36:03 +0100 Message-Id: <1615988163-17371-8-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> References: <1615279005-30278-1-git-send-email-juraj.linkes@pantheon.tech> <1615988163-17371-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v14 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 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:/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 +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