From patchwork Wed Sep 16 08:21:08 2020 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: 77871 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 48A54A04C7; Wed, 16 Sep 2020 10:21:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F5B01C1E9; Wed, 16 Sep 2020 10:21:19 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 697381C1CC for ; Wed, 16 Sep 2020 10:21:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 36432970D6; Wed, 16 Sep 2020 10:21:14 +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 D_TIQDfMTOh6; Wed, 16 Sep 2020 10:21:13 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 77FD5970C2; Wed, 16 Sep 2020 10:21:13 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Ruifeng Wang Date: Wed, 16 Sep 2020 10:21:08 +0200 Message-Id: <1600244472-29696-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> References: <1598614733-16220-1-git-send-email-juraj.linkes@pantheon.tech> <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v10 1/5] net/bnxt: add support for aarch32 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Expand vector PMD support to aarch32. Signed-off-by: Ruifeng Wang Acked-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxq.h | 2 +- drivers/net/bnxt/bnxt_rxr.h | 2 +- drivers/net/bnxt/bnxt_txr.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h index d5ce3b6d5..1c4027711 100644 --- a/drivers/net/bnxt/bnxt_rxq.h +++ b/drivers/net/bnxt/bnxt_rxq.h @@ -22,7 +22,7 @@ struct bnxt_rx_queue { uint16_t nb_rx_hold; /* num held free RX desc */ uint16_t rx_free_thresh; /* max free RX desc to hold */ uint16_t queue_id; /* RX queue index */ -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM) uint16_t rxrearm_nb; /* number of descs to reinit. */ uint16_t rxrearm_start; /* next desc index to reinit. */ #endif diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h index 2bf46cd91..e2fba1647 100644 --- a/drivers/net/bnxt/bnxt_rxr.h +++ b/drivers/net/bnxt/bnxt_rxr.h @@ -221,7 +221,7 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq); int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id); int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id); -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM) uint16_t bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts); int bnxt_rxq_vec_setup(struct bnxt_rx_queue *rxq); diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h index 7715c11b8..38e5ac9df 100644 --- a/drivers/net/bnxt/bnxt_txr.h +++ b/drivers/net/bnxt/bnxt_txr.h @@ -59,7 +59,7 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts); uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts); -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) +#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_ARM) uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts); #endif From patchwork Wed Sep 16 08:21:09 2020 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: 77872 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BAD40A04C7; Wed, 16 Sep 2020 10:21:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA4191C202; Wed, 16 Sep 2020 10:21:20 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 1BF881C1CC for ; Wed, 16 Sep 2020 10:21:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 90743970C2; Wed, 16 Sep 2020 10:21:16 +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 dEwotas4DBaC; Wed, 16 Sep 2020 10:21:15 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id DC356970CF; Wed, 16 Sep 2020 10:21:13 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Wed, 16 Sep 2020 10:21:09 +0200 Message-Id: <1600244472-29696-3-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> References: <1598614733-16220-1-git-send-email-juraj.linkes@pantheon.tech> <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v10 2/5] build: add aarch32 meson build flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 8728051d5..b29f27097 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -63,6 +63,11 @@ flags_armada = [ ['RTE_MAX_LCORE', 16]] flags_default_extra = [] +flags_aarch32_extra = [ + ['RTE_ARCH_ARM_NEON_MEMCPY', false], + ['RTE_ARCH_STRICT_ALIGN', true], + ['RTE_EAL_NUMA_AWARE_HUGEPAGES', false], + ['RTE_MAX_LCORE', 256]] flags_n1sdp_extra = [ ['RTE_MACHINE', '"n1sdp"'], ['RTE_MAX_NUMA_NODES', 1], @@ -90,6 +95,7 @@ flags_octeontx2_extra = [ machine_args_generic = [ ['default', ['-march=armv8-a+crc']], ['native', ['-march=native']], + ['aarch32', ['-march=armv8-a', '-mfpu=neon'], flags_aarch32_extra], ['0xd03', ['-mcpu=cortex-a53']], ['0xd04', ['-mcpu=cortex-a35']], ['0xd07', ['-mcpu=cortex-a57']], @@ -129,15 +135,23 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic] impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic] dpdk_conf.set('RTE_FORCE_INTRINSICS', 1) - +update_flags = false if not dpdk_conf.get('RTE_ARCH_64') dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64) dpdk_conf.set('RTE_ARCH_ARM', 1) dpdk_conf.set('RTE_ARCH_ARMv7', 1) # the minimum architecture supported, armv7-a, needs the following, # mk/machine/armv7a/rte.vars.mk sets it too - machine_args += '-mfpu=neon' + if meson.is_cross_build() + update_flags = true + impl_id = meson.get_cross_property('implementor_id', 'aarch32') + impl_pn = meson.get_cross_property('implementor_pn', 'default') + machine = get_variable('impl_' + impl_id) + else + machine_args += '-mfpu=neon' + endif else + update_flags = true dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128) dpdk_conf.set('RTE_ARCH_ARM64', 1) @@ -172,7 +186,9 @@ else impl_pn = meson.get_cross_property('implementor_pn', 'default') machine = get_variable('impl_' + impl_id) endif +endif +if update_flags == true # Apply Common Defaults. These settings may be overwritten by machine # settings later. foreach flag: flags_common_default From patchwork Wed Sep 16 08:21:10 2020 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: 77873 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B2D6A04C7; Wed, 16 Sep 2020 10:21:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A18D1C20A; Wed, 16 Sep 2020 10:21:22 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 896ED1C1CC for ; Wed, 16 Sep 2020 10:21:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 016CB970CF; Wed, 16 Sep 2020 10:21:16 +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 oviBDD0w4BKC; Wed, 16 Sep 2020 10:21:16 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 432BD970D2; Wed, 16 Sep 2020 10:21:14 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Wed, 16 Sep 2020 10:21:10 +0200 Message-Id: <1600244472-29696-4-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> References: <1598614733-16220-1-git-send-email-juraj.linkes@pantheon.tech> <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v10 3/5] build: add aarch32 to meson cross-compilation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 000000000..d3c4bce6c --- /dev/null +++ b/config/arm/arm32_armv8a_linux_gcc @@ -0,0 +1,17 @@ +[binaries] +c = 'arm-linux-gnueabihf-gcc' +cpp = 'arm-linux-gnueabihf-cpp' +ar = 'arm-linux-gnueabihf-gcc-ar' +strip = 'arm-linux-gnueabihf-strip' +pkgconfig = 'arm-linux-gnueabihf-pkg-config' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x41' +implementor_pn = 'aarch32' From patchwork Wed Sep 16 08:21:11 2020 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: 77874 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0BD9A04C7; Wed, 16 Sep 2020 10:21:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE1CA1C216; Wed, 16 Sep 2020 10:21:23 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 71E771C1DD for ; Wed, 16 Sep 2020 10:21:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id CD52A970D2; Wed, 16 Sep 2020 10:21: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 0FTDHfyN3nuL; Wed, 16 Sep 2020 10:21:16 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id B266E970D5; Wed, 16 Sep 2020 10:21:14 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Wed, 16 Sep 2020 10:21:11 +0200 Message-Id: <1600244472-29696-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> References: <1598614733-16220-1-git-send-email-juraj.linkes@pantheon.tech> <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v10 4/5] ci: add aarch64 -> aarch32 cross compiling jobs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 --- .ci/linux-build.sh | 7 ++++++- .travis.yml | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index d079801d7..cdb371565 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc" fi +if [ "$AARCH32" = "1" ]; then + # convert the arch specifier + OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc" +fi + if [ "$BUILD_DOCS" = "1" ]; then OPTS="$OPTS -Denable_docs=true" fi @@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized" meson build --werror $OPTS ninja -C build -if [ "$AARCH64" != "1" ]; then +if [ "$AARCH64" != "1" ] && [ "$AARCH32" != "1" ]; then devtools/test-null.sh fi diff --git a/.travis.yml b/.travis.yml index d6eeab371..850faaac1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages - *required_packages - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu] +_arm_32b_packages: &arm_32b_packages + - *required_packages + - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf] + _build_32b_packages: &build_32b_packages - *required_packages - [gcc-multilib] @@ -98,6 +102,21 @@ jobs: packages: - *required_packages - *doc_packages + # aarch64 cross-compiling aarch32 jobs + - env: DEF_LIB="shared" AARCH32=1 + arch: arm64 + compiler: gcc + addons: + apt: + packages: + - *arm_32b_packages + - env: DEF_LIB="static" AARCH32=1 + arch: arm64 + compiler: gcc + addons: + apt: + packages: + - *arm_32b_packages # aarch64 clang jobs - env: DEF_LIB="static" arch: arm64 From patchwork Wed Sep 16 08:21:12 2020 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: 77875 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 788DAA04C7; Wed, 16 Sep 2020 10:22:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 306DB1C21B; Wed, 16 Sep 2020 10:21:25 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id DC17D1C1E3 for ; Wed, 16 Sep 2020 10:21:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 46811970D5; Wed, 16 Sep 2020 10:21:18 +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 EaxthCE6x7jy; Wed, 16 Sep 2020 10:21:17 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 49FD5970D7; Wed, 16 Sep 2020 10:21:15 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Phil Yang Date: Wed, 16 Sep 2020 10:21:12 +0200 Message-Id: <1600244472-29696-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> References: <1598614733-16220-1-git-send-email-juraj.linkes@pantheon.tech> <1600244472-29696-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v10 5/5] doc: add aarch32 build guidance X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 --- .../linux_gsg/cross_build_dpdk_for_arm64.rst | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst index 8a1d0e88b..1f2ff751d 100644 --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst @@ -1,15 +1,16 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright(c) 2018 ARM Corporation. -Cross compile DPDK for ARM64 -============================ -This chapter describes how to cross compile DPDK for ARM64 from x86 build hosts. +Cross compile DPDK for aarch64 and aarch32 +========================================== +This chapter describes how to cross compile DPDK for aarch64 from x86 build hosts and compile +32-bit aarch32 DPDK from aarch64 build hosts. .. note:: - Whilst it is recommended to natively build DPDK on ARM64 (just - like with x86), it is also possible to cross-build DPDK for ARM64. An - ARM64 cross compile GNU toolchain is used for this. + Whilst it is recommended to natively build DPDK on aarch64 (just + like with x86), it is also possible to cross-build DPDK for aarch64. + An aarch64 cross compile GNU toolchain is used for this. Obtain the cross tool chain --------------------------- @@ -88,14 +89,27 @@ To install it in Ubuntu:: sudo apt-get install pkg-config-aarch64-linux-gnu -To cross-compile DPDK on a desired target machine we can use the following -command:: +.. note:: + + Some aarch64 platforms support EL0 aarch32 mode, which means the 32-bit aarch32 applications + can run on aarch64. The armhf architecture toolchain ``gcc-arm-linux-gnueabihf`` is required + for aarch32 on aarch64. To install it in Ubuntu:: + + sudo dpkg --add-architecture armhf + sudo apt-get update + sudo apt-get install -y gcc-arm-linux-gnueabihf libc6:armhf binutils + +To cross-compile DPDK on a desired target machine use the following command:: meson cross-build --cross-file ninja -C cross-build -For example if the target machine is arm64 we can use the following -command:: +For example if the target machine is aarch64 use the following command:: meson arm64-build --cross-file config/arm/arm64_armv8_linux_gcc ninja -C arm64-build + +If the target machine is aarch32 use the following command:: + + meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc + ninja -C arm32-build