From patchwork Fri Aug 14 10:31:28 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: 75553 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 C44C1A04B0; Fri, 14 Aug 2020 12:31:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C21331C10A; Fri, 14 Aug 2020 12:31:47 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 3640A1C0D0 for ; Fri, 14 Aug 2020 12:31:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 1CD7A970A7; Fri, 14 Aug 2020 12:31:41 +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 BUsnI2290P1a; Fri, 14 Aug 2020 12:31:40 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 7AF08970A2; Fri, 14 Aug 2020 12:31:40 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Ruifeng Wang Date: Fri, 14 Aug 2020 12:31:28 +0200 Message-Id: <1597401092-13713-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597310476-11293-1-git-send-email-juraj.linkes@pantheon.tech> <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v7 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 Signed-off-by: Ruifeng Wang > Signed-off-by: Ruifeng Wang > --- drivers/net/bnxt/Makefile | 2 +- drivers/net/bnxt/bnxt_rxq.h | 2 +- drivers/net/bnxt/bnxt_rxr.h | 2 +- drivers/net/bnxt/bnxt_txr.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile index 0c5b74918..06a47dc49 100644 --- a/drivers/net/bnxt/Makefile +++ b/drivers/net/bnxt/Makefile @@ -43,7 +43,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += rte_pmd_bnxt.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_sse.c endif -ifeq ($(CONFIG_RTE_ARCH_ARM64), y) +ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),) SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxtx_vec_neon.c endif 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 Fri Aug 14 10:31:29 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: 75554 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 43A96A04B0; Fri, 14 Aug 2020 12:32:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02FD61C114; Fri, 14 Aug 2020 12:31:51 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 926BD1C0BC for ; Fri, 14 Aug 2020 12:31:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id DD4637D00D; Fri, 14 Aug 2020 12:31:43 +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 o1BpCCIRFbhM; Fri, 14 Aug 2020 12:31:42 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id DD01F970A3; Fri, 14 Aug 2020 12:31:40 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Fri, 14 Aug 2020 12:31:29 +0200 Message-Id: <1597401092-13713-3-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597310476-11293-1-git-send-email-juraj.linkes@pantheon.tech> <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v7 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š --- 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 Fri Aug 14 10:31:30 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: 75555 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 5DEF1A04B0; Fri, 14 Aug 2020 12:32:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33F161C11F; Fri, 14 Aug 2020 12:31:52 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id A41F41C0D0 for ; Fri, 14 Aug 2020 12:31:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id D27E17D00B; Fri, 14 Aug 2020 12:31:43 +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 PWtGsZtY2Pu5; Fri, 14 Aug 2020 12:31:42 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 3DB98970A4; Fri, 14 Aug 2020 12:31:41 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Fri, 14 Aug 2020 12:31:30 +0200 Message-Id: <1597401092-13713-4-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597310476-11293-1-git-send-email-juraj.linkes@pantheon.tech> <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v7 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š --- 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 Fri Aug 14 10:31:31 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: 75556 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 8FF1EA04B0; Fri, 14 Aug 2020 12:32:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2351A1C125; Fri, 14 Aug 2020 12:31:53 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 0843D1C0D8 for ; Fri, 14 Aug 2020 12:31:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 462BB970A3; Fri, 14 Aug 2020 12:31:45 +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 FoFTbLI5OzyM; Fri, 14 Aug 2020 12:31:44 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 803AD970A5; Fri, 14 Aug 2020 12:31:41 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Fri, 14 Aug 2020 12:31:31 +0200 Message-Id: <1597401092-13713-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597310476-11293-1-git-send-email-juraj.linkes@pantheon.tech> <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v7 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š --- .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..c042b065c 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 file build/app/dpdk-testpmd | sed 's/-/_/g' | grep -q "$(uname -m)"; 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 Fri Aug 14 10:31:32 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: 75557 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 B1849A04B0; Fri, 14 Aug 2020 12:32:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C6231C12C; Fri, 14 Aug 2020 12:31:54 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 2AEAE1C0DA for ; Fri, 14 Aug 2020 12:31:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 57622970A4; Fri, 14 Aug 2020 12:31:45 +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 vwfy_mS4HHNh; Fri, 14 Aug 2020 12:31:44 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id C17D5970A6; Fri, 14 Aug 2020 12:31:41 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org, Phil Yang Date: Fri, 14 Aug 2020 12:31:32 +0200 Message-Id: <1597401092-13713-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597310476-11293-1-git-send-email-juraj.linkes@pantheon.tech> <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v7 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 --- .../linux_gsg/cross_build_dpdk_for_arm64.rst | 30 ++++++++++++++----- 1 file changed, 23 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 c5875a6d5..07085e3ea 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,18 +89,33 @@ To install it in Ubuntu:: sudo apt-get install pkg-config-aarch64-linux-gnu +.. 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 gcc-arm-linux-gnueabihf libc6:armhf make binutils + To cross-compile DPDK on a desired target machine we can 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 +For example if the target machine is aarch64 we can 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 we can use the following command:: + + meson arm32-build --cross-file config/arm/arm32_armv8a_linux_gcc + ninja -C arm32-build + Configure and Cross Compile DPDK using Make ------------------------------------------- To configure a build, choose one of the target configurations, like arm64-dpaa-linux-gcc and arm64-thunderx-linux-gcc.