[dpdk-dev,v2,16/18] doc: update NFP with PF support information

Message ID 1504275141-35448-17-git-send-email-alejandro.lucero@netronome.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Alejandro Lucero Sept. 1, 2017, 2:12 p.m. UTC
  NFP PMD has now support for both, PF and VFs. This patch updates
the guide and give some information about implications.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 doc/guides/nics/nfp.rst | 77 +++++++++++++++++++++++++++++++++++++------------
 1 file changed, 58 insertions(+), 19 deletions(-)
  

Comments

John McNamara Sept. 4, 2017, 2:20 p.m. UTC | #1
> -----Original Message-----

> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alejandro Lucero

> Sent: Friday, September 1, 2017 3:12 PM

> To: dev@dpdk.org

> Subject: [dpdk-dev] [PATCH v2 16/18] doc: update NFP with PF support

> information

> 

> NFP PMD has now support for both, PF and VFs. This patch updates the guide

> and give some information about implications.

> 

> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>



Minor comments below.

>..

> -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 vesion 4.5, and support for the PF since kernel version


s/vesion/version/


> -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.



Probably better to fixed-width quote these as``igb_uio`` or ``vfio-pci``,
here and in other places.


> +Using the PF

> +------------

> +

> +NFP PMD has support for using the NFP PF as another DPDK port, but it

> +has not


s/but it has not/but it does not have/


> +possible to use the PMD with the VFs if the PF is being used by DPDK,

> +this is, NFP PF bound to igb_uio or vfio-pci kernel drivers. Future



s/this is, NFP PF/that is, with the NFP PF/

> +DPDK version will have a PMD able to work with the PF and VFs at the

> +same time and with the PF implementing VF management along wih other PF-


s/wih/with/


> +Depending on the Netronome's product installed in the system, firmware


s/Netronome's/Netronome/

> +files 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.


Fixed-width quote the file paths: ``/lib/firmware/netronome``, etc.

> +

> +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 to handle the multiport case


s/to handle/handling/

> 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 interrrupts and it is not


s/interrrupts/interrupts/


Reviewed-by: John McNamara <john.mcnamara@intel.com>
  
Alejandro Lucero Sept. 4, 2017, 4:03 p.m. UTC | #2
Hi John,

Thanks for your review. I will modify the doc in next patch set version.

I'll wait until Ferruh give me the green light for sending the new version.


On Mon, Sep 4, 2017 at 3:20 PM, Mcnamara, John <john.mcnamara@intel.com>
wrote:

>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alejandro Lucero
> > Sent: Friday, September 1, 2017 3:12 PM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH v2 16/18] doc: update NFP with PF support
> > information
> >
> > NFP PMD has now support for both, PF and VFs. This patch updates the
> guide
> > and give some information about implications.
> >
> > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>
>
> Minor comments below.
>
> >..
> > -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 vesion 4.5, and support for the PF since kernel version
>
> s/vesion/version/
>
>
> > -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.
>
>
> Probably better to fixed-width quote these as``igb_uio`` or ``vfio-pci``,
> here and in other places.
>
>
> > +Using the PF
> > +------------
> > +
> > +NFP PMD has support for using the NFP PF as another DPDK port, but it
> > +has not
>
> s/but it has not/but it does not have/
>
>
> > +possible to use the PMD with the VFs if the PF is being used by DPDK,
> > +this is, NFP PF bound to igb_uio or vfio-pci kernel drivers. Future
>
>
> s/this is, NFP PF/that is, with the NFP PF/
>
> > +DPDK version will have a PMD able to work with the PF and VFs at the
> > +same time and with the PF implementing VF management along wih other PF-
>
> s/wih/with/
>
>
> > +Depending on the Netronome's product installed in the system, firmware
>
> s/Netronome's/Netronome/
>
> > +files 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.
>
> Fixed-width quote the file paths: ``/lib/firmware/netronome``, etc.
>
> > +
> > +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 to handle the multiport case
>
> s/to handle/handling/
>
> > 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 interrrupts and it is not
>
> s/interrrupts/interrupts/
>
>
> Reviewed-by: John McNamara <john.mcnamara@intel.com>
>
>
>
  
Ferruh Yigit Sept. 6, 2017, 9:53 a.m. UTC | #3
On 9/4/2017 5:03 PM, Alejandro Lucero wrote:
> Hi John,
> 
> Thanks for your review. I will modify the doc in next patch set version.
> 
> I'll wait until Ferruh give me the green light for sending the new version.

Patchset looks good to me, I can get it after mentioned documentation
corrections done.

If you prefer you can send only the documentation patch, instead of all
patchset, keeping John's ack.

Thanks,
ferruh

<...>
  
Alejandro Lucero Sept. 6, 2017, 10:43 a.m. UTC | #4
On Wed, Sep 6, 2017 at 10:53 AM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> On 9/4/2017 5:03 PM, Alejandro Lucero wrote:
> > Hi John,
> >
> > Thanks for your review. I will modify the doc in next patch set version.
> >
> > I'll wait until Ferruh give me the green light for sending the new
> version.
>
> Patchset looks good to me, I can get it after mentioned documentation
> corrections done.
>
> If you prefer you can send only the documentation patch, instead of all
> patchset, keeping John's ack.
>
>
Great.

I will send the v3 for this patch then.

Thank you


> Thanks,
> ferruh
>
> <...>
>
>
  

Patch

diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index c732fb1..45dbbc3 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 includes
-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 vesion 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´s BSP dependencies, it is possible to
 compile it along with other DPDK PMDs even if no BSP was installed before.
 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:
 
@@ -88,13 +89,51 @@  Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and
 for details.
 
 
+Using the PF
+------------
+
+NFP PMD has support for using the NFP PF as another DPDK port, but it has not
+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, this is, 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 the PF implementing VF
+management along wih 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, uploading 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's product installed in the system, firmware files
+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 to handle 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 interrrupts 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 and
-   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 both 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