From patchwork Thu Apr 18 11:49:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52925 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 226961B9BC; Thu, 18 Apr 2019 13:49:22 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 625631B9BA for ; Thu, 18 Apr 2019 13:49:19 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 14:49:12 +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 x3IBn6jC003469; Thu, 18 Apr 2019 14:49:07 +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: Thu, 18 Apr 2019 04:49:00 -0700 Message-Id: <20190418114903.42231-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 v3 1/4] drivers/event: 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 --- v3: * fix prefix of the title 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 11:49:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52924 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 DA6821B9AE; Thu, 18 Apr 2019 13:49:14 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 743474CA6 for ; Thu, 18 Apr 2019 13:49:13 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 14:49:12 +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 x3IBn6jD003469; Thu, 18 Apr 2019 14:49:10 +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: Thu, 18 Apr 2019 04:49:01 -0700 Message-Id: <20190418114903.42231-2-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418114903.42231-1-yskoh@mellanox.com> References: <20190412232451.30197-1-yskoh@mellanox.com> <20190418114903.42231-1-yskoh@mellanox.com> Subject: [dpdk-dev] [PATCH v3 2/4] meson: change default config 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" Current default cache line size for armv8 CPUs having Implementor ID of 0x41 is 128 bytes, changing it to 64 bytes. Also, the max number of lcores is changed to 16 from 256. Signed-off-by: Yongseok Koh Reviewed-by: Honnappa Nagarahalli --- v3: * decrease RTE_MAX_LCORE to 16 from 256 * change title and commit log 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..a5cce51707 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', 16], + ['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 11:49:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52926 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 BF7491B9C1; Thu, 18 Apr 2019 13:49:24 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 7F9C61B9BC for ; Thu, 18 Apr 2019 13:49:19 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 14:49:16 +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 x3IBn6jE003469; Thu, 18 Apr 2019 14:49:13 +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: Thu, 18 Apr 2019 04:49:02 -0700 Message-Id: <20190418114903.42231-3-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418114903.42231-1-yskoh@mellanox.com> References: <20190412232451.30197-1-yskoh@mellanox.com> <20190418114903.42231-1-yskoh@mellanox.com> Subject: [dpdk-dev] [PATCH v3 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 Acked-by: Luca Boccassi --- v3: * use lib name without 'lib' prefix for cc.find_library() 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..2540489bb7 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 = [ 'mnl', 'mlx4', 'ibverbs' ] +libs = [] build = true -foreach lib:libs +foreach libname:libnames + lib = dependency('lib' + 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..1a65c3a989 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 = [ 'mnl', 'mlx5', 'ibverbs' ] +libs = [] build = true -foreach lib:libs +foreach libname:libnames + lib = dependency('lib' + 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 11:49:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongseok Koh X-Patchwork-Id: 52927 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 5B3CB1B9CF; Thu, 18 Apr 2019 13:49:28 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 6B8831B9BE for ; Thu, 18 Apr 2019 13:49:22 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Apr 2019 14:49:18 +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 x3IBn6jF003469; Thu, 18 Apr 2019 14:49:16 +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: Thu, 18 Apr 2019 04:49:03 -0700 Message-Id: <20190418114903.42231-4-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418114903.42231-1-yskoh@mellanox.com> References: <20190412232451.30197-1-yskoh@mellanox.com> <20190418114903.42231-1-yskoh@mellanox.com> Subject: [dpdk-dev] [PATCH v3 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'