From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by dpdk.org (Postfix) with ESMTP id 21F3A374F for ; Wed, 6 Sep 2017 16:55:29 +0200 (CEST) Received: by mail-oi0-f50.google.com with SMTP id x190so27323667oix.3 for ; Wed, 06 Sep 2017 07:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PmBq1KbLved1h89HIGTSKqfyw3N9kMcs9jn741OWo0g=; b=oToUboi3ErCIf6vefI5sa6Mppzlmx13UqBoDE9tZ//Ksu/eX7pS6Wvz1jlE3cdDPMO Epoi9eOLfo0q2hVdiguN209FRVLVfq/M5jQQzeEt4aAbX8aT9b9dQBY06amgMEYQ05MR DFlic9v6av0mAsca2ZRHdTwVGJO/maVclsCSeaR9kLxCjpy34wv5fpH95qC3OvdXfMzI yJ+MJ5yYbkWscrwQa+OFslhV9sryllYGtwZWynqbvrVvmsboIbKxwt2ubglE0dN/sRZv +xApKeEaJJrlu18ZcSPzQSJhvYRvxV4aPg10efe9mkU9zcFPKWUqCyb4eBOnKrCfIfIq xZUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PmBq1KbLved1h89HIGTSKqfyw3N9kMcs9jn741OWo0g=; b=fL0gvggouEMIjqV6WBsm3rHlXjIet+PXmteFYliiIzIp/5dZxYvHAxy4efk7ckA17a IE4btF37PAUr9TvIRuY4a9FzHPnv99MkYgn+PwxSdF81THtPLrvceA23u4DR0XbI2Wpx zSJQH4qLOOkhDp9nE6oMXGRBz5MhjpwrpbYzGqaA9MrBcic42UHEOmUOMhSg9WRgKRty mefB5japxeP5MXW7x/oCsMqp+EDAhqnig4c3+FBdEbwmmciC7HpKMtxIl5fjqZvykVzN BnIufYljsMRY61Sn+DFSMgZeGFEpI7y8briGrI25gkU+boj0C2YPWxDa7w4f8awVpmDr O3rw== X-Gm-Message-State: AHPjjUjDg9wFYWg7cl1pjHjVZ9WY7JQ+2aA1zSvYJISdckDf8Li6z98e wdeJd04GdVqLUTsaw5/ePUAT1F8MrNnZ X-Google-Smtp-Source: ADKCNb7o4l8uZCCgLmo7N8JC6e15YS+SlAe1P+A9xj967WU8Irf9XBrTLtSm4oAoKU71APCy5A8J+DLBnupZsxTKsfw= X-Received: by 10.202.227.84 with SMTP id a81mr2605997oih.244.1504709728143; Wed, 06 Sep 2017 07:55:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.33.212 with HTTP; Wed, 6 Sep 2017 07:55:27 -0700 (PDT) In-Reply-To: <1504709259-46803-1-git-send-email-alejandro.lucero@netronome.com> References: <1504709259-46803-1-git-send-email-alejandro.lucero@netronome.com> From: Alejandro Lucero Date: Wed, 6 Sep 2017 15:55:27 +0100 Message-ID: To: dev Cc: Ferruh Yigit , "Mcnamara, John" , root Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3] doc: update NFP with PF support information 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: , X-List-Received-Date: Wed, 06 Sep 2017 14:55:29 -0000 It seems I did not commit with the right signature. I will send it again. Sorry about this. On Wed, Sep 6, 2017 at 3:47 PM, Alejandro Lucero < alejandro.lucero@netronome.com> wrote: > From: root > > NFP PMD has now support for both, PF and VFs. This patch updates > the guide and give some information about implications. > > Signed-off-by: root > --- > doc/guides/nics/nfp.rst | 78 ++++++++++++++++++++++++++++++ > +++++++------------ > 1 file changed, 59 insertions(+), 19 deletions(-) > > diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst > index c732fb1..99a3b76 100644 > --- a/doc/guides/nics/nfp.rst > +++ b/doc/guides/nics/nfp.rst > @@ -1,5 +1,5 @@ > .. BSD LICENSE > - Copyright(c) 2015 Netronome Systems, Inc. All rights reserved. > + Copyright(c) 2015-2017 Netronome Systems, Inc. All rights reserved. > All rights reserved. > > Redistribution and use in source and binary forms, with or without > @@ -38,31 +38,32 @@ up to 400 Gbps. > > This document explains how to use DPDK with the Netronome Poll Mode > Driver (PMD) supporting Netronome's Network Flow Processor 6xxx > -(NFP-6xxx). > +(NFP-6xxx) and Netronome's Flow Processor 4xxx (NFP-4xxx). > > -Currently the driver supports virtual functions (VFs) only. > +NFP is a SRIOV capable device and the PMD driver supports the physical > +function (PF) and virtual functions (VFs). > > Dependencies > ------------ > > -Before using the Netronome's DPDK PMD some NFP-6xxx configuration, > +Before using the Netronome's DPDK PMD some NFP configuration, > which is not related to DPDK, is required. The system requires > -installation of **Netronome's BSP (Board Support Package)** which includ= es > -Linux drivers, programs and libraries. > +installation of **Netronome's BSP (Board Support Package)** along > +with some specific NFP firmware application. Netronome's NSP ABI > +version should be 0.20 or higher. > > -If you have a NFP-6xxx device you should already have the code and > -documentation for doing this configuration. Contact > +If you have a NFP device you should already have the code and > +documentation for doing all this configuration. Contact > **support@netronome.com** to obtain the latest available firmware. > > -The NFP Linux kernel drivers (including the required PF driver for the > -NFP) are available on Github at > +The NFP Linux netdev kernel driver for VFs is part of vanilla kernel > +since kernel version 4.5, and support for the PF since kernel version > +4.11. Support for older kernels can be obtained on Github at > **https://github.com/Netronome/nfp-drv-kmods** along with build > instructions. > > -DPDK runs in userspace and PMDs uses the Linux kernel UIO interface to > -allow access to physical devices from userspace. The NFP PMD requires > -the **igb_uio** UIO driver, available with DPDK, to perform correct > -initialization. > +NFP PMD needs to be used along with UIO ``igb_uio`` or VFIO (``vfio-pci`= `) > +Linux kernel driver. > > Building the software > --------------------- > @@ -71,7 +72,7 @@ Netronome's PMD code is provided in the > **drivers/net/nfp** directory. > Although NFP PMD has Netronome=C2=B4s BSP dependencies, it is possible t= o > compile it along with other DPDK PMDs even if no BSP was installed befor= e. > Of course, a DPDK app will require such a BSP installed for using the > -NFP PMD. > +NFP PMD, along with a specific NFP firmware application. > > Default PMD configuration is at **common_linuxapp configuration** file: > > @@ -87,14 +88,53 @@ Driver compilation and testing > Refer to the document :ref:`compiling and testing a PMD for a NIC > ` > for details. > > +Using the PF > +------------ > + > +NFP PMD has support for using the NFP PF as another DPDK port, but it > does not > +have any functionality for controlling VFs. In fact, it is not possible > to use > +the PMD with the VFs if the PF is being used by DPDK, that is, with the > NFP PF > +bound to ``igb_uio`` or ``vfio-pci`` kernel drivers. Future DPDK version > will > +have a PMD able to work with the PF and VFs at the same time and with th= e > PF > +implementing VF management along with other PF-only > functionalities/offloads. > + > +The PMD PF has extra work to do which will delay the DPDK app > initialization > +like checking if a firmware is already available in the device, uploadin= g > the > +firmware if necessary, and configure the Link state properly when > starting or > +stopping a PF port. Note that firmware upload is not always necessary > which is > +the main delay for NFP PF PMD initialization. > + > +Depending on the Netronome product installed in the system, firmware fil= es > +should be available under ``/lib/firmware/netronome``. DPDK PMD > supporting the > +PF requires a specific link, ``/lib/firmware/netronome/nic_ > dpdk_default.nffw``, > +which should be created automatically with Netronome's Agilio products > +installation. > + > +PF multiport support > +-------------------- > + > +Some NFP cards support several physical ports with just one single PCI > device. > +DPDK core is designed with the 1:1 relationship between PCI devices and > DPDK > +ports, so NFP PMD PF support requires handling the multiport case > specifically. > +During NFP PF initialization, the PMD will extract the information about > the > +number of PF ports from the firmware and will create as many DPDK ports = as > +needed. > + > +Because the unusual relationship between a single PCI device and several > DPDK > +ports, there are some limitations when using more than one PF DPDK ports= : > there > +is no support for RX interrupts and it is not possible either to use > those PF > +ports with the device hotplug functionality. > + > > System configuration > -------------------- > > -#. **Enable SR-IOV on the NFP-6xxx device:** The current NFP PMD works > with > - Virtual Functions (VFs) on a NFP device. Make sure that one of the > Physical > - Function (PF) drivers from the above Github repository is installed a= nd > - loaded. > +#. **Enable SR-IOV on the NFP device:** The current NFP PMD supports the > PF and > + the VFs on a NFP device. However, it is not possible to work with bot= h > at the > + same time because the VFs require the PF being bound to the NFP PF > Linux > + netdev driver. Make sure you are working with a kernel with NFP PF > support or > + get the drivers from the above Github repository and follow the > instructions > + for building and installing it. > > Virtual Functions need to be enabled before they can be used with the > PMD. > Before enabling the VFs it is useful to obtain information about the > -- > 1.9.1 > >