From patchwork Thu Apr 18 01:47:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52896 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD5711B8FA; Thu, 18 Apr 2019 03:48:08 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 552341B8C1 for ; Thu, 18 Apr 2019 03:48:04 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 04:47:58 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x3I1ltpM024449; Thu, 18 Apr 2019 04:47:56 +0300 From: Yongseok Koh To: bruce.richardson@intel.com, jerinj@marvell.com, pbhagavatula@marvell.com, shahafs@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, gavin.hu@arm.com, Honnappa.Nagarahalli@arm.com, stable@dpdk.org Date: Wed, 17 Apr 2019 18:47:23 -0700 Message-Id: <20190418014726.20600-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190412232451.30197-1-yskoh@mellanox.com> References: <20190412232451.30197-1-yskoh@mellanox.com> Subject: [dpdk-dev] [PATCH v2 1/4] meson: disable octeontx for buggy compilers on arm64 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" Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler error" for aarch64 Fixes: bd77f2d64c44 ("event/octeontx: build with meson") Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers") Fixes: f3af3e44a444 ("mk: disable OcteonTx for buggy compilers only on arm64") Cc: pbhagavatula@marvell.com Cc: jerinj@marvell.com Cc: stable@dpdk.org Signed-off-by: Yongseok Koh Acked-by: Jerin Jacob --- v2: * fix bug - enable octeontx unless the buggy compiler is used drivers/event/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/event/meson.build b/drivers/event/meson.build index 836ecbb74b..fb723f727b 100644 --- a/drivers/event/meson.build +++ b/drivers/event/meson.build @@ -1,7 +1,11 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -drivers = ['dpaa', 'dpaa2', 'octeontx', 'opdl', 'skeleton', 'sw', 'dsw'] +drivers = ['dpaa', 'dpaa2', 'opdl', 'skeleton', 'sw', 'dsw'] +if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and + dpdk_conf.has('RTE_ARCH_ARM64')) + drivers += 'octeontx' +endif std_deps = ['eventdev', 'kvargs'] config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD' driver_name_fmt = 'rte_pmd_@0@_event' From patchwork Thu Apr 18 01:47:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52895 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 202E61B8C2; Thu, 18 Apr 2019 03:48:06 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 579941B8C2 for ; Thu, 18 Apr 2019 03:48:04 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 04:48:01 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x3I1ltpN024449; Thu, 18 Apr 2019 04:47:59 +0300 From: Yongseok Koh To: bruce.richardson@intel.com, jerinj@marvell.com, pbhagavatula@marvell.com, shahafs@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, gavin.hu@arm.com, Honnappa.Nagarahalli@arm.com Date: Wed, 17 Apr 2019 18:47:24 -0700 Message-Id: <20190418014726.20600-2-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418014726.20600-1-yskoh@mellanox.com> References: <20190412232451.30197-1-yskoh@mellanox.com> <20190418014726.20600-1-yskoh@mellanox.com> Subject: [dpdk-dev] [PATCH v2 2/4] meson: change default cache line size for armv8 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" Currently, the cache line size of armv8 CPUs having Implementor ID of 0x41 is 64 bytes. Signed-off-by: Yongseok Koh --- v2: * introduce flags_arm replacing flags_generic instead of using the extra flags config/arm/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 22a062bad9..1db4ad2ee7 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -32,6 +32,11 @@ flags_generic = [ ['RTE_MAX_LCORE', 256], ['RTE_USE_C11_MEM_MODEL', true], ['RTE_CACHE_LINE_SIZE', 128]] +flags_arm = [ + ['RTE_MACHINE', '"armv8a"'], + ['RTE_MAX_LCORE', 256], + ['RTE_USE_C11_MEM_MODEL', true], + ['RTE_CACHE_LINE_SIZE', 64]] flags_cavium = [ ['RTE_CACHE_LINE_SIZE', 128], ['RTE_MAX_NUMA_NODES', 2], @@ -88,7 +93,7 @@ machine_args_cavium = [ ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321) impl_generic = ['Generic armv8', flags_generic, machine_args_generic] -impl_0x41 = ['Arm', flags_generic, machine_args_generic] +impl_0x41 = ['Arm', flags_arm, machine_args_generic] impl_0x42 = ['Broadcom', flags_generic, machine_args_generic] impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium] impl_0x44 = ['DEC', flags_generic, machine_args_generic] From patchwork Thu Apr 18 01:47:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52897 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E0CD1B91E; Thu, 18 Apr 2019 03:48:11 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 2F77B1B910 for ; Thu, 18 Apr 2019 03:48:09 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 04:48:04 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x3I1ltpO024449; Thu, 18 Apr 2019 04:48:02 +0300 From: Yongseok Koh To: bruce.richardson@intel.com, jerinj@marvell.com, pbhagavatula@marvell.com, shahafs@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, gavin.hu@arm.com, Honnappa.Nagarahalli@arm.com, bluca@debian.org, stable@dpdk.org Date: Wed, 17 Apr 2019 18:47:25 -0700 Message-Id: <20190418014726.20600-3-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418014726.20600-1-yskoh@mellanox.com> References: <20190412232451.30197-1-yskoh@mellanox.com> <20190418014726.20600-1-yskoh@mellanox.com> Subject: [dpdk-dev] [PATCH v2 3/4] net/mlx: fix library search in meson build 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" If MLNX_OFED is installed, there's no .pc file installed for libraries and dependency() can't find libraries by pkg-config. By adding fallback of using cc.find_library(), libraries are properly located. Fixes: e30b4e566f47 ("build: improve dependency handling") Cc: bluca@debian.org Cc: stable@dpdk.org Signed-off-by: Yongseok Koh --- v2: * change variable names to minimize code change drivers/net/mlx4/meson.build | 15 +++++++++------ drivers/net/mlx5/meson.build | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build index de020701d1..9d04dd930d 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build @@ -13,14 +13,17 @@ if pmd_dlopen '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION), ] endif -libs = [ - dependency('libmnl', required:false), - dependency('libmlx4', required:false), - dependency('libibverbs', required:false), -] +libnames = [ 'libmnl', 'libmlx4', 'libibverbs' ] +libs = [] build = true -foreach lib:libs +foreach libname:libnames + lib = dependency(libname, required:false) if not lib.found() + lib = cc.find_library(libname, required:false) + endif + if lib.found() + libs += [ lib ] + else build = false endif endforeach diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index a4c684e1b5..ee8399af27 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -13,14 +13,17 @@ if pmd_dlopen '-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION), ] endif -libs = [ - dependency('libmnl', required:false), - dependency('libmlx5', required:false), - dependency('libibverbs', required:false), -] +libnames = [ 'libmnl', 'libmlx5', 'libibverbs' ] +libs = [] build = true -foreach lib:libs +foreach libname:libnames + lib = dependency(libname, required:false) if not lib.found() + lib = cc.find_library(libname, required:false) + endif + if lib.found() + libs += [ lib ] + else build = false endif endforeach From patchwork Thu Apr 18 01:47:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52898 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 72A241B924; Thu, 18 Apr 2019 03:48:13 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 539D61B8C1 for ; Thu, 18 Apr 2019 03:48:09 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 04:48:07 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x3I1ltpP024449; Thu, 18 Apr 2019 04:48:05 +0300 From: Yongseok Koh To: bruce.richardson@intel.com, jerinj@marvell.com, pbhagavatula@marvell.com, shahafs@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, gavin.hu@arm.com, Honnappa.Nagarahalli@arm.com Date: Wed, 17 Apr 2019 18:47:26 -0700 Message-Id: <20190418014726.20600-4-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418014726.20600-1-yskoh@mellanox.com> References: <20190412232451.30197-1-yskoh@mellanox.com> <20190418014726.20600-1-yskoh@mellanox.com> Subject: [dpdk-dev] [PATCH v2 4/4] meson: add Mellanox BlueField cross-compile config 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" Mellanox BlueField is armv8 CPU having cortex-a72. The implementor ID is 0x41 (arm) and the primary part number is 0xd08 (cortex-a72). Signed-off-by: Yongseok Koh Acked-by: Jerin Jacob --- config/arm/arm64_bluefield_linux_gcc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 config/arm/arm64_bluefield_linux_gcc diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc new file mode 100644 index 0000000000..304c4073d5 --- /dev/null +++ b/config/arm/arm64_bluefield_linux_gcc @@ -0,0 +1,16 @@ +[binaries] +c = 'aarch64-linux-gnu-gcc' +cpp = 'aarch64-linux-gnu-cpp' +ar = 'aarch64-linux-gnu-gcc-ar' +strip = 'aarch64-linux-gnu-strip' +pcap-config = '' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'armv8-a' +endian = 'little' + +[properties] +implementor_id = '0x41' +implementor_pn = '0xd08'