From patchwork Thu Sep 28 10:22:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 29238 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 0C8A42C36; Thu, 28 Sep 2017 12:23:29 +0200 (CEST) Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id D5C177D4E for ; Thu, 28 Sep 2017 12:23:25 +0200 (CEST) Received: by mail-wr0-f174.google.com with SMTP id l39so1759894wrl.12 for ; Thu, 28 Sep 2017 03:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XX5MgMgRHKEYJzAfeH0c2pMOBrxSUzO80FaCEjYE82g=; b=yttfqQStnjOdglhoCIILWiKHABeyscc0+rZ0H9W5wWO9DHHsSuZPlwq8oXaVTi1vKL W/nmJX7kMjI84laTwwSaJG9d8xCbUuRWM68XuM8Fo0K/BeDffvMZi3oPJtezHLGm1XNt ZVKxqz9l45jpgTrI2ar/UMtpwDptEKoAOdWep/+hmugB/17BOE0lVc7Q1Zo2WOwFWfWv z7MGG4oeANPMgxIEUBVprv7E+SDkW9H4c0PS6Vu2bER7Hlo54Po35pXij3remN3a+sIG 2ONqBY8ho++LsuQIdhfnvEr41CdFVDlffJgoUZWs5o2Knpdz5fm6qCRoZN3GMkp6vz2s pP7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XX5MgMgRHKEYJzAfeH0c2pMOBrxSUzO80FaCEjYE82g=; b=nlu3Bv6GVh6TgdozV8C9G/bQBD/K6SWHtnqmpn3dE2LIUj0lzNzB4b8AeY145oiUN5 If5VoqUSA043FeVW8g38bhbyKQLrBuEmQGZmBEUL3pdrgDpueljT0uR08nDJq0rJ4wTF xc0c3pEVQG0/DVWLMT8s+/TtlyoEUpippInZh5QjABLUDY5uxXqweZ776/2HOhyOSzcG 97TLGMv7J0NUkGnsCcencfwCd0IjTApxLAb4wf8z1RzH6xVPm1nMuFIsPcekBGYpwVJa zSL71zQPneIjdLni/RJLjzww1SkUzTeI4p0IDdNJgvtilCzTWUF/6fX2eclTIIYjqptk QlCA== X-Gm-Message-State: AHPjjUirwjenEGcbjzOsgYFSBAUnopnpMRw9Gq+SFqPsr9RWO8SPZIGa lVGQMN6vTvVzWrA/scfHwVYVnV8Yo84= X-Google-Smtp-Source: AOwi7QDc4JbEJTZQYqABc0j4yv9Y5DkGB2cL01s3fcajQIcx9LX6tyP2SEiVBWKv4dzqx/4rVsL3Dg== X-Received: by 10.46.66.197 with SMTP id h66mr1941152ljf.108.1506594204824; Thu, 28 Sep 2017 03:23:24 -0700 (PDT) Received: from tdu.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id z69sm160307lfd.78.2017.09.28.03.23.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Sep 2017 03:23:23 -0700 (PDT) From: Tomasz Duszynski To: dev@dpdk.org Cc: mw@semihalf.com, dima@marvell.com, nsamsono@marvell.com, Jianbo.liu@linaro.org, Tomasz Duszynski , Jacek Siuda Date: Thu, 28 Sep 2017 12:22:37 +0200 Message-Id: <1506594158-15721-4-git-send-email-tdu@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506594158-15721-1-git-send-email-tdu@semihalf.com> References: <1506418805-12117-1-git-send-email-tdu@semihalf.com> <1506594158-15721-1-git-send-email-tdu@semihalf.com> Subject: [dpdk-dev] [PATCH v2 3/4] doc: add mrvl net pmd documentation 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 documentation for the MRVL NET PMD driver. Signed-off-by: Jacek Siuda Signed-off-by: Tomasz Duszynski --- doc/guides/nics/features/mrvl.ini | 24 ++++++ doc/guides/nics/index.rst | 1 + doc/guides/nics/mrvl.rst | 151 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 doc/guides/nics/features/mrvl.ini create mode 100644 doc/guides/nics/mrvl.rst diff --git a/doc/guides/nics/features/mrvl.ini b/doc/guides/nics/features/mrvl.ini new file mode 100644 index 0000000..781d6dc --- /dev/null +++ b/doc/guides/nics/features/mrvl.ini @@ -0,0 +1,24 @@ +; +; Supported features of the 'mrvl' network poll mode driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Speed capabilities = Y +Link status = Y +MTU update = Y +Jumbo frame = Y +Promiscuous mode = Y +Allmulticast mode = Y +Unicast MAC filter = Y +Multicast MAC filter = Y +RSS hash = Y +VLAN filter = Y +CRC offload = Y +L3 checksum offload = Y +L4 checksum offload = Y +Packet type parsing = Y +Basic stats = Y +Stats per queue = Y +ARMv8 = Y +Usage doc = Y diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst index 36f4f3f..7192f63 100644 --- a/doc/guides/nics/index.rst +++ b/doc/guides/nics/index.rst @@ -55,6 +55,7 @@ Network Interface Controller Drivers liquidio mlx4 mlx5 + mrvl nfp qede sfc_efx diff --git a/doc/guides/nics/mrvl.rst b/doc/guides/nics/mrvl.rst new file mode 100644 index 0000000..241d89b --- /dev/null +++ b/doc/guides/nics/mrvl.rst @@ -0,0 +1,151 @@ +.. BSD LICENSE + Copyright(c) 2017 Semihalf. All rights reserved. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of Semihalf nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +MRVL Poll Mode Driver +====================== + +The MRVL PMD (librte_pmd_mrvl) provides poll mode driver support +for the Marvell PPv2 (Packet Processor v2) 1/10 Gbps adapter. + +.. Note:: + + Due to external dependencies, this driver is disabled by default. It must + be enabled manually by setting relevant configuration option manually. + Please refer to `Config File Options`_ section for further details. + + +Features +-------- + +Features of the MRVL PMD are: + +- Speed capabilities +- Link status +- Queue start/stop +- MTU update +- Jumbo frame +- Promiscuous mode +- Allmulticast mode +- Unicast MAC filter +- Multicast MAC filter +- RSS hash +- VLAN filter +- CRC offload +- L3 checksum offload +- L4 checksum offload +- Packet type parsing +- Basic stats +- Stats per queue + + +Limitations +----------- + +- Number of lcores is limited to 9 by MUSDK internal design. If more lcores + need to be allocated, locking will have to be considered. Number of available + lcores can be changed via ``MRVL_MUSDK_HIFS_RESERVED`` define in + ``mrvl_ethdev.c`` source file. + +- Flushing vlans added for filtering is not possible due to MUSDK missing + functionality. Current workaround is to reset board so that PPv2 has a + chance to start in a sane state. + + +Prerequisites +------------- + +- MUSDK (Marvell User-Space SDK) sources available + `here `_. + + MUSDK is a light-weight library that provides direct access to Marvell's + PPv2 (Packet Processor v2). Alternatively prebuilt MUSDK library can be + requested from `Marvell Extranet `_. Once + approval has been granted, library can be found by typing ``musdk`` in + search box. + +- DPDK environment + + Follow the DPDK :ref:`Getting Started Guide for Linux ` to setup + DPDK environment. + + +Config File Options +------------------- + +The following options can be modified in the ``config`` file. + +- ``CONFIG_RTE_LIBRTE_MRVL_PMD`` (default ``n``) + + Toggle compilation of the librte_pmd_mrvl driver. + +- ``CONFIG_RTE_LIBRTE_MRVL_DEBUG`` (default ``n``) + + Toggle display of debugging messages. + +- ``CONFIG_RTE_MRVL_MUSDK_DMA_MEMSIZE`` (default ``41943040``) + + Size in bytes of the contiguous memory region that MUSDK will allocate + for run-time DMA-able data buffers. + + +Building DPDK +------------- + +Driver needs precompiled MUSDK library during compilation. Detailed build +process is described in library's documentation under ``doc`` directory. + +Before the DPDK build process the environmental variable ``LIBMUSDK_PATH`` with +the path to the MUSDK installation directory needs to be exported. + +Usage Example +------------- + +MRVL PMD requires extra kernel modules to function properly: + +.. code-block:: console + + insmod musdk_uio.ko + insmod mv_pp_uio.ko + insmod mvpp2x_sysfs.ko + +Additionally interfaces used by DPDK application need to be put up: + +.. code-block:: console + + ip link set eth0 up + ip link set eth1 up + +In order to run testpmd example application following command can be used: + +.. code-block:: console + + ./testpmd --vdev=eth_mrvl,iface=eth0,iface=eth2 -c 7 -- \ + --burst=128 --txd=2048 --rxd=1024 --rxq=2 --txq=2 --nb-cores=2 \ + -i -a --disable-hw-vlan-strip --rss-udp