[v2,25/25] doc: add the common and vDPA document

Message ID 20231024022849.3092506-26-chaoyong.he@corigine.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add the NFP vDPA PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing fail Testing issues
ci/iol-unit-amd64-testing fail Testing issues
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing fail Testing issues

Commit Message

Chaoyong He Oct. 24, 2023, 2:28 a.m. UTC
  Add the document for nfp common library and vDPA PMD.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 MAINTAINERS                            |  8 ++++
 doc/guides/platform/index.rst          |  1 +
 doc/guides/platform/nfp.rst            | 30 ++++++++++++++
 doc/guides/rel_notes/release_23_11.rst |  5 +++
 doc/guides/vdpadevs/features/nfp.ini   |  8 ++++
 doc/guides/vdpadevs/index.rst          |  1 +
 doc/guides/vdpadevs/nfp.rst            | 54 ++++++++++++++++++++++++++
 7 files changed, 107 insertions(+)
 create mode 100644 doc/guides/platform/nfp.rst
 create mode 100644 doc/guides/vdpadevs/features/nfp.ini
 create mode 100644 doc/guides/vdpadevs/nfp.rst
  

Comments

Ferruh Yigit Oct. 25, 2023, 4:11 p.m. UTC | #1
On 10/24/2023 3:28 AM, Chaoyong He wrote:
> Add the document for nfp common library and vDPA PMD.
> 

Can you please distribute this patch to other patches in set, details below.

> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Long Wu <long.wu@corigine.com>
> Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
> ---
>  MAINTAINERS                            |  8 ++++
>  doc/guides/platform/index.rst          |  1 +
>  doc/guides/platform/nfp.rst            | 30 ++++++++++++++
>  doc/guides/rel_notes/release_23_11.rst |  5 +++
>  doc/guides/vdpadevs/features/nfp.ini   |  8 ++++
>  doc/guides/vdpadevs/index.rst          |  1 +
>  doc/guides/vdpadevs/nfp.rst            | 54 ++++++++++++++++++++++++++
>  7 files changed, 107 insertions(+)
>  create mode 100644 doc/guides/platform/nfp.rst
>  create mode 100644 doc/guides/vdpadevs/features/nfp.ini
>  create mode 100644 doc/guides/vdpadevs/nfp.rst
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4083658697..b28cdab54c 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -900,9 +900,11 @@ F: doc/guides/nics/features/nfb.ini
>  
>  Netronome nfp
>  M: Chaoyong He <chaoyong.he@corigine.com>
> +F: drivers/common/nfp/
>

This part can go into first patch that introduces common/nfp

>  F: drivers/net/nfp/
>  F: doc/guides/nics/nfp.rst
>  F: doc/guides/nics/features/nfp*.ini
> +F: doc/guides/platform/nfp.rst
>  

Is a platform guide needed for nfp, it has only net and vdpa at this
stage and both has its own documentation, for a nic (not a SoC or
platform), a platform guide seems excessive to me, what do you think to
distribute this information to net and vdpa documentation of driver?


>  NXP dpaa
>  M: Hemant Agrawal <hemant.agrawal@nxp.com>
> @@ -1306,6 +1308,12 @@ F: drivers/vdpa/ifc/
>  F: doc/guides/vdpadevs/ifc.rst
>  F: doc/guides/vdpadevs/features/ifcvf.ini
>  
> +Corigine nfp vDPA
> +M: Chaoyong He <chaoyong.he@corigine.com>
> +F: drivers/vdpa/nfp/
> +F: doc/guides/vpdadevs/nfp.rst
> +F: doc/guides/vdpadevs/features/nfp.ini
> +

Above part can go into patch that introduces vdpa/nfp, like
18/25] drivers/vdpa: introduce the NFP vDPA library

including other vdpa related documentation:
doc/guides/vdpadevs/features/nfp.ini
doc/guides/vdpadevs/index.rst
doc/guides/vdpadevs/nfp.rst
  
Chaoyong He Oct. 26, 2023, 1:41 a.m. UTC | #2
> On 10/24/2023 3:28 AM, Chaoyong He wrote:
> > Add the document for nfp common library and vDPA PMD.
> >
> 
> Can you please distribute this patch to other patches in set, details below.
> 
> > Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> > Reviewed-by: Long Wu <long.wu@corigine.com>
> > Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
> > ---
> >  MAINTAINERS                            |  8 ++++
> >  doc/guides/platform/index.rst          |  1 +
> >  doc/guides/platform/nfp.rst            | 30 ++++++++++++++
> >  doc/guides/rel_notes/release_23_11.rst |  5 +++
> >  doc/guides/vdpadevs/features/nfp.ini   |  8 ++++
> >  doc/guides/vdpadevs/index.rst          |  1 +
> >  doc/guides/vdpadevs/nfp.rst            | 54 ++++++++++++++++++++++++++
> >  7 files changed, 107 insertions(+)
> >  create mode 100644 doc/guides/platform/nfp.rst  create mode 100644
> > doc/guides/vdpadevs/features/nfp.ini
> >  create mode 100644 doc/guides/vdpadevs/nfp.rst
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS index 4083658697..b28cdab54c
> > 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -900,9 +900,11 @@ F: doc/guides/nics/features/nfb.ini
> >
> >  Netronome nfp
> >  M: Chaoyong He <chaoyong.he@corigine.com>
> > +F: drivers/common/nfp/
> >
> 
> This part can go into first patch that introduces common/nfp
> 

Okay.

> >  F: drivers/net/nfp/
> >  F: doc/guides/nics/nfp.rst
> >  F: doc/guides/nics/features/nfp*.ini
> > +F: doc/guides/platform/nfp.rst
> >
> 
> Is a platform guide needed for nfp, it has only net and vdpa at this stage and
> both has its own documentation, for a nic (not a SoC or platform), a platform
> guide seems excessive to me, what do you think to distribute this information
> to net and vdpa documentation of driver?
> 

I will drop this file in the next version, thanks.

> 
> >  NXP dpaa
> >  M: Hemant Agrawal <hemant.agrawal@nxp.com> @@ -1306,6 +1308,12
> @@ F:
> > drivers/vdpa/ifc/
> >  F: doc/guides/vdpadevs/ifc.rst
> >  F: doc/guides/vdpadevs/features/ifcvf.ini
> >
> > +Corigine nfp vDPA
> > +M: Chaoyong He <chaoyong.he@corigine.com>
> > +F: drivers/vdpa/nfp/
> > +F: doc/guides/vpdadevs/nfp.rst
> > +F: doc/guides/vdpadevs/features/nfp.ini
> > +
> 
> Above part can go into patch that introduces vdpa/nfp, like 18/25]
> drivers/vdpa: introduce the NFP vDPA library
> 
> including other vdpa related documentation:
> doc/guides/vdpadevs/features/nfp.ini
> doc/guides/vdpadevs/index.rst
> doc/guides/vdpadevs/nfp.rst

Okay, will do as you said in the next version, thanks.
  

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 4083658697..b28cdab54c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -900,9 +900,11 @@  F: doc/guides/nics/features/nfb.ini
 
 Netronome nfp
 M: Chaoyong He <chaoyong.he@corigine.com>
+F: drivers/common/nfp/
 F: drivers/net/nfp/
 F: doc/guides/nics/nfp.rst
 F: doc/guides/nics/features/nfp*.ini
+F: doc/guides/platform/nfp.rst
 
 NXP dpaa
 M: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -1306,6 +1308,12 @@  F: drivers/vdpa/ifc/
 F: doc/guides/vdpadevs/ifc.rst
 F: doc/guides/vdpadevs/features/ifcvf.ini
 
+Corigine nfp vDPA
+M: Chaoyong He <chaoyong.he@corigine.com>
+F: drivers/vdpa/nfp/
+F: doc/guides/vpdadevs/nfp.rst
+F: doc/guides/vdpadevs/features/nfp.ini
+
 NVIDIA mlx5 vDPA
 M: Matan Azrad <matan@nvidia.com>
 M: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
diff --git a/doc/guides/platform/index.rst b/doc/guides/platform/index.rst
index b1ba11df73..07dd273821 100644
--- a/doc/guides/platform/index.rst
+++ b/doc/guides/platform/index.rst
@@ -15,4 +15,5 @@  The following are platform specific guides and setup information.
     dpaa
     dpaa2
     mlx5
+    nfp
     octeontx
diff --git a/doc/guides/platform/nfp.rst b/doc/guides/platform/nfp.rst
new file mode 100644
index 0000000000..f6c7be6fff
--- /dev/null
+++ b/doc/guides/platform/nfp.rst
@@ -0,0 +1,30 @@ 
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright (c) 2023 Corigine, Inc.
+
+NFP Common Driver
+=================
+
+The NFP common driver library (**librte_common_nfp**) provides support for
+the Netronome and Corigine's NFP-6xxx, NFP-4xxx and NFP-38xx product lines.
+
+Classes
+-------
+
+One NFP device can be probed by a number of different PMDs.
+To select a specific PMD, its name should be specified as a device parameter
+(e.g. ``0000:08:00.1,class=eth``).
+
+
+Supported Classes
+~~~~~~~~~~~~~~~~~
+
+- ``class=eth`` for :doc:`../nics/nfp`.
+- ``class=vdpa`` for :doc:`../vdpadevs/nfp`.
+
+By default, the NFP device will be probed by the ``eth`` PMD.
+
+
+Limitations
+~~~~~~~~~~~
+
+- ``eth`` and ``vdpa`` PMDs cannot be probed at the same time.
diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst
index 0a6fc76a9d..f6dde6fb9d 100644
--- a/doc/guides/rel_notes/release_23_11.rst
+++ b/doc/guides/rel_notes/release_23_11.rst
@@ -153,6 +153,11 @@  New Features
 
   * Added inline IPsec offload based on the security framework.
 
+* **Add new vDPA PMD based on Corigine NFP devices.**
+
+  Added a new Corigine NFP vDPA (``nfp_vdpa``) PMD.
+  See the :doc:`../vdpadevs/nfp` guide for more details on this driver.
+
 * **Updated Wangxun ngbe driver.**
 
   * Added 100M and auto-neg support in YT PHY fiber mode.
diff --git a/doc/guides/vdpadevs/features/nfp.ini b/doc/guides/vdpadevs/features/nfp.ini
new file mode 100644
index 0000000000..d830feafe0
--- /dev/null
+++ b/doc/guides/vdpadevs/features/nfp.ini
@@ -0,0 +1,8 @@ 
+;
+; Supported features of the 'nfp' vDPA driver.
+;
+; Refer to default.ini for the full list of available driver features.
+;
+[Features]
+Linux                   = Y
+x86-64                  = Y
diff --git a/doc/guides/vdpadevs/index.rst b/doc/guides/vdpadevs/index.rst
index cc2f858042..b0191a3a1d 100644
--- a/doc/guides/vdpadevs/index.rst
+++ b/doc/guides/vdpadevs/index.rst
@@ -14,4 +14,5 @@  which can be used from an application through vhost API.
     features_overview
     ifc
     mlx5
+    nfp
     sfc
diff --git a/doc/guides/vdpadevs/nfp.rst b/doc/guides/vdpadevs/nfp.rst
new file mode 100644
index 0000000000..63636b2882
--- /dev/null
+++ b/doc/guides/vdpadevs/nfp.rst
@@ -0,0 +1,54 @@ 
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright (c) 2023 Corigine, Inc.
+
+NFP vDPA driver
+===============
+
+The NFP vDPA (vhost data path acceleration) driver (**librte_nfp_vdpa**)
+provides support for the Netronome and Corigine's NFP-6xxx, NFP-4xxx
+and NFP-38xx product lines.
+
+NFP vDPA implementation
+-----------------------
+
+NFP VF device can be configured in the net device or vDPA mode.
+Adding "class=vdpa" parameter helps to specify that this device is to
+be used in vDPA mode. If this parameter is not specified, device
+will be probed by net/nfp driver and will used as a VF net device.
+
+This PMD uses (common/nfp) code to access the device firmware.
+
+Per-Device Parameters
+~~~~~~~~~~~~~~~~~~~~~
+
+The following per-device parameters can be passed via EAL PCI device
+allowlist option like "-a 02:00.0,arg1=value1,...".
+
+- ``class`` [net|vdpa] (default **net**)
+
+  Choose the mode of operation of nfp device.
+  **net** device will work as network device and will be probed by net/nfp driver.
+  **vdpa** device will work as vdpa device and will be probed by vdpa/nfp driver.
+  If this parameter is not specified then nfp device will operate as network device.
+
+Dynamic Logging Parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+One may leverage EAL option "--log-level" to change default levels
+for the log types supported by the driver. The option is used with
+an argument typically consisting of two parts separated by a colon.
+
+Level value is the last part which takes a symbolic name (or integer).
+Log type is the former part which may shell match syntax.
+Depending on the choice of the expression, the given log level may
+be used either for some specific log type or for a subset of types.
+
+NFP vDPA PMD provides the following log types available for control:
+
+- ``pmd.vdpa.nfp.vdpa`` (default level is **notice**)
+
+  Affects driver-wide messages unrelated to any particular devices.
+
+- ``pmd.vdpa.nfp.core`` (default level is **notice**)
+
+  Affects the core logic of this PMD.