From patchwork Thu Sep 13 09:41:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 44649 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 015445911; Thu, 13 Sep 2018 11:42:37 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20054.outbound.protection.outlook.com [40.107.2.54]) by dpdk.org (Postfix) with ESMTP id 0BE535681 for ; Thu, 13 Sep 2018 11:42:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zufCQ12+uADZOWEiq+0qstUFm37tRmM5RvvOo5WHHMU=; b=Mfee0FARQgokpp9J7Fcq3nQCDpnptNy8JRf3GkUKNjk2XEPUgoNtLxgZFs6SPyOzBM0Eq1Om89fNE9eia1I0foqpp3kcmxe0uzEceFrOO1kYh3XTgrmn3+LUwKr5QiFRsDU/f9C5kLCf8LJiSMyGmK051WRCkRdMjRa5zWlK0yo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=G.Singh@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by VI1PR04MB1533.eurprd04.prod.outlook.com (2a01:111:e400:596a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.17; Thu, 13 Sep 2018 09:42:31 +0000 From: Gagandeep Singh To: dev@dpdk.org, ferruh.yigit@intel.com Cc: pankaj.chauhan@nxp.com, Gagandeep Singh Date: Thu, 13 Sep 2018 15:11:59 +0530 Message-Id: <20180913094201.17098-2-g.singh@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180913094201.17098-1-g.singh@nxp.com> References: <20180906055449.21731-1-g.singh@nxp.com> <20180913094201.17098-1-g.singh@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0029.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:c::15) To VI1PR04MB1533.eurprd04.prod.outlook.com (2a01:111:e400:596a::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3857fadb-ec58-4376-021b-08d6195d3a6e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB1533; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1533; 3:2EpFNTIAH8BFjO4GwYdfz499zmwDyc1H2b9wJqm5GSWn17k91klH3a1dyUMONjKi7G+W5iaTRrRgBQJNMdi+TSE3vvwgWGElzH7WUaycti9bdzkhhxuXgy42elQ2A7eWfRCbn6UWLue9fym5I7qNip+YEZGNq5i6MhUaEkIToVlDa2omtzgE8czFsc1wUPitsU+7Wf4+CJVwJMhlUtPigcaR7Exl711p2jZHbndtTwTAc5QjZp0MSmyvkrulvLWJ; 25:WCN9zfsnrZ5ni3MQuj4vdIUZMmpkAYUVvBdNIL6k8FgLsE78Q5yRnL2THPwC37V+PpERh7xEV1VIedyBoHbjYTVX9ejNVDCmpgcLpFb0wrbMBARFKLaN/hYC69h48GK72n8jKqrUMqBL3vUcUYGMtrS0VuctuiHOqc4k0qKwPBCr1Acy9qiwrrYlZrt2gYzDRHZi84jRm3XdRUVKs37Y9NDKWaUpEfBRbsGJWu04BWPuxHIJIATSWQ3EiitpNwGAyqCeMIOy/GOWgmcDAK2PhqDH7rlrKDMp/nSz/hesaUS6jPQ+cpIytAQ7HFIkFQkifqzdaayGzvGc6jd7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7IV69KeWf/hTtHqz4NntUbxTT3a6/CU9nUux9XF+fp4T/FZxTT63IaliS/nXTaibl3J1WoMwn8+aA0EawVXw1E/9oL2L9t/9u9HXjIYJpR9yby6RR4zg+YwmC5tpge4dJg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(211171220733660)(264314650089876); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(3231311)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050); SRVR:VI1PR04MB1533; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB1533; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(396003)(346002)(376002)(366004)(199004)(189003)(105586002)(68736007)(106356001)(50466002)(11346002)(486006)(76176011)(7736002)(36756003)(305945005)(52116002)(23676004)(86362001)(72206003)(478600001)(8936002)(47776003)(50226002)(2616005)(476003)(316002)(446003)(956004)(66066001)(4326008)(186003)(16526019)(6306002)(53936002)(6486002)(26005)(97736004)(6116002)(6666003)(6512007)(3846002)(2870700001)(55236004)(2906002)(5009440100003)(6506007)(386003)(8676002)(5660300001)(81156014)(1076002)(25786009)(81166006)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB1533; H:Tophie.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BVI1PR04MB1533=3B23=3A4tXo?= =?utf-8?q?pEDFQpXGIHteaRUohPLGC/gR2bBWD/++e5aOMVKIY6A1B56tWLgVqo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JajVMXre3WOdN52ZMoY2LI4B6eHAd2Ja4nqMtiDN+wpVHFvN0vSSp5xfo8nCDRdDtuOEMJTdRTkOPYqq4kw7wCZtyiba52FnshN5k/Na7Hnle+5u3wNc8F5NaAAdvw0S37j8q9a6uCMWhgiFRb3u8ezynC/8tO3A3NS22yr9LbWb38bhkT4z2HDsgPtlT+xYnZUJvyUkqL4scP3g==; 5:T+K5gsmg3vAc7xd4MeHDgrSJph7zQ0kAl/UTsagLIjmvpYwoSxsj8xCV9onxJXwkO6Gmv3Jdwbh+NZZd2NouPAgeD/xv6sjpEUBDGS16GiQwVNTreKIDnsQzVM9E5BhKJioLxFs4S72tjmrnIGWJwamxdZXrpEaaP75X3HK1yYk=; 7:QUKIuNGJX+qr1BXygS/jdXGLRzjAxykGT4NcxUISAqbJU3FsOo3cGFhlPGEX2nuxEYvpMyMvtHUqvCa81ym6R9OfHMEoSTo14EpzxI9PgYIGkv4QwSQWDUj2GSakP1nAd3AmxXM+s+RltoFA7Fx9VvBbtbcCDo+OF9vKrUCi15VPn+pH4SXMNk/kNfwiOo+/4M7BITMWKwlGmxtvKKArCwX3PGWx1iKDcG+iZjRS2iyTkzaD0FpRbnr7uHBe/uee SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 09:42:31.1916 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3857fadb-ec58-4376-021b-08d6195d3a6e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1533 Subject: [dpdk-dev] [PATCH v2 1/3] doc: add usage doc for ENETC 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" Add enetc usage document to compile and run the DPDK application on enetc supported platform. This document introduces the enetc driver, supported platforms and supported features. Signed-off-by: Gagandeep Singh --- MAINTAINERS | 5 + doc/guides/nics/enetc.rst | 153 +++++++++++++++++++++++++++++ doc/guides/nics/features/enetc.ini | 8 ++ doc/guides/nics/index.rst | 1 + 4 files changed, 167 insertions(+) create mode 100644 doc/guides/nics/enetc.rst create mode 100644 doc/guides/nics/features/enetc.ini diff --git a/MAINTAINERS b/MAINTAINERS index 9fd258fad..b999230cc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -643,6 +643,11 @@ F: drivers/net/dpaa2/ F: doc/guides/nics/dpaa2.rst F: doc/guides/nics/features/dpaa2.ini +NXP enetc +M: Gagandeep Singh +F: doc/guides/nics/enetc.rst +F: doc/guides/nics/features/enetc.ini + QLogic bnx2x M: Harish Patil M: Rasesh Mody diff --git a/doc/guides/nics/enetc.rst b/doc/guides/nics/enetc.rst new file mode 100644 index 000000000..da775ebeb --- /dev/null +++ b/doc/guides/nics/enetc.rst @@ -0,0 +1,153 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright 2018 NXP + +ENETC Poll Mode Driver +====================== + +The ENETC NIC PMD (**librte_pmd_enetc**) provides poll mode driver +support for the inbuilt NIC found in the **NXP LS1028** SoC. + +More information can be found at `NXP Official Website +`_. + +ENETC +----- + +This section provides an overview of the NXP ENETC +and how it is integrated into the DPDK. + +Contents summary + +- ENETC overview +- ENETC features +- PCI bus driver +- NIC driver +- Supported ENETC SoCs +- Prerequisites +- Driver compilation and testing + +ENETC Overview +~~~~~~~~~~~~~~ + +ENETC is a PCI Integrated End Point(IEP). IEP implements +peripheral devices in an SoC such that software sees them as PCIe device. +ENETC is an evolution of BDR(Buffer Descriptor Ring) based networking +IPs. + +This infrastructure simplifies adding support for IEP and facilitates in following: + +- Device discovery and location +- Resource requirement discovery and allocation (e.g. interrupt assignment, + device register address) +- Event reporting + +ENETC Features +~~~~~~~~~~~~~~ + + +NIC Driver (PMD) +~~~~~~~~~~~~~~~~ + +ENETC PMD is traditional DPDK PMD which provides necessary interface between +RTE framework and ENETC internal drivers. + +- Driver registers the device vendor table in PCI subsystem. +- RTE framework scans the PCI bus for connected devices. +- This scanning will invoke the probe function of ENETC driver. +- The probe function will set the basic device registers and also setups BD rings. +- On packet Rx the respective BD Ring status bit is set which is then used for + packet processing. +- Then Tx is done first followed by Rx. + +Supported ENETC SoCs +~~~~~~~~~~~~~~~~~~~~ + +- LS1028 + +Prerequisites +~~~~~~~~~~~~~ + +There are three main pre-requisities for executing ENETC PMD on a ENETC +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 `_. + +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 `_ + +Driver compilation and testing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +#. Please refer the document :ref:`compiling and testing a PMD for a NIC ` + to compile the driver. Use target "arm64-armv8a-linuxapp-gcc" in make command + +#. Refer to the document :ref:`cross build dpdk for arm64 ` to + disable flags and for cross compilation + +#. To compile in performance mode, please set ``CONFIG_RTE_CACHE_LINE_SIZE=64`` + +#. Running l2fwd: + + Follow instructions available in the document + :ref:`compiling and testing a PMD for a NIC ` + to run l2fwd. + + - First unbind the ports from kernel + + - echo vfio-pci > /sys/bus/pci/devices/0000\:00\:00.1/driver_override + - echo 0000:00:00.1 > /sys/bus/pci/drivers/fsl_enetc/unbind + - echo vfio-pci > /sys/bus/pci/devices/0000\:00\:00.0/driver_override + - echo 0000:00:00.0 > /sys/bus/pci/drivers/fsl_enetc/unbind + - Then bind them to VFIO, so that DPDK application can use them + + - echo 0000:00:00.1 > /sys/bus/pci/drivers/vfio-pci/bind + - echo 0000:00:00.0 > /sys/bus/pci/drivers/vfio-pci/bind + - Mount Hugepages + + - mkdir /mnt/hugepages + - mount -t hugetlbfs none /mnt/hugepages + - Run l2fwd application + +Example output: + + .. code-block:: console + + ./l2fwd -c 0x3 -n 1 --log-level=8 -- -p 0x3 -q 1 -T 0 + + ..... + EAL: Registered [pci] bus. + EAL: Detected 2 lcore(s) + ..... + EAL: Bus scan completed + ..... + Configuring Port 0 (socket 0) + Port 0: 00:00:00:00:00:01 + Configuring Port 1 (socket 0) + Port 1: 00:00:00:00:00:02 + ..... + Checking link statuses... + Port 0 Link Up - speed 0 Mbps - full-duplex + Port 1 Link Up - speed 0 Mbps - full-duplex diff --git a/doc/guides/nics/features/enetc.ini b/doc/guides/nics/features/enetc.ini new file mode 100644 index 000000000..fb1bf5989 --- /dev/null +++ b/doc/guides/nics/features/enetc.ini @@ -0,0 +1,8 @@ +; +; Supported features of the 'enetc' network poll mode driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +ARMv8 = Y +Usage doc = Y diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst index 59f6063dc..0323035d3 100644 --- a/doc/guides/nics/index.rst +++ b/doc/guides/nics/index.rst @@ -21,6 +21,7 @@ Network Interface Controller Drivers dpaa2 e1000em ena + enetc enic fm10k i40e