From patchwork Tue Aug 25 13:04:40 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: 75936 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 7848EA04B1; Tue, 25 Aug 2020 15:04:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3188DFEB; Tue, 25 Aug 2020 15:04:49 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id B5656F72 for ; Tue, 25 Aug 2020 15:04:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 68BCC970B5; Tue, 25 Aug 2020 15:04:46 +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 uv9o0VBAQP7y; Tue, 25 Aug 2020 15:04:45 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id E4ECF970AD; Tue, 25 Aug 2020 15:04:44 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Ruifeng Wang Date: Tue, 25 Aug 2020 15:04:40 +0200 Message-Id: <1598360684-8975-2-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v8 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 Tue Aug 25 13:04:41 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: 75938 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 80549A04B1; Tue, 25 Aug 2020 15:05:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F4861BE88; Tue, 25 Aug 2020 15:04:53 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id E1DC7F72 for ; Tue, 25 Aug 2020 15:04:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 4188D970AE; Tue, 25 Aug 2020 15:04:48 +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 jme3ainOmGsk; Tue, 25 Aug 2020 15:04:47 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 71A94970AF; Tue, 25 Aug 2020 15:04:45 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech Date: Tue, 25 Aug 2020 15:04:41 +0200 Message-Id: <1598360684-8975-3-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v8 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 Tue Aug 25 13:04:42 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: 75939 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 8E208A04B1; Tue, 25 Aug 2020 15:05:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A5DBF1BFF8; Tue, 25 Aug 2020 15:04:54 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id EF979F90 for ; Tue, 25 Aug 2020 15:04:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 3101B970AD; Tue, 25 Aug 2020 15:04:48 +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 IzL4GaSOc1CE; Tue, 25 Aug 2020 15:04:47 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id DA07C970B1; Tue, 25 Aug 2020 15:04:45 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech Date: Tue, 25 Aug 2020 15:04:42 +0200 Message-Id: <1598360684-8975-4-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v8 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 Tue Aug 25 13:04:43 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: 75940 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 7212EA04B1; Tue, 25 Aug 2020 15:05:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BB9B1C0B4; Tue, 25 Aug 2020 15:04:56 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 002B65B30 for ; Tue, 25 Aug 2020 15:04:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 4F2BF970AF; Tue, 25 Aug 2020 15:04:50 +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 1m_PE1i_eGhK; Tue, 25 Aug 2020 15:04:48 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 2BCBF970B2; Tue, 25 Aug 2020 15:04:46 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech Date: Tue, 25 Aug 2020 15:04:43 +0200 Message-Id: <1598360684-8975-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v8 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 Tue Aug 25 13:04:44 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: 75941 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 D1BB4A04B1; Tue, 25 Aug 2020 15:05:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB88B1C0CF; Tue, 25 Aug 2020 15:04:58 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by dpdk.org (Postfix) with ESMTP id 132D91BECC for ; Tue, 25 Aug 2020 15:04:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 8A210970B1; Tue, 25 Aug 2020 15:04:53 +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 cgMW5pBvvv6P; Tue, 25 Aug 2020 15:04:48 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 9B583970B6; Tue, 25 Aug 2020 15:04:46 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, juraj.linkes@pantheon.tech, Phil Yang Date: Tue, 25 Aug 2020 15:04:44 +0200 Message-Id: <1598360684-8975-6-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> References: <1597401092-13713-1-git-send-email-juraj.linkes@pantheon.tech> <1598360684-8975-1-git-send-email-juraj.linkes@pantheon.tech> Subject: [dpdk-dev] [PATCH v8 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.