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 938D2A2EDB for ; Tue, 1 Oct 2019 13:17:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 622221BDFD; Tue, 1 Oct 2019 13:17:33 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 2DB584C93 for ; Tue, 1 Oct 2019 13:17:28 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0FC301A055E; Tue, 1 Oct 2019 13:17:28 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A7DDC1A053F; Tue, 1 Oct 2019 13:17:25 +0200 (CEST) Received: from GDB1.ap.freescale.net (GDB1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D7022402C1; Tue, 1 Oct 2019 19:17:21 +0800 (SGT) From: Gagandeep Singh To: dev@dpdk.org, ferruh.yigit@intel.com Cc: thomas@monjalon.net, Gagandeep Singh Date: Tue, 1 Oct 2019 16:31:58 +0530 Message-Id: <20191001110209.6047-4-g.singh@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001110209.6047-1-g.singh@nxp.com> References: <20190826130246.30485-1-g.singh@nxp.com> <20191001110209.6047-1-g.singh@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 03/14] doc: add guide for ppfe net PMD 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" This patch add documentation for ppfe network poll mode driver. PPFE is a hardware programmable packet forwarding engine to provide high performance ethernet interfaces. Signed-off-by: Gagandeep Singh Acked-by: Nipun Gupta Acked-by: Akhil Goyal --- MAINTAINERS | 1 + doc/guides/nics/features/ppfe.ini | 1 + doc/guides/nics/index.rst | 1 + doc/guides/nics/ppfe.rst | 173 ++++++++++++++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 doc/guides/nics/ppfe.rst diff --git a/MAINTAINERS b/MAINTAINERS index 655ccae83..83af78144 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -790,6 +790,7 @@ F: doc/guides/nics/features/enetc.ini NXP ppfe M: Gagandeep Singh M: Akhil Goyal +F: doc/guides/nics/ppfe.rst F: drivers/net/ppfe/ F: doc/guides/nics/features/ppfe.ini diff --git a/doc/guides/nics/features/ppfe.ini b/doc/guides/nics/features/ppfe.ini index 4bcac779c..cd5f836a3 100644 --- a/doc/guides/nics/features/ppfe.ini +++ b/doc/guides/nics/features/ppfe.ini @@ -6,3 +6,4 @@ [Features] Linux VFIO = Y ARMv8 = Y +Usage doc = Y diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst index d477001d9..e0c931a3e 100644 --- a/doc/guides/nics/index.rst +++ b/doc/guides/nics/index.rst @@ -48,6 +48,7 @@ Network Interface Controller Drivers nfp octeontx octeontx2 + ppfe qede sfc_efx softnic diff --git a/doc/guides/nics/ppfe.rst b/doc/guides/nics/ppfe.rst new file mode 100644 index 000000000..29b02957f --- /dev/null +++ b/doc/guides/nics/ppfe.rst @@ -0,0 +1,173 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright 2019 NXP + +PPFE Poll Mode Driver +====================== + +The PPFE NIC PMD (**librte_pmd_ppfe**) provides poll mode driver +support for the inbuilt NIC found in the **NXP LS1012** SoC. + +More information can be found at `NXP Official Website +`_. + +PPFE +----- + +This section provides an overview of the NXP PPFE +and how it is integrated into the DPDK. + +Contents summary + +- PPFE overview +- PPFE features +- Supported PPFE SoCs +- Prerequisites +- Driver compilation and testing +- Limitations + +PPFE Overview +~~~~~~~~~~~~~~ + +PPFE is a hardware programmable packet forwarding engine to provide +high performance Ethernet interfaces. The diagram below shows a +system level overview of PPFE: + +.. code-block:: console + + ====================================================+=============== + US +-----------------------------------------+ | Kernel Space + | | | + | PPFE Ethernet Driver | | + +-----------------------------------------+ | + ^ | ^ | | + PPFE RXQ| |TXQ RXQ| |TXQ | + PMD | | | | | + | v | v | +----------+ + +---------+ +----------+ | | pfe.ko | + | pfe_eth0| | pfe_eth1 | | +----------+ + +---------+ +----------+ | + ^ | ^ | | + TXQ| |RXQ TXQ| |RXQ | + | | | | | + | v | v | + +------------------------+ | + | | | + | PPFE HIF driver | | + +------------------------+ | + ^ | | + RX | TX | | + RING| RING| | + | v | + +--------------+ | + | | | + ==================| HIF |==================+=============== + +-----------+ +--------------+ + | | | | HW + | PPFE +--------------+ | + | +-----+ +-----+ | + | | MAC | | MAC | | + | | | | | | + +-------+-----+----------------+-----+----+ + | PHY | | PHY | + +-----+ +-----+ + + +The HIF, PPFE, MAC and PHY are the hardware blocks, the pfe.ko is a kernel +module, the PPFE HIF driver and the PPFE ethernet driver combined represent +as DPDK PPFE poll mode driver are running in the userspace. + +The PPFE hardware supports one HIF (host interface) RX ring and one TX ring +to send and receive packets through packet forwarding engine. Both network +interface traffic is multiplexed and send over HIF queue. + +pfe_eth0 and pfe_eth1 are logical ethernet interfaces, created by HIF client +driver. HIF driver is responsible for send and receive packets between +host interface and these logical interfaces. PPFE ethernet driver is a +hardware independent and register with the HIF client driver to transmit and +receive packets from HIF via logical interfaces. + +pfe.ko is required for PHY initialisation and also responsible for creating +the character device "pfe_us_cdev" which will be used for interacting with +the kernel layer for link status. + +PPFE Features +~~~~~~~~~~~~~~ + +- ARMv8 + +Supported PPFE SoCs +~~~~~~~~~~~~~~~~~~~~ + +- LS1012 + +Prerequisites +~~~~~~~~~~~~~ + +Below are some pre-requisites for executing PPFE PMD on a PPFE +compatible board: + +1. **ARM 64 Tool Chain** + + For example, the `*aarch64* Linaro Toolchain `_. + +2. **Linux Kernel** + + It can be obtained from `NXP's Github hosting `_. + +3. **Rootfile system** + + Any *aarch64* supporting filesystem can be used. For example, + Ubuntu 16.04 LTS (Xenial) or 18.04 (Bionic) userland which can be obtained + from `here `_. + +4. The ethernet device will be registered as virtual device, so ppfe has dependency on + **rte_bus_vdev** library and it is mandatory to use `--vdev` with value `eth_pfe` to + run DPDK application. + +The following dependencies are not part of DPDK and must be installed +separately: + +- **NXP Linux LSDK** + + NXP Layerscape software development kit (LSDK) includes support for family + of QorIQ® ARM-Architecture-based system on chip (SoC) processors + and corresponding boards. + + It includes the Linux board support packages (BSPs) for NXP SoCs, + a fully operational tool chain, kernel and board specific modules. + + LSDK and related information can be obtained from: `LSDK `_ + +- **pfe kernel module** + + pfe kernel module can be obtained from NXP Layerscape software development kit at + location `/lib/modules//kernel/drivers/staging/fsl_ppfe` in rootfs. + Module should be loaded using below command: + + .. code-block:: console + + insmod pfe.ko us=1 + + +Driver compilation and testing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Follow instructions available in the document +:ref:`compiling and testing a PMD for a NIC ` +to launch **testpmd** + +Additionally, PPFE driver needs `--vdev` as an input with value `eth_pfe` +to execute DPDK application. There is an optional parameter `intf` available +to specify port ID. PPFE driver supports only two interfaces, so valid values +for `intf` are 0 and 1. +see the command below: + + .. code-block:: console + + --vdev="eth_pfe0,intf=0" --vdev="eth_pfe1,intf=1" -- ... + + +Limitations +~~~~~~~~~~~ + +- Multi buffer pool cannot be supported. -- 2.17.1