From patchwork Wed Dec 2 13:05:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liron Himi X-Patchwork-Id: 84718 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 5648CA04DB; Wed, 2 Dec 2020 14:06:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C779AC9C8; Wed, 2 Dec 2020 14:05:46 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 775F8C9C2 for ; Wed, 2 Dec 2020 14:05:45 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0B2D0MN3005257; Wed, 2 Dec 2020 05:05:43 -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=KrebopIRuvSiAj/sSqM3gs4/Y93u4djgjWm7L6b1rcw=; b=WPAGPFuehavjUJoQwNtm51QxhCEk6gsVFgyNkynh1CnKoqch0UAoWckalln/LdRxakN3 0CDZ5m5hF69Rut6eEyN0l8QpIdNnh4St+aWiIskd3xw2LfIUkcpRnseDIkixW4cjmuSl dcagE0WMEoRzFio6ix5igh5Xu10Q+Whcuz6kpRRbtdaytA6icsSR2OBCn8QEqeOeJJsh nxF+Sy2Jn51xHCa26dbY2mycDsSqmWKvxjEBuoyPcCJ6E86QMEymMnhmZOzaUVxjbh2v qqo7UR6nx9GLlHEQsf+P141E/7SRNCNBT+f9UsgUpttC9O+jKlONYqGUs91bQhMxsZ+/ bA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 355w50a2xh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 05:05:43 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Dec 2020 05:05:41 -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, 2 Dec 2020 05:05:40 -0800 From: To: CC: , Liron Himi Date: Wed, 2 Dec 2020 15:05:28 +0200 Message-ID: <20201202130529.7332-2-lironh@marvell.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201202130529.7332-1-lironh@marvell.com> References: <20201202130529.7332-1-lironh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-12-02_06:2020-11-30, 2020-12-02 signatures=0 Subject: [dpdk-dev] [PATCH v1 1/2] 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, meson option 'lib_musdk_dir' can be removed. PKG_CONFIG_PATH environment variable should be set appropriately to use the musdk library. Signed-off-by: Liron Himi Reviewed-by: Liron Himi --- drivers/common/mvep/meson.build | 14 +++++--------- drivers/crypto/mvsam/meson.build | 15 +++++---------- drivers/net/mvneta/meson.build | 19 +++++-------------- drivers/net/mvneta/mvneta_ethdev.h | 1 + drivers/net/mvpp2/meson.build | 15 +++++---------- meson_options.txt | 2 -- 6 files changed, 21 insertions(+), 45 deletions(-) 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/mvneta/mvneta_ethdev.h b/drivers/net/mvneta/mvneta_ethdev.h index ef8067790..e090abc25 100644 --- a/drivers/net/mvneta/mvneta_ethdev.h +++ b/drivers/net/mvneta/mvneta_ethdev.h @@ -21,6 +21,7 @@ #undef container_of #endif +#include #include #include 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, From patchwork Wed Dec 2 13:05:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liron Himi X-Patchwork-Id: 84719 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 26780A04DB; Wed, 2 Dec 2020 14:06:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2922FC9D2; Wed, 2 Dec 2020 14:05:49 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9B4E3C9C6 for ; Wed, 2 Dec 2020 14:05:45 +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 0B2D54C7031077; Wed, 2 Dec 2020 05:05:43 -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=csFUc6rV8bOGzB+5iEtQsACWHzPENdJ2iEkHUjyJ8Fc=; b=U4RRJ9OgsWORPgsqvmNnGEQcSw5Hnyyk/AriGhBjuxFGXx7ytZUcj33l3dabCO4c6579 Q3K+PVOHCM0wwU6hdBiVZlxUiCUE/IzenSyJ1SRjNGmjkRttBlf/TBC8tFxbKJ77eoEN /RblYVtrIOxGep2vubssxWEe8wa8kJjjCyeEG0dr9mP0xLzCXtkBloz6JZabyjOc9xkf 3Y/idZ8bRkLG50Jn6okXyWv9vsnICT9s3Yuz8XwH5P/D6hzaiHoR4bE7YxaCWDAIA59L 7rVk2oNvjIQCjzFXEWLxLNSICHDeznj5JtEQh9wUdpRnCCfSeoPUYvnaMuPcA/JG6AmI Qg== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3568jf8ecm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 02 Dec 2020 05:05:43 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Dec 2020 05:05:42 -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, 2 Dec 2020 05:05:41 -0800 From: To: CC: , Liron Himi Date: Wed, 2 Dec 2020 15:05:29 +0200 Message-ID: <20201202130529.7332-3-lironh@marvell.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201202130529.7332-1-lironh@marvell.com> References: <20201202130529.7332-1-lironh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-12-02_06:2020-11-30, 2020-12-02 signatures=0 Subject: [dpdk-dev] [PATCH v1 2/2] doc: update armada docs 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 - update musdk requirement branch - add the use of PKG_CONFIG Signed-off-by: Liron Himi Reviewed-by: Liron Himi --- doc/guides/cryptodevs/mvsam.rst | 61 ++++++++++++++++++++++++++------- doc/guides/nics/mvneta.rst | 45 ++++++++++++------------ doc/guides/nics/mvpp2.rst | 43 +++++++---------------- 3 files changed, 83 insertions(+), 66 deletions(-) diff --git a/doc/guides/cryptodevs/mvsam.rst b/doc/guides/cryptodevs/mvsam.rst index 6188c1248..6ea6d31b6 100644 --- a/doc/guides/cryptodevs/mvsam.rst +++ b/doc/guides/cryptodevs/mvsam.rst @@ -1,6 +1,7 @@ .. SPDX-License-Identifier: BSD-3-Clause - Copyright(c) 2017 Marvell International Ltd. - Copyright(c) 2017 Semihalf. + Copyright(c) 2018 Marvell International Ltd. + Copyright(c) 2018 Semihalf. + All rights reserved. MVSAM Crypto Poll Mode Driver ============================= @@ -22,6 +23,12 @@ Features MVSAM CRYPTO PMD has support for: +* Symmetric crypto operations: encryption/description and authentication +* Symmetric chaining crypto operations +* HW Accelerated using EIP97/EIP197b/EIP197d +* Out-of-place Scatter-gather list Input, Linear Buffers Output +* Out-of-place Linear Buffers Input, Linear Buffers Output + Cipher algorithms: * ``RTE_CRYPTO_CIPHER_NULL`` @@ -61,6 +68,27 @@ Limitations * Hardware only supports scenarios where ICV (digest buffer) is placed just after the authenticated data. Other placement will result in error. +Prerequisites +------------- + +- Custom Linux Kernel sources + + .. code-block:: console + + git clone https://github.com/MarvellEmbeddedProcessors/linux-marvell.git -b linux-4.4.120-armada-18.09 + +- Out of tree `mvpp2x_sysfs` kernel module sources + + .. code-block:: console + + git clone https://github.com/MarvellEmbeddedProcessors/mvpp2x-marvell.git -b mvpp2x-armada-18.09 + +- MUSDK (Marvell User-Space SDK) sources + + .. code-block:: console + + git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2 + Installation ------------ @@ -74,23 +102,30 @@ extra option must be passed to the library configuration script: For instructions how to build required kernel modules please refer to `doc/musdk_get_started.txt`. -Initialization --------------- +Building DPDK +------------- + +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``. + +Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable: -After successfully building MVSAM CRYPTO PMD, the following modules need to be -loaded: +.. code-block:: console + + export PKG_CONFIG_PATH=$/lib/pkgconfig/:$PKG_CONFIG_PATH + +Build DPDK: .. code-block:: console - insmod musdk_cma.ko - insmod crypto_safexcel.ko rings=0,0 - insmod mv_sam_uio.ko + meson build --cross-file config/arm/arm64_armada_linux_gcc + ninja -C build + -The following parameters (all optional) are exported by the driver: -- ``max_nb_queue_pairs``: maximum number of queue pairs in the device (default: 8 - A8K, 4 - A7K/A3K). -- ``max_nb_sessions``: maximum number of sessions that can be created (default: 2048). -- ``socket_id``: socket on which to allocate the device resources on. +Usage Example +------------- l2fwd-crypto example application can be used to verify MVSAM CRYPTO PMD operation: diff --git a/doc/guides/nics/mvneta.rst b/doc/guides/nics/mvneta.rst index e8abde42d..404998e62 100644 --- a/doc/guides/nics/mvneta.rst +++ b/doc/guides/nics/mvneta.rst @@ -3,6 +3,8 @@ Copyright(c) 2018 Semihalf. All rights reserved. +.. _mvneta_poll_mode_driver: + MVNETA Poll Mode Driver ======================= @@ -25,6 +27,7 @@ Features of the MVNETA PMD are: - Speed capabilities - Jumbo frame - MTU update +- Jumbo frame - Promiscuous mode - Unicast MAC filter - Link status @@ -33,6 +36,8 @@ Features of the MVNETA PMD are: - L4 checksum offload - Packet type parsing - Basic stats +- Multicast MAC filter +- Scattered TX frames Limitations @@ -42,6 +47,11 @@ Limitations functionality. Current workaround is to reset board so that NETA has a chance to start in a sane state. +- MUSDK architecture does not support changing configuration in run time. + All nessesary configurations should be done before first dev_start(). + +- Running more than one DPDK-MUSDK application simultaneously is not supported. + Prerequisites ------------- @@ -56,7 +66,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 @@ -64,11 +74,8 @@ Prerequisites approval has been granted, library can be found by typing ``musdk`` in the search box. - MUSDK must be configured with the following features: - - .. code-block:: console - - --enable-pp2=no --enable-neta + To better understand the library, please consult documentation + available in the ``doc`` top level directory of the MUSDK sources. - DPDK environment @@ -98,36 +105,28 @@ Building DPDK ------------- 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``. -.. code-block:: console +Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable: - export CROSS_COMPILE=/bin/aarch64-linux-gnu- - ./bootstrap - ./configure --host=aarch64-linux-gnu --enable-pp2=no --enable-neta - make install +.. code-block:: console -MUSDK will be installed to `usr/local` under current directory. -For the detailed build instructions please consult ``doc/musdk_get_started.txt``. + export PKG_CONFIG_PATH=$/lib/pkgconfig/:$PKG_CONFIG_PATH -The path to the MUSDK installation directory needs to set in meson, shown in the -following command: +Build DPDK: .. code-block:: console - meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build + meson build --cross-file config/arm/arm64_armada_linux_gcc + ninja -C build Usage Example ------------- MVNETA PMD requires extra out of tree kernel modules to function properly. -`musdk_uio` and `mv_neta_uio` sources are part of the MUSDK. Please consult -``doc/musdk_get_started.txt`` for the detailed build instructions. - -.. code-block:: console - - insmod musdk_uio.ko - insmod mv_neta_uio.ko +Please consult ``doc/musdk_get_started.txt`` for the detailed build instructions. Additionally interfaces used by DPDK application need to be put up: diff --git a/doc/guides/nics/mvpp2.rst b/doc/guides/nics/mvpp2.rst index 6fbce8358..b151407ad 100644 --- a/doc/guides/nics/mvpp2.rst +++ b/doc/guides/nics/mvpp2.rst @@ -1,6 +1,7 @@ .. SPDX-License-Identifier: BSD-3-Clause - Copyright(c) 2017 Marvell International Ltd. - Copyright(c) 2017 Semihalf. + Copyright(c) 2018 Marvell International Ltd. + Copyright(c) 2018 Semihalf. + All rights reserved. .. _mvpp2_poll_mode_driver: @@ -91,7 +92,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 @@ -112,47 +113,29 @@ Building DPDK ------------- Driver needs precompiled MUSDK library during compilation. - -.. code-block:: console - - export CROSS_COMPILE=/bin/aarch64-linux-gnu- - ./bootstrap - ./configure --host=aarch64-linux-gnu - make install - 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. +Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable: + +.. code-block:: console + + export PKG_CONFIG_PATH=$/lib/pkgconfig/:$PKG_CONFIG_PATH -For additional instructions regarding DPDK cross compilation please refer to :doc:`Cross compile DPDK for ARM64 <../linux_gsg/cross_build_dpdk_for_arm64>`. +Build DPDK: .. code-block:: console - meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build + meson build --cross-file config/arm/arm64_armada_linux_gcc + ninja -C build Usage Example ------------- MVPP2 PMD requires extra out of tree kernel modules to function properly. -`musdk_cma` sources are part of the MUSDK. Please consult -``doc/musdk_get_started.txt`` for the detailed build instructions. -For `mvpp2x_sysfs` please consult ``Documentation/pp22_sysfs.txt`` for the -detailed build instructions. - -.. code-block:: console - - insmod musdk_cma.ko - insmod mvpp2x_sysfs.ko - -Additionally interfaces used by DPDK application need to be put up: - -.. code-block:: console +Please consult ``doc/musdk_get_started.txt`` for the detailed build instructions. - ip link set eth0 up - ip link set eth2 up In order to run testpmd example application following command can be used: