From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B049A09F0; Wed, 16 Dec 2020 22:37:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB46EC9DE; Wed, 16 Dec 2020 22:37:39 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 282BDC9C2 for ; Wed, 16 Dec 2020 22:37:37 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0BGLLZSd027459; Wed, 16 Dec 2020 13:37:36 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=JbhhEMvNGUsFhVGmajBJAJXy/CWQEXXH+GE0XStIi5o=; b=GPQrt3QsWB+g+N4iVFCcrOQnZfROSlFTHYY8FH8kSWfpvU1UYZ8wa7eZt1cDPvqEVeSb i1dJAqkAa3eaX+GNBgPRhzplnqQU21YAoj6Tvi+NLyyNDGBXpGhakWr0fDDCIEbD/7AR ZSdsh29yGvG7Wd6B81jahBmNblY+4hcSE2QC8dRawZteTo3qkfC1uZ4K8e3djca0+OMD 4vnmmseku/JwzE1t9/h9/1JlotpqG+6LezyHkzmo4C5PP9VhQLlRB9YJn4RdM2SDK1SJ DG9Kgl0OPN5KOIZp0ZfgIyKTaZROy+7OxGvPxXIrTb4IBeomFgBXYMxneRJy9xWUucMo vg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 35cv3t5suu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 16 Dec 2020 13:37:36 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Dec 2020 13:37:35 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Dec 2020 13:37:34 -0800 Received: from pt-lxl0023.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 16 Dec 2020 13:37:33 -0800 From: To: CC: , Liron Himi Date: Wed, 16 Dec 2020 23:36:52 +0200 Message-ID: <20201216213652.5760-1-lironh@marvell.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201215222319.13816-1-lironh@marvell.com> References: <20201215222319.13816-1-lironh@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-16_09:2020-12-15, 2020-12-16 signatures=0 Subject: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers 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: Liron Himi With pkg-config support available within musdk library (from musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir' can be removed. PKG_CONFIG_PATH environment variable should be set appropriately to use the musdk library. docs are updated with new musdk version and meson instructions. Signed-off-by: Liron Himi Reviewed-by: Liron Himi --- v3: * fix sphinx warnings * remove mvneta_ethdev.h v2: * include updated docs in this patch * add musdk version in commit message --- doc/guides/nics/mvneta.rst | 16 ++++++++++------ doc/guides/nics/mvpp2.rst | 18 +++++++++++------- drivers/common/mvep/meson.build | 14 +++++--------- drivers/crypto/mvsam/meson.build | 15 +++++---------- drivers/net/mvneta/meson.build | 19 +++++-------------- drivers/net/mvpp2/meson.build | 15 +++++---------- meson_options.txt | 2 -- 7 files changed, 41 insertions(+), 58 deletions(-) diff --git a/doc/guides/nics/mvneta.rst b/doc/guides/nics/mvneta.rst index e8abde42d..3124cc944 100644 --- a/doc/guides/nics/mvneta.rst +++ b/doc/guides/nics/mvneta.rst @@ -56,7 +56,7 @@ Prerequisites .. code-block:: console - git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-armada-18.09 + git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2 MUSDK is a light-weight library that provides direct access to Marvell's NETA. Alternatively prebuilt MUSDK library can be @@ -94,8 +94,8 @@ be passed as part of EAL arguments. -c 3 -- -i --p 3 -a -Building DPDK -------------- +Building MUSDK +-------------- Driver needs precompiled MUSDK library during compilation. @@ -109,12 +109,16 @@ Driver needs precompiled MUSDK library during compilation. MUSDK will be installed to `usr/local` under current directory. For the detailed build instructions please consult ``doc/musdk_get_started.txt``. -The path to the MUSDK installation directory needs to set in meson, shown in the -following command: +Building DPDK +------------- + +Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable. .. code-block:: console - meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build + export PKG_CONFIG_PATH=$/lib/pkgconfig/:$PKG_CONFIG_PATH + meson build --cross-file config/arm/arm64_armada_linux_gcc + ninja -C build Usage Example diff --git a/doc/guides/nics/mvpp2.rst b/doc/guides/nics/mvpp2.rst index 6fbce8358..f290d36a0 100644 --- a/doc/guides/nics/mvpp2.rst +++ b/doc/guides/nics/mvpp2.rst @@ -91,7 +91,7 @@ Prerequisites .. code-block:: console - git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-armada-18.09 + git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2 MUSDK is a light-weight library that provides direct access to Marvell's PPv2 (Packet Processor v2). Alternatively prebuilt MUSDK library can be @@ -108,8 +108,8 @@ Prerequisites DPDK environment. -Building DPDK -------------- +Building MUSDK +-------------- Driver needs precompiled MUSDK library during compilation. @@ -123,14 +123,18 @@ Driver needs precompiled MUSDK library during compilation. MUSDK will be installed to `usr/local` under current directory. For the detailed build instructions please consult ``doc/musdk_get_started.txt``. -The path to the MUSDK installation directory needs to set in meson, shown in the -command below. -For additional instructions regarding DPDK cross compilation please refer to :doc:`Cross compile DPDK for ARM64 <../linux_gsg/cross_build_dpdk_for_arm64>`. +Building DPDK +------------- + +Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable. .. code-block:: console - meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build + export PKG_CONFIG_PATH=$/lib/pkgconfig/:$PKG_CONFIG_PATH + + meson build --cross-file config/arm/arm64_armada_linux_gcc + ninja -C build Usage Example diff --git a/drivers/common/mvep/meson.build b/drivers/common/mvep/meson.build index 8df4bc6e0..863a20ab9 100644 --- a/drivers/common/mvep/meson.build +++ b/drivers/common/mvep/meson.build @@ -3,18 +3,14 @@ # Copyright(c) 2018 Semihalf. # All rights reserved. # -path = get_option('lib_musdk_dir') -lib_dir = path + '/lib' -inc_dir = path + '/include' -lib = cc.find_library('libmusdk', dirs: [lib_dir], required: false) -if not lib.found() +dep = dependency('libmusdk', required: false) +if not dep.found() build = false reason = 'missing dependency, "libmusdk"' -else - ext_deps += lib - includes += include_directories(inc_dir) - cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC'] + subdir_done() endif +ext_deps += dep + sources = files('mvep_common.c') diff --git a/drivers/crypto/mvsam/meson.build b/drivers/crypto/mvsam/meson.build index 6d97dc8a2..384eacff0 100644 --- a/drivers/crypto/mvsam/meson.build +++ b/drivers/crypto/mvsam/meson.build @@ -3,20 +3,15 @@ # Copyright(c) 2018 Semihalf. # All rights reserved. -path = get_option('lib_musdk_dir') -lib_dir = path + '/lib' -inc_dir = path + '/include' - -lib = cc.find_library('libmusdk', dirs: [lib_dir], required: false) -if not lib.found() +dep = dependency('libmusdk', required: false) +if not dep.found() build = false reason = 'missing dependency, "libmusdk"' -else - ext_deps += lib - includes += include_directories(inc_dir) - cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC'] + subdir_done() endif +ext_deps += dep + sources = files('rte_mrvl_pmd.c', 'rte_mrvl_pmd_ops.c') deps += ['bus_vdev', 'common_mvep'] diff --git a/drivers/net/mvneta/meson.build b/drivers/net/mvneta/meson.build index 8d7202788..c887ddc10 100644 --- a/drivers/net/mvneta/meson.build +++ b/drivers/net/mvneta/meson.build @@ -3,24 +3,15 @@ # Copyright(c) 2018 Semihalf. # All rights reserved. -path = get_option('lib_musdk_dir') -lib_dir = path + '/lib' -inc_dir = path + '/include' - -lib = cc.find_library('libmusdk', dirs : [lib_dir], required: false) -if not lib.found() +dep = dependency('libmusdk', required: false) +if not dep.found() build = false reason = 'missing dependency, "libmusdk"' -else - ext_deps += lib - includes += include_directories(inc_dir) - cflags += [ - '-DMVCONF_TYPES_PUBLIC', - '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC', - '-DMVCONF_DMA_PHYS_ADDR_T_SIZE=64' - ] + subdir_done() endif +ext_deps += dep + sources = files( 'mvneta_ethdev.c', 'mvneta_rxtx.c' diff --git a/drivers/net/mvpp2/meson.build b/drivers/net/mvpp2/meson.build index e06eddaac..3015a5559 100644 --- a/drivers/net/mvpp2/meson.build +++ b/drivers/net/mvpp2/meson.build @@ -3,20 +3,15 @@ # Copyright(c) 2018 Semihalf. # All rights reserved. -path = get_option('lib_musdk_dir') -lib_dir = path + '/lib' -inc_dir = path + '/include' - -lib = cc.find_library('libmusdk', dirs : [lib_dir], required: false) -if not lib.found() +dep = dependency('libmusdk', required: false) +if not dep.found() build = false reason = 'missing dependency, "libmusdk"' -else - ext_deps += lib - includes += include_directories(inc_dir) - cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC'] + subdir_done() endif +ext_deps += dep + sources = files( 'mrvl_ethdev.c', 'mrvl_flow.c', diff --git a/meson_options.txt b/meson_options.txt index 9bf18ab6b..63245b95d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -20,8 +20,6 @@ option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers') option('kernel_dir', type: 'string', value: '', description: 'Path to the kernel for building kernel modules. Headers must be in $kernel_dir/build. Modules will be installed in $DEST_DIR/$kernel_dir/extra/dpdk.') -option('lib_musdk_dir', type: 'string', value: '', - description: 'path to the MUSDK library installation directory') option('machine', type: 'string', value: 'native', description: 'set the target machine type') option('max_ethports', type: 'integer', value: 32, -- 2.28.0