DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC 0/2] doc: consolidate common part among PMD docs
@ 2017-04-01 15:03 Shijith Thotton
  2017-04-01 15:03 ` [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd Shijith Thotton
                   ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-01 15:03 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

Steps to build PMD and to run sample application are common among
drivers. So those instructions can be moved to a new file. It is
possible to include this file in driver documentations or be referred
using a label.

RFC has two parts:
1. Introduce new doc file.
2. Make use of the file in liquidio documentation.

Once the changes are agreed upon, I can send a patchset with similar
changes to other PMD documentations.

Shijith Thotton (2):
  doc: add doc with steps to build PMD and run testpmd
  doc: include PMD build and run file in liquidio doc

 doc/guides/nics/build_and_run.inc | 110 ++++++++++++++++++++++++++++++++++++++
 doc/guides/nics/liquidio.rst      |  85 +----------------------------
 2 files changed, 112 insertions(+), 83 deletions(-)
 create mode 100644 doc/guides/nics/build_and_run.inc

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd
  2017-04-01 15:03 [dpdk-dev] [RFC 0/2] doc: consolidate common part among PMD docs Shijith Thotton
@ 2017-04-01 15:03 ` Shijith Thotton
  2017-04-02 12:11   ` Mcnamara, John
  2017-04-01 15:04 ` [dpdk-dev] [RFC 2/2] doc: include PMD build and run file in liquidio doc Shijith Thotton
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
  2 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-01 15:03 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

Add a new document with steps to build PMDs and launch a sample test
application, "testpmd". It can be included in other PMD documentations
or be referred.

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/build_and_run.inc | 110 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)
 create mode 100644 doc/guides/nics/build_and_run.inc

diff --git a/doc/guides/nics/build_and_run.inc b/doc/guides/nics/build_and_run.inc
new file mode 100644
index 0000000..7d59c6c
--- /dev/null
+++ b/doc/guides/nics/build_and_run.inc
@@ -0,0 +1,110 @@
+..  BSD LICENSE
+    Copyright(c) 2017 Cavium, Inc.. All rights reserved.
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+    * Neither the name of Cavium, Inc. nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+.. _pmd_build_and_run:
+
+Driver Compilation
+------------------
+
+To compile PMD for Linux x86_64 gcc target, run the following "make" command:
+
+.. code-block:: console
+
+   cd <DPDK-source-directory>
+   make install T=x86_64-native-linuxapp-gcc
+
+FreeBSD targets should use "gmake" command instead of "make".
+
+For more information, refer :ref:`Getting Started Guide for Linux <linux_gsg>` or
+:ref:`Getting Started Guide for FreeBSD <freebsd_gsg>` depending on your platform.
+
+
+
+Running testpmd in Linux
+------------------------
+
+This section demonstrates how to launch ``testpmd`` in Linux.
+
+#. Mount huge pages:
+
+   .. code-block:: console
+
+      mkdir /mnt/huge
+      mount -t hugetlbfs nodev /mnt/huge
+
+#. Request huge pages:
+
+   .. code-block:: console
+
+      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
+
+#. Load ``igb_uio`` or ``vfio-pci`` driver:
+
+   .. code-block:: console
+
+      modprobe uio
+      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+
+   or
+
+   .. code-block:: console
+
+      modprobe vfio-pci
+
+#. Setup VFIO permissions for regular users before binding to ``vfio-pci``:
+
+   .. code-block:: console
+
+      sudo chmod a+x /dev/vfio
+
+      sudo chmod 0666 /dev/vfio/*
+
+#. Bind the adapters to ``igb_uio`` or ``vfio-pci`` loaded in the previous step:
+
+   .. code-block:: console
+
+      ./usertools/dpdk-devbind.py --bind igb_uio DEVICE1 DEVICE2
+
+   Or setup VFIO permissions for regular users and then bind to ``vfio-pci``:
+
+   .. code-block:: console
+
+      ./usertools/dpdk-devbind.py --bind vfio-pci DEVICE1 DEVICE2
+
+   .. note::
+
+       DEVICE1, DEVICE2 are specified via PCI "domain:bus:slot.func" syntax
+       or "bus:slot.func" syntax.
+
+#. Start ``testpmd`` with basic parameters:
+
+   .. code-block:: console
+
+      ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -- -i
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [RFC 2/2] doc: include PMD build and run file in liquidio doc
  2017-04-01 15:03 [dpdk-dev] [RFC 0/2] doc: consolidate common part among PMD docs Shijith Thotton
  2017-04-01 15:03 ` [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd Shijith Thotton
@ 2017-04-01 15:04 ` Shijith Thotton
  2017-04-02 12:15   ` Mcnamara, John
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
  2 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-01 15:04 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

Include build_and_run.inc instead of instructions to build PMD and run
testpmd in liquidio driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/liquidio.rst | 85 ++------------------------------------------
 1 file changed, 2 insertions(+), 83 deletions(-)

diff --git a/doc/guides/nics/liquidio.rst b/doc/guides/nics/liquidio.rst
index 9ffdc35..fa92cd7 100644
--- a/doc/guides/nics/liquidio.rst
+++ b/doc/guides/nics/liquidio.rst
@@ -80,88 +80,7 @@ Please note that enabling debugging options may affect system performance.
   Toggle display of register reads and writes.
 
 
-.. _lio_driver-compilation:
-
-Driver Compilation
-------------------
-
-To compile LiquidIO PMD for Linux x86_64 gcc target, run the following "make"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   make install T=x86_64-native-linuxapp-gcc
-
-
-Sample Application Notes
-------------------------
-
-This section demonstrates how to launch ``testpmd`` with LiquidIO® CN23XX
-device managed by ``librte_pmd_lio`` in Linux operating system.
-
-#. Mount huge pages:
-
-   .. code-block:: console
-
-      mkdir /mnt/huge
-      mount -t hugetlbfs nodev /mnt/huge
-
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
-
-#. Load ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the LiquidIO VFs to ``vfio-pci`` loaded in previous step:
-
-   Setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      sudo chmod a+x /dev/vfio
-
-      sudo chmod 0666 /dev/vfio/*
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:03:00.3 0000:03:08.3
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./build/app/testpmd -c 0xf -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      EAL: PCI device 0000:03:00.3 on NUMA socket 0
-      EAL:   probe driver: 177d:9712 net_liovf
-      EAL:   using IOMMU type 1 (Type 1)
-      PMD: net_liovf[03:00.3]INFO: DEVICE : CN23XX VF
-      EAL: PCI device 0000:03:08.3 on NUMA socket 0
-      EAL:   probe driver: 177d:9712 net_liovf
-      PMD: net_liovf[03:08.3]INFO: DEVICE : CN23XX VF
-      Interactive-mode selected
-      USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=171456, size=2176, socket=0
-      Configuring Port 0 (socket 0)
-      PMD: net_liovf[03:00.3]INFO: Starting port 0
-      Port 0: F2:A8:1B:5E:B4:66
-      Configuring Port 1 (socket 0)
-      PMD: net_liovf[03:08.3]INFO: Starting port 1
-      Port 1: 32:76:CC:EE:56:D7
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Port 1 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
+.. include:: build_and_run.inc
 
 
 SR-IOV: Prerequisites and Sample Application Notes
@@ -248,7 +167,7 @@ This section provides instructions to configure SR-IOV with Linux OS.
 
 #. Running testpmd
 
-   Refer :ref:`notes above <lio_driver-compilation>`
+   Refer :ref:`notes above <pmd_build_and_run>`
    to compile and run ``testpmd`` application.
    Use ``igb_uio`` instead of ``vfio-pci`` in VM.
 
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd
  2017-04-01 15:03 ` [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd Shijith Thotton
@ 2017-04-02 12:11   ` Mcnamara, John
  2017-04-02 12:13     ` Mcnamara, John
  2017-04-03  8:05     ` Shijith Thotton
  0 siblings, 2 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-02 12:11 UTC (permalink / raw)
  To: Shijith Thotton, dev; +Cc: Yigit, Ferruh



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shijith Thotton
> Sent: Saturday, April 1, 2017 4:04 PM
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run
> testpmd
> 
> Add a new document with steps to build PMDs and launch a sample test
> application, "testpmd". It can be included in other PMD documentations or
> be referred.

Good idea. Nice addition. Some minor comments below.

> 
> Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> ---
>  doc/guides/nics/build_and_run.inc | 110

I think that this should be an rst doc that is included in the index
file for the nics dir. It should be included right after the overview
in the index.


> +.. _pmd_build_and_run:

If this doc is included in the index then it needs a better first section
title. Something like "Compiling and testing a PMD for a NIC".

Then it should have a short introduction like:

    This section demonstrates how to compile and run a Poll Mode Driver
    (PMD) for the available Network Interface Cards in DPDK using TestPMD.

    TestPMD is one of the reference applications distributed with the
    DPDK. Its main purpose is to forward packets between Ethernet
    ports on a network interface and as such is the best way to test
    a PMD.

It would be good to add a link to the TestPMD into docs but it doesn't have a 
target. We should probably add one (it maybe be possible to link to the RST
file but that syntax isn't generally preferred).



> +
> +Driver Compilation
> +------------------

This and the next sections should then become second level headings

> +
> +To compile PMD for Linux x86_64 gcc target, run the following "make"
> command:


s/PMD/a PMD/

Also add at the end of this line or after the command:

    This command will also automatically build testpmd.

> +
> +.. code-block:: console
> +
> +   cd <DPDK-source-directory>
> +   make install T=x86_64-native-linuxapp-gcc
> +
> +FreeBSD targets should use "gmake" command instead of "make".
> +
> +For more information, refer :ref:`Getting Started Guide for Linux
> +<linux_gsg>` or :ref:`Getting Started Guide for FreeBSD <freebsd_gsg>`
> depending on your platform.

s/refer/refer to the/


> +Running testpmd in Linux
> +------------------------
> +

> +This section demonstrates how to launch ``testpmd`` in Linux.

s/launch/setup and run/


> +#. Start ``testpmd`` with basic parameters:
> +
> +   .. code-block:: console
> +
> +      ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -- -i

We recently changed the docs to use "-l" instead of "-c". Can you make
that change here as well.


Thanks,

John

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd
  2017-04-02 12:11   ` Mcnamara, John
@ 2017-04-02 12:13     ` Mcnamara, John
  2017-04-03  8:05     ` Shijith Thotton
  1 sibling, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-02 12:13 UTC (permalink / raw)
  To: Mcnamara, John, Shijith Thotton, dev; +Cc: Yigit, Ferruh, De Lara Guarch, Pablo



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Mcnamara, John
> Sent: Sunday, April 2, 2017 1:11 PM
> To: Shijith Thotton <shijith.thotton@caviumnetworks.com>; dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and
> run testpmd
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shijith Thotton
> > Sent: Saturday, April 1, 2017 4:04 PM
> > To: dev@dpdk.org
> > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>
> > Subject: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and
> > run testpmd
> >
> > Add a new document with steps to build PMDs and launch a sample test
> > application, "testpmd". It can be included in other PMD documentations
> > or be referred.
> 
> Good idea. Nice addition. Some minor comments below.

P.S., See also this recent doc on TestPMD from Pablo for reference/ideas:

https://software.intel.com/en-us/articles/testing-dpdk-performance-and-features-with-testpmd


P.P.S. Pablo, we should convert that doc into a DPDK how-to or intro section for TestPMD.

 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [RFC 2/2] doc: include PMD build and run file in liquidio doc
  2017-04-01 15:04 ` [dpdk-dev] [RFC 2/2] doc: include PMD build and run file in liquidio doc Shijith Thotton
@ 2017-04-02 12:15   ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-02 12:15 UTC (permalink / raw)
  To: Shijith Thotton, dev; +Cc: Yigit, Ferruh



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shijith Thotton
> Sent: Saturday, April 1, 2017 4:04 PM
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: [dpdk-dev] [RFC 2/2] doc: include PMD build and run file in
> liquidio doc
> 
> Include build_and_run.inc instead of instructions to build PMD and run
> testpmd in liquidio driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

Just reference the testpmd compile and run doc instead of including it.

Thanks,

John


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd
  2017-04-02 12:11   ` Mcnamara, John
  2017-04-02 12:13     ` Mcnamara, John
@ 2017-04-03  8:05     ` Shijith Thotton
  1 sibling, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-03  8:05 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: dev, Yigit, Ferruh

On Sun, Apr 02, 2017 at 12:11:05PM +0000, Mcnamara, John wrote:
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shijith Thotton
> > Sent: Saturday, April 1, 2017 4:04 PM
> > To: dev@dpdk.org
> > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>
> > Subject: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run
> > testpmd
> > 
> > Add a new document with steps to build PMDs and launch a sample test
> > application, "testpmd". It can be included in other PMD documentations or
> > be referred.
> 
> Good idea. Nice addition. Some minor comments below.
> 
> > 
> > Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> > ---
> >  doc/guides/nics/build_and_run.inc | 110
> 
> I think that this should be an rst doc that is included in the index
> file for the nics dir. It should be included right after the overview
> in the index.
>

OK. Will add a section as mentioned below.
 
> 
> > +.. _pmd_build_and_run:
> 
> If this doc is included in the index then it needs a better first section
> title. Something like "Compiling and testing a PMD for a NIC".
> 
> Then it should have a short introduction like:
> 
>     This section demonstrates how to compile and run a Poll Mode Driver
>     (PMD) for the available Network Interface Cards in DPDK using TestPMD.
> 
>     TestPMD is one of the reference applications distributed with the
>     DPDK. Its main purpose is to forward packets between Ethernet
>     ports on a network interface and as such is the best way to test
>     a PMD.
> 
> It would be good to add a link to the TestPMD into docs but it doesn't have a 
> target. We should probably add one (it maybe be possible to link to the RST
> file but that syntax isn't generally preferred).
> 
> 
> 

Testpmd user guide can have a label "_testpmd_ug" and can be referenced
here.

> > +
> > +Driver Compilation
> > +------------------
> 
> This and the next sections should then become second level headings
> 
> > +
> > +To compile PMD for Linux x86_64 gcc target, run the following "make"
> > command:
> 
> 
> s/PMD/a PMD/
> 
> Also add at the end of this line or after the command:
> 
>     This command will also automatically build testpmd.
> 

OK.

> > +
> > +.. code-block:: console
> > +
> > +   cd <DPDK-source-directory>
> > +   make install T=x86_64-native-linuxapp-gcc
> > +
> > +FreeBSD targets should use "gmake" command instead of "make".
> > +
> > +For more information, refer :ref:`Getting Started Guide for Linux
> > +<linux_gsg>` or :ref:`Getting Started Guide for FreeBSD <freebsd_gsg>`
> > depending on your platform.
> 
> s/refer/refer to the/
> 
> 
> > +Running testpmd in Linux
> > +------------------------
> > +
> 
> > +This section demonstrates how to launch ``testpmd`` in Linux.
> 
> s/launch/setup and run/
> 
> 
> > +#. Start ``testpmd`` with basic parameters:
> > +
> > +   .. code-block:: console
> > +
> > +      ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -- -i
> 
> We recently changed the docs to use "-l" instead of "-c". Can you make
> that change here as well.
> 

Will use "-l".

> 
> Thanks,
> 
> John


Thanks,
Shijith

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs
  2017-04-01 15:03 [dpdk-dev] [RFC 0/2] doc: consolidate common part among PMD docs Shijith Thotton
  2017-04-01 15:03 ` [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd Shijith Thotton
  2017-04-01 15:04 ` [dpdk-dev] [RFC 2/2] doc: include PMD build and run file in liquidio doc Shijith Thotton
@ 2017-04-06  7:51 ` Shijith Thotton
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD Shijith Thotton
                     ` (8 more replies)
  2 siblings, 9 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit; +Cc: dev

Steps for compiling PMDs and running testpmd in Linux are common among
drivers. So it can be moved to a new document and be referred from other
driver documentations.

This patchset adds a new section for compiling and testing a PMD in
Network Interface Controller Drivers documentation. Other driver docs
with similar part are replaced with reference to this section.

v1 changes:
* Address review comments from John.
 - Corrections to documentation.
 - Create a new section after NIC overview for the doc.
 - Refer the section instead of including it in PMD docs.
* Change documentation of all PMDs with common part.

RFC:
* http://dpdk.org/ml/archives/dev/2017-April/062848.html

Shijith Thotton (8):
  doc: add doc to explain compiling and testing of PMD
  doc: refer PMD compile and test section from liquidio doc
  doc: refer PMD compile and test section from bnx2x doc
  doc: refer PMD compile and test section from cxgbe doc
  doc: refer PMD compile and test section from ena doc
  doc: refer PMD compile and test section from i40e doc
  doc: refer PMD compile and test section from nfp doc
  doc: refer PMD compile and test section from qede doc

 doc/guides/nics/bnx2x.rst           | 139 ++---------------------------------
 doc/guides/nics/build_and_test.rst  | 134 ++++++++++++++++++++++++++++++++++
 doc/guides/nics/cxgbe.rst           | 109 +++-------------------------
 doc/guides/nics/ena.rst             |  66 +----------------
 doc/guides/nics/i40e.rst            |  77 ++------------------
 doc/guides/nics/index.rst           |   1 +
 doc/guides/nics/liquidio.rst        |  90 +----------------------
 doc/guides/nics/nfp.rst             | 141 ++----------------------------------
 doc/guides/nics/qede.rst            | 116 +----------------------------
 doc/guides/testpmd_app_ug/index.rst |   2 +
 10 files changed, 173 insertions(+), 702 deletions(-)
 create mode 100644 doc/guides/nics/build_and_test.rst

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:43     ` Mcnamara, John
  2017-04-06 18:30     ` Thomas Monjalon
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 2/8] doc: refer PMD compile and test section from liquidio doc Shijith Thotton
                     ` (7 subsequent siblings)
  8 siblings, 2 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit; +Cc: dev

Add a section in NIC drivers documentation to explain compiling and
testing of a PMD. It also mentions about host setup, which is required
before running testpmd.

Add label "testpmd_ug" to refer user guide.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/build_and_test.rst  | 134 ++++++++++++++++++++++++++++++++++++
 doc/guides/nics/index.rst           |   1 +
 doc/guides/testpmd_app_ug/index.rst |   2 +
 3 files changed, 137 insertions(+)
 create mode 100644 doc/guides/nics/build_and_test.rst

diff --git a/doc/guides/nics/build_and_test.rst b/doc/guides/nics/build_and_test.rst
new file mode 100644
index 0000000..4b87af6
--- /dev/null
+++ b/doc/guides/nics/build_and_test.rst
@@ -0,0 +1,134 @@
+..  BSD LICENSE
+    Copyright(c) 2017 Cavium, Inc.. All rights reserved.
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+    * Neither the name of Cavium, Inc. nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+.. _pmd_build_and_test:
+
+Compiling and testing a PMD for a NIC
+=====================================
+
+This section demonstrates how to compile and run a Poll Mode Driver (PMD) for
+the available Network Interface Cards in DPDK using TestPMD.
+
+TestPMD is one of the reference applications distributed with the DPDK. Its main
+purpose is to forward packets between Ethernet ports on a network interface and
+as such is the best way to test a PMD.
+
+Refer to the :ref:`testpmd application user guide <testpmd_ug>` for detailed
+information on how to build and run testpmd.
+
+Driver Compilation
+------------------
+
+To compile a PMD for Linux x86_64 gcc target, run the following "make" command.
+It will also build testpmd.
+
+.. code-block:: console
+
+   cd <DPDK-source-directory>
+   make install T=x86_64-native-linuxapp-gcc
+
+
+FreeBSD targets should use "gmake" command instead of "make".
+
+For more information, refer to the :ref:`Getting Started Guide for Linux <linux_gsg>`
+or :ref:`Getting Started Guide for FreeBSD <freebsd_gsg>` depending on your platform.
+
+Running testpmd in Linux
+------------------------
+
+This section demonstrates how to setup and run ``testpmd`` in Linux.
+
+#. Mount huge pages:
+
+   .. code-block:: console
+
+      mkdir /mnt/huge
+      mount -t hugetlbfs nodev /mnt/huge
+
+#. Request huge pages:
+
+   .. code-block:: console
+
+      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
+
+#. Load ``igb_uio`` or ``vfio-pci`` driver:
+
+   .. code-block:: console
+
+      modprobe uio
+      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+
+   or
+
+   .. code-block:: console
+
+      modprobe vfio-pci
+
+#. Setup VFIO permissions for regular users before binding to ``vfio-pci``:
+
+   .. code-block:: console
+
+      sudo chmod a+x /dev/vfio
+
+      sudo chmod 0666 /dev/vfio/*
+
+#. Bind the adapters to ``igb_uio`` or ``vfio-pci`` loaded in the previous step:
+
+   .. code-block:: console
+
+      ./usertools/dpdk-devbind.py --bind igb_uio DEVICE1 DEVICE2 ...
+
+   Or setup VFIO permissions for regular users and then bind to ``vfio-pci``:
+
+   .. code-block:: console
+
+      ./usertools/dpdk-devbind.py --bind vfio-pci DEVICE1 DEVICE2 ...
+
+   .. note::
+
+      DEVICE1, DEVICE2 are specified via PCI "domain:bus:slot.func" syntax or
+      "bus:slot.func" syntax.
+
+#. Start ``testpmd`` with basic parameters:
+
+   .. code-block:: console
+
+      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i
+
+   Successful execution will show initialization messages from EAL, PMD and
+   testpmd application. A prompt will be displayed at the end for user commands
+   as interactive mode (``-i``) is on.
+
+   .. code-block:: console
+
+      testpmd>
+
+   Refer to the :ref:`testpmd runtime functions <testpmd_runtime>` for a list
+   of available commands.
diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
index 4537113..245b53d 100644
--- a/doc/guides/nics/index.rst
+++ b/doc/guides/nics/index.rst
@@ -36,6 +36,7 @@ Network Interface Controller Drivers
     :numbered:
 
     overview
+    build_and_test
     avp
     bnx2x
     bnxt
diff --git a/doc/guides/testpmd_app_ug/index.rst b/doc/guides/testpmd_app_ug/index.rst
index 1c39a17..61a9121 100644
--- a/doc/guides/testpmd_app_ug/index.rst
+++ b/doc/guides/testpmd_app_ug/index.rst
@@ -28,6 +28,8 @@
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+.. _testpmd_ug:
+
 Testpmd Application User Guide
 ==============================
 
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 2/8] doc: refer PMD compile and test section from liquidio doc
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:43     ` Mcnamara, John
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 3/8] doc: refer PMD compile and test section from bnx2x doc Shijith Thotton
                     ` (6 subsequent siblings)
  8 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/liquidio.rst | 90 ++------------------------------------------
 1 file changed, 3 insertions(+), 87 deletions(-)

diff --git a/doc/guides/nics/liquidio.rst b/doc/guides/nics/liquidio.rst
index 9ffdc35..385786c 100644
--- a/doc/guides/nics/liquidio.rst
+++ b/doc/guides/nics/liquidio.rst
@@ -80,90 +80,6 @@ Please note that enabling debugging options may affect system performance.
   Toggle display of register reads and writes.
 
 
-.. _lio_driver-compilation:
-
-Driver Compilation
-------------------
-
-To compile LiquidIO PMD for Linux x86_64 gcc target, run the following "make"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   make install T=x86_64-native-linuxapp-gcc
-
-
-Sample Application Notes
-------------------------
-
-This section demonstrates how to launch ``testpmd`` with LiquidIO® CN23XX
-device managed by ``librte_pmd_lio`` in Linux operating system.
-
-#. Mount huge pages:
-
-   .. code-block:: console
-
-      mkdir /mnt/huge
-      mount -t hugetlbfs nodev /mnt/huge
-
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
-
-#. Load ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the LiquidIO VFs to ``vfio-pci`` loaded in previous step:
-
-   Setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      sudo chmod a+x /dev/vfio
-
-      sudo chmod 0666 /dev/vfio/*
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:03:00.3 0000:03:08.3
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./build/app/testpmd -c 0xf -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      EAL: PCI device 0000:03:00.3 on NUMA socket 0
-      EAL:   probe driver: 177d:9712 net_liovf
-      EAL:   using IOMMU type 1 (Type 1)
-      PMD: net_liovf[03:00.3]INFO: DEVICE : CN23XX VF
-      EAL: PCI device 0000:03:08.3 on NUMA socket 0
-      EAL:   probe driver: 177d:9712 net_liovf
-      PMD: net_liovf[03:08.3]INFO: DEVICE : CN23XX VF
-      Interactive-mode selected
-      USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=171456, size=2176, socket=0
-      Configuring Port 0 (socket 0)
-      PMD: net_liovf[03:00.3]INFO: Starting port 0
-      Port 0: F2:A8:1B:5E:B4:66
-      Configuring Port 1 (socket 0)
-      PMD: net_liovf[03:08.3]INFO: Starting port 1
-      Port 1: 32:76:CC:EE:56:D7
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Port 1 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
-
-
 SR-IOV: Prerequisites and Sample Application Notes
 --------------------------------------------------
 
@@ -248,9 +164,9 @@ This section provides instructions to configure SR-IOV with Linux OS.
 
 #. Running testpmd
 
-   Refer :ref:`notes above <lio_driver-compilation>`
-   to compile and run ``testpmd`` application.
-   Use ``igb_uio`` instead of ``vfio-pci`` in VM.
+   Refer to the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>` to run
+   ``testpmd`` application. Use ``igb_uio`` instead of ``vfio-pci`` in VM.
 
 
 Limitations
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 3/8] doc: refer PMD compile and test section from bnx2x doc
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD Shijith Thotton
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 2/8] doc: refer PMD compile and test section from liquidio doc Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:45     ` Mcnamara, John
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 4/8] doc: refer PMD compile and test section from cxgbe doc Shijith Thotton
                     ` (5 subsequent siblings)
  8 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit, Harish Patil, Rasesh Mody; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/bnx2x.rst | 139 ++--------------------------------------------
 1 file changed, 5 insertions(+), 134 deletions(-)

diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index 17780ed..4ecfa0b 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -123,143 +123,14 @@ enabling debugging options may affect system performance.
 
 .. _bnx2x_driver-compilation:
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-BNX2X PMD for Linux x86_64 gcc target, run the following "make"
-command::
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-gcc install
-
-To compile BNX2X PMD for Linux x86_64 clang target, run the following "make"
-command::
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-clang install
-
-To compile BNX2X PMD for Linux i686 gcc target, run the following "make"
-command::
-
-   cd <DPDK-source-directory>
-   make config T=i686-native-linuxapp-gcc install
-
-To compile BNX2X PMD for Linux i686 gcc target, run the following "make"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   make config T=i686-native-linuxapp-gcc install
-
-To compile BNX2X PMD for FreeBSD x86_64 clang target, run the following "gmake"
-command::
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-clang install
-
-To compile BNX2X PMD for FreeBSD x86_64 gcc target, run the following "gmake"
-command::
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc49 CC=gcc49
-
-To compile BNX2X PMD for FreeBSD x86_64 gcc target, run the following "gmake"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc49 CC=gcc49
-
-Linux
------
-
-.. _bnx2x_Linux-installation:
-
-Linux Installation
-~~~~~~~~~~~~~~~~~~
-
-Sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-This section demonstrates how to launch ``testpmd`` with QLogic 578xx
-devices managed by ``librte_pmd_bnx2x`` in Linux operating system.
-
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
-
-#. Load ``igb_uio`` or ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   or
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the QLogic adapters to ``igb_uio`` or ``vfio-pci`` loaded in the
-   previous step::
-
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1
-
-   or
-
-   Setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      sudo chmod a+x /dev/vfio
-
-      sudo chmod 0666 /dev/vfio/*
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:84:00.0 0000:84:00.1
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
+Driver compilation and testing
+------------------------------
 
-      [...]
-      EAL: PCI device 0000:84:00.0 on NUMA socket 1
-      EAL:   probe driver: 14e4:168e rte_bnx2x_pmd
-      EAL:   PCI memory mapped at 0x7f14f6fe5000
-      EAL:   PCI memory mapped at 0x7f14f67e5000
-      EAL:   PCI memory mapped at 0x7f15fbd9b000
-      EAL: PCI device 0000:84:00.1 on NUMA socket 1
-      EAL:   probe driver: 14e4:168e rte_bnx2x_pmd
-      EAL:   PCI memory mapped at 0x7f14f5fe5000
-      EAL:   PCI memory mapped at 0x7f14f57e5000
-      EAL:   PCI memory mapped at 0x7f15fbd4f000
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      PMD: bnx2x_dev_tx_queue_setup(): fp[00] req_bd=512, thresh=512,
-                   usable_bd=1020, total_bd=1024,
-                                tx_pages=4
-      PMD: bnx2x_dev_rx_queue_setup(): fp[00] req_bd=128, thresh=0,
-                   usable_bd=510, total_bd=512,
-                                rx_pages=1, cq_pages=8
-      PMD: bnx2x_print_adapter_info():
-      [...]
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Port 1 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 SR-IOV: Prerequisites and sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------------------------------
 
 This section provides instructions to configure SR-IOV with Linux OS.
 
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 4/8] doc: refer PMD compile and test section from cxgbe doc
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
                     ` (2 preceding siblings ...)
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 3/8] doc: refer PMD compile and test section from bnx2x doc Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:45     ` Mcnamara, John
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 5/8] doc: refer PMD compile and test section from ena doc Shijith Thotton
                     ` (4 subsequent siblings)
  8 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit, Rahul Lakkireddy; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/cxgbe.rst | 109 ++++------------------------------------------
 1 file changed, 9 insertions(+), 100 deletions(-)

diff --git a/doc/guides/nics/cxgbe.rst b/doc/guides/nics/cxgbe.rst
index 308a926..d193f66 100644
--- a/doc/guides/nics/cxgbe.rst
+++ b/doc/guides/nics/cxgbe.rst
@@ -125,24 +125,11 @@ enabling debugging options may affect system performance.
 
 .. _driver-compilation:
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-To compile CXGBE PMD for Linux x86_64 gcc target, run the following "make"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-gcc install
-
-To compile CXGBE PMD for FreeBSD x86_64 clang target, run the following "gmake"
-command:
-
-.. code-block:: console
+Driver compilation and testing
+------------------------------
 
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-clang install
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 Linux
 -----
@@ -218,13 +205,6 @@ Running testpmd
 This section demonstrates how to launch **testpmd** with Chelsio T5
 devices managed by librte_pmd_cxgbe in Linux operating system.
 
-#. Change to DPDK source directory where the target has been compiled in
-   section :ref:`driver-compilation`:
-
-   .. code-block:: console
-
-      cd <DPDK-source-directory>
-
 #. Load the kernel module:
 
    .. code-block:: console
@@ -255,89 +235,18 @@ devices managed by librte_pmd_cxgbe in Linux operating system.
 
       modprobe -ar cxgb4 csiostor
 
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
-
-#. Mount huge pages:
-
-   .. code-block:: console
-
-      mkdir /mnt/huge
-      mount -t hugetlbfs nodev /mnt/huge
-
-#. Load igb_uio or vfio-pci driver:
-
-   .. code-block:: console
-
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   or
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the Chelsio T5 adapters to igb_uio or vfio-pci loaded in the previous
-   step:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:02:00.4
-
-   or
+#. Running testpmd
 
-   Setup VFIO permissions for regular users and then bind to vfio-pci:
-
-   .. code-block:: console
-
-      sudo chmod a+x /dev/vfio
-
-      sudo chmod 0666 /dev/vfio/*
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:02:00.4
+   Refer to the section :ref:`driver-compilation`.
 
    .. note::
 
       Currently, CXGBE PMD only supports the binding of PF4 for Chelsio T5 NICs.
 
-#. Start testpmd with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 0000:02:00.4 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      EAL: PCI device 0000:02:00.4 on NUMA socket -1
-      EAL:   probe driver: 1425:5401 rte_cxgbe_pmd
-      EAL:   PCI memory mapped at 0x7fd7c0200000
-      EAL:   PCI memory mapped at 0x7fd77cdfd000
-      EAL:   PCI memory mapped at 0x7fd7c10b7000
-      PMD: rte_cxgbe_pmd: fw: 1.13.32.0, TP: 0.1.4.8
-      PMD: rte_cxgbe_pmd: Coming up as MASTER: Initializing adapter
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      Port 0: 00:07:43:2D:EA:C0
-      Configuring Port 1 (socket 0)
-      Port 1: 00:07:43:2D:EA:C8
-      Checking link statuses...
-      PMD: rte_cxgbe_pmd: Port0: passive DA port module inserted
-      PMD: rte_cxgbe_pmd: Port1: passive DA port module inserted
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Port 1 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
-
-.. note::
+   .. note::
 
-   Flow control pause TX/RX is disabled by default and can be enabled via
-   testpmd. Refer section :ref:`flow-control` for more details.
+      Flow control pause TX/RX is disabled by default and can be enabled via
+      testpmd. Refer section :ref:`flow-control` for more details.
 
 FreeBSD
 -------
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 5/8] doc: refer PMD compile and test section from ena doc
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
                     ` (3 preceding siblings ...)
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 4/8] doc: refer PMD compile and test section from cxgbe doc Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:45     ` Mcnamara, John
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 6/8] doc: refer PMD compile and test section from i40e doc Shijith Thotton
                     ` (3 subsequent siblings)
  8 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit, Jan Medala, Jakub Palider,
	Netanel Belgazal, Evgeny Schemeilin
  Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/ena.rst | 66 +++----------------------------------------------
 1 file changed, 4 insertions(+), 62 deletions(-)

diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index c2d6b85..db95e78 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -140,16 +140,11 @@ Configuration information
      will be the minimum between the requested size and the maximal receive/transmit
      supported by the device.
 
-Building DPDK
--------------
-
-See the :ref:`DPDK Getting Started Guide for Linux <linux_gsg>` for
-instructions on how to build DPDK.
-
-By default the ENA PMD library will be built into the DPDK library.
+Driver compilation and testing
+------------------------------
 
-For configuring and using UIO and VFIO frameworks, please also refer :ref:`the
-documentation that comes with DPDK suite <linux_gsg>`.
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 Supported ENA adapters
 ----------------------
@@ -196,56 +191,3 @@ Prerequisites
 
 At this point the system should be ready to run DPDK applications. Once the
 application runs to completion, the ENA can be detached from igb_uio if necessary.
-
-Usage example
--------------
-
-This section demonstrates how to launch **testpmd** with Amazon ENA
-devices managed by librte_pmd_ena.
-
-#. Load the kernel modules:
-
-   .. code-block:: console
-
-      modprobe uio
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   .. note::
-
-      Currently Amazon ENA PMD driver depends on igb_uio user space I/O kernel module
-
-#. Mount and request huge pages:
-
-   .. code-block:: console
-
-      mount -t hugetlbfs nodev /mnt/hugepages
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-#. Bind UIO driver to ENA device (using provided by DPDK binding tool):
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind=igb_uio 0000:02:00.1
-
-#. Start testpmd with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      EAL: PCI device 0000:02:00.1 on NUMA socket -1
-      EAL:   probe driver: 1d0f:ec20 rte_ena_pmd
-      EAL:   PCI memory mapped at 0x7f9b6c400000
-      PMD: eth_ena_dev_init(): Initializing 0:2:0.1
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      Port 0: 00:00:00:11:00:01
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 6/8] doc: refer PMD compile and test section from i40e doc
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
                     ` (4 preceding siblings ...)
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 5/8] doc: refer PMD compile and test section from ena doc Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:46     ` Mcnamara, John
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 7/8] doc: refer PMD compile and test section from nfp doc Shijith Thotton
                     ` (2 subsequent siblings)
  8 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit, Helin Zhang, Jingjing Wu; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/i40e.rst | 77 ++++--------------------------------------------
 1 file changed, 5 insertions(+), 72 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 6ae1d46..f31e5f0 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -131,82 +131,15 @@ Please note that enabling debugging options may affect system performance.
   Interrupt Throttling interval.
 
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-To compile the I40E PMD see :ref:`Getting Started Guide for Linux <linux_gsg>` or
-:ref:`Getting Started Guide for FreeBSD <freebsd_gsg>` depending on your platform.
-
-
-Linux
------
-
-
-Running testpmd
-~~~~~~~~~~~~~~~
-
-This section demonstrates how to launch ``testpmd`` with Intel XL710/X710
-devices managed by ``librte_pmd_i40e`` in the Linux operating system.
-
-#. Load ``igb_uio`` or ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      modprobe uio
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   or
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the XL710/X710 adapters to ``igb_uio`` or ``vfio-pci`` loaded in the previous step:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:83:00.0
-
-   Or setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:83:00.0
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 83:00.0 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      ...
-      EAL: PCI device 0000:83:00.0 on NUMA socket 1
-      EAL: probe driver: 8086:1572 rte_i40e_pmd
-      EAL: PCI memory mapped at 0x7f7f80000000
-      EAL: PCI memory mapped at 0x7f7f80800000
-      PMD: eth_i40e_dev_init(): FW 5.0 API 1.5 NVM 05.00.02 eetrack 8000208a
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      ...
-
-      PMD: i40e_dev_rx_queue_setup(): Rx Burst Bulk Alloc Preconditions are
-      satisfied.Rx Burst Bulk Alloc function will be used on port=0, queue=0.
-
-      ...
-      Port 0: 68:05:CA:26:85:84
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Done
+Driver compilation and testing
+------------------------------
 
-      testpmd>
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 
 SR-IOV: Prerequisites and sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------------------------------
 
 #. Load the kernel module:
 
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 7/8] doc: refer PMD compile and test section from nfp doc
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
                     ` (5 preceding siblings ...)
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 6/8] doc: refer PMD compile and test section from i40e doc Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:46     ` Mcnamara, John
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 8/8] doc: refer PMD compile and test section from qede doc Shijith Thotton
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
  8 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit, Alejandro Lucero; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/nfp.rst | 141 +++---------------------------------------------
 1 file changed, 6 insertions(+), 135 deletions(-)

diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index b643e5b..c732fb1 100644
--- a/doc/guides/nics/nfp.rst
+++ b/doc/guides/nics/nfp.rst
@@ -81,85 +81,15 @@ Once DPDK is built all the DPDK apps and examples include support for
 the NFP PMD.
 
 
-System configuration
---------------------
-
-Using the NFP PMD is not different to using other PMDs. Usual steps are:
-
-#. **Configure hugepages:** All major Linux distributions have the hugepages
-   functionality enabled by default. By default this allows the system uses for
-   working with transparent hugepages. But in this case some hugepages need to
-   be created/reserved for use with the DPDK through the hugetlbfs file system.
-   First the virtual file system need to be mounted:
-
-   .. code-block:: console
-
-      mount -t hugetlbfs none /mnt/hugetlbfs
-
-   The command uses the common mount point for this file system and it needs to
-   be created if necessary.
-
-   Configuring hugepages is performed via sysfs:
-
-   .. code-block:: console
-
-      /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-   This sysfs file is used to specify the number of hugepages to reserve.
-   For example:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-   This will reserve 2GB of memory using 1024 2MB hugepages. The file may be
-   read to see if the operation was performed correctly:
-
-   .. code-block:: console
-
-      cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-   The number of unused hugepages may also be inspected.
-
-   Before executing the DPDK app it should match the value of nr_hugepages.
-
-   .. code-block:: console
-
-      cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages
-
-   The hugepages reservation should be performed at system initialization and
-   it is usual to use a kernel parameter for configuration. If the reservation
-   is attempted on a busy system it will likely fail. Reserving memory for
-   hugepages may be done adding the following to the grub kernel command line:
-
-   .. code-block:: console
-
-      default_hugepagesz=1M hugepagesz=2M hugepages=1024
-
-   This will reserve 2GBytes of memory using 2Mbytes huge pages.
-
-   Finally, for a NUMA system the allocation needs to be made on the correct
-   NUMA node. In a DPDK app there is a master core which will (usually) perform
-   memory allocation. It is important that some of the hugepages are reserved
-   on the NUMA memory node where the network device is attached. This is because
-   of a restriction in DPDK by which TX and RX descriptors rings must be created
-   on the master code.
-
-   Per-node allocation of hugepages may be inspected and controlled using sysfs.
-   For example:
-
-   .. code-block:: console
+Driver compilation and testing
+------------------------------
 
-      cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
-   For a NUMA system there will be a specific hugepage directory per node
-   allowing control of hugepage reservation. A common problem may occur when
-   hugepages reservation is performed after the system has been working for
-   some time. Configuration using the global sysfs hugepage interface will
-   succeed but the per-node allocations may be unsatisfactory.
 
-   The number of hugepages that need to be reserved depends on how the app uses
-   TX and RX descriptors, and packets mbufs.
+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
@@ -191,62 +121,3 @@ Using the NFP PMD is not different to using other PMDs. Usual steps are:
    -k option shows the device driver, if any, that devices are bound to.
    Depending on the modules loaded at this point the new PCI devices may be
    bound to nfp_netvf driver.
-
-#. **To install the uio kernel module (manually):** All major Linux
-   distributions have support for this kernel module so it is straightforward
-   to install it:
-
-   .. code-block:: console
-
-      modprobe uio
-
-   The module should now be listed by the lsmod command.
-
-#. **To install the igb_uio kernel module (manually):** This module is part
-   of DPDK sources and configured by default (CONFIG_RTE_EAL_IGB_UIO=y).
-
-   .. code-block:: console
-
-      modprobe igb_uio.ko
-
-   The module should now be listed by the lsmod command.
-
-   Depending on which NFP modules are loaded, it could be necessary to
-   detach NFP devices from the nfp_netvf module. If this is the case the
-   device needs to be unbound, for example:
-
-   .. code-block:: console
-
-      echo 0000:03:08.0 > /sys/bus/pci/devices/0000:03:08.0/driver/unbind
-
-      lspci -d19ee: -k
-
-   The output of lspci should now show that 0000:03:08.0 is not bound to
-   any driver.
-
-   The next step is to add the NFP PCI ID to the IGB UIO driver:
-
-   .. code-block:: console
-
-      echo 19ee 6003 > /sys/bus/pci/drivers/igb_uio/new_id
-
-   And then to bind the device to the igb_uio driver:
-
-   .. code-block:: console
-
-      echo 0000:03:08.0 > /sys/bus/pci/drivers/igb_uio/bind
-
-      lspci -d19ee: -k
-
-   lspci should show that device bound to igb_uio driver.
-
-#. **Using scripts to install and bind modules:** DPDK provides scripts which are
-   useful for installing the UIO modules and for binding the right device to those
-   modules avoiding doing so manually:
-
-   * **dpdk-setup.sh**
-   * **dpdk-devbind.py**
-
-   Configuration may be performed by running dpdk-setup.sh which invokes
-   dpdk-devbind.py as needed. Executing dpdk-setup.sh will display a menu of
-   configuration options.
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH 8/8] doc: refer PMD compile and test section from qede doc
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
                     ` (6 preceding siblings ...)
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 7/8] doc: refer PMD compile and test section from nfp doc Shijith Thotton
@ 2017-04-06  7:51   ` Shijith Thotton
  2017-04-06 16:46     ` Mcnamara, John
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
  8 siblings, 1 reply; 42+ messages in thread
From: Shijith Thotton @ 2017-04-06  7:51 UTC (permalink / raw)
  To: John Mcnamara, Ferruh Yigit, Rasesh Mody, Harish Patil; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/qede.rst | 116 ++---------------------------------------------
 1 file changed, 4 insertions(+), 112 deletions(-)

diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
index eacb3da..4142057 100644
--- a/doc/guides/nics/qede.rst
+++ b/doc/guides/nics/qede.rst
@@ -124,119 +124,11 @@ enabling debugging options may affect system performance.
   Empty string indicates driver will pick up the firmware file
   from the default location.
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-To compile QEDE PMD for Linux x86_64 gcc target, run the following ``make``
-command::
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-gcc install
-
-To compile QEDE PMD for Linux x86_64 clang target, run the following ``make``
-command::
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-clang install
-
-To compile QEDE PMD for FreeBSD x86_64 clang target, run the following ``gmake``
-command::
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-clang install
-
-To compile QEDE PMD for FreeBSD x86_64 gcc target, run the following ``gmake``
-command::
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=\
-                                        /usr/local/lib/gcc49 CC=gcc49
-
-
-Sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-This section demonstrates how to launch ``testpmd`` with QLogic 4xxxx
-devices managed by ``librte_pmd_qede`` in Linux operating system.
-
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/ \
-                                                                nr_hugepages
-
-#. Load ``igb_uio`` driver:
-
-   .. code-block:: console
-
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-#. Bind the QLogic 4xxxx adapters to ``igb_uio`` loaded in the
-   previous step:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1 \
-                                              0000:84:00.2 0000:84:00.3
-
-#. Start ``testpmd`` with basic parameters:
-   (Enable QEDE_DEBUG_INFO=y to view informational messages)
-
-   .. code-block:: console
-
-      testpmd -l 0,4-11 -n 4 -- -i --nb-cores=8 --portmask=0xf --rxd=4096 \
-      --txd=4096 --txfreet=4068 --enable-rx-cksum --rxq=4 --txq=4 \
-      --rss-ip --rss-udp
-
-      [...]
-
-    EAL: PCI device 0000:84:00.0 on NUMA socket 1
-    EAL:   probe driver: 1077:1634 rte_qede_pmd
-    EAL:   Not managed by a supported kernel driver, skipped
-    EAL: PCI device 0000:84:00.1 on NUMA socket 1
-    EAL:   probe driver: 1077:1634 rte_qede_pmd
-    EAL:   Not managed by a supported kernel driver, skipped
-    EAL: PCI device 0000:88:00.0 on NUMA socket 1
-    EAL:   probe driver: 1077:1656 rte_qede_pmd
-    EAL:   PCI memory mapped at 0x7f738b200000
-    EAL:   PCI memory mapped at 0x7f738b280000
-    EAL:   PCI memory mapped at 0x7f738b300000
-    PMD: Chip details : BB1
-    PMD: Driver version : QEDE PMD 8.7.9.0_1.0.0
-    PMD: Firmware version : 8.7.7.0
-    PMD: Management firmware version : 8.7.8.0
-    PMD: Firmware file : /lib/firmware/qed/qed_init_values_zipped-8.7.7.0.bin
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_common_dev_init:macaddr \
-                                                        00:0e:1e:d2:09:9c
-      [...]
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_tx_queue_setup:txq 0 num_desc 4096 \
-                                                tx_free_thresh 4068 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_tx_queue_setup:txq 1 num_desc 4096 \
-                                                tx_free_thresh 4068 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_tx_queue_setup:txq 2 num_desc 4096 \
-                                                 tx_free_thresh 4068 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_tx_queue_setup:txq 3 num_desc 4096 \
-                                                 tx_free_thresh 4068 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_rx_queue_setup:rxq 0 num_desc 4096 \
-                                                rx_buf_size=2148 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_rx_queue_setup:rxq 1 num_desc 4096 \
-                                                rx_buf_size=2148 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_rx_queue_setup:rxq 2 num_desc 4096 \
-                                                rx_buf_size=2148 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_rx_queue_setup:rxq 3 num_desc 4096 \
-                                                rx_buf_size=2148 socket 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_dev_start:port 0
-    [QEDE PMD: (84:00.0:dpdk-port-0)]qede_dev_start:link status: down
-      [...]
-    Checking link statuses...
-    Port 0 Link Up - speed 25000 Mbps - full-duplex
-    Port 1 Link Up - speed 25000 Mbps - full-duplex
-    Port 2 Link Up - speed 25000 Mbps - full-duplex
-    Port 3 Link Up - speed 25000 Mbps - full-duplex
-    Done
-    testpmd>
+Driver compilation and testing
+------------------------------
 
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 SR-IOV: Prerequisites and Sample Application Notes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD Shijith Thotton
@ 2017-04-06 16:43     ` Mcnamara, John
  2017-04-06 18:30     ` Thomas Monjalon
  1 sibling, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:43 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh; +Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
> 
> Add a section in NIC drivers documentation to explain compiling and
> testing of a PMD. It also mentions about host setup, which is required
> before running testpmd.
> 
> Add label "testpmd_ug" to refer user guide.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>


Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 2/8] doc: refer PMD compile and test section from liquidio doc
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 2/8] doc: refer PMD compile and test section from liquidio doc Shijith Thotton
@ 2017-04-06 16:43     ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:43 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh; +Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 2/8] doc: refer PMD compile and test section from liquidio
> doc
> 
> Refer the section which explains driver compilation and running of testpmd
> in Linux, instead of describing it in driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

Acked-by: John McNamara <john.mcnamara@intel.com>




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 3/8] doc: refer PMD compile and test section from bnx2x doc
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 3/8] doc: refer PMD compile and test section from bnx2x doc Shijith Thotton
@ 2017-04-06 16:45     ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:45 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh, Harish Patil, Rasesh Mody; +Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Harish Patil <harish.patil@cavium.com>; Rasesh
> Mody <rasesh.mody@cavium.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 3/8] doc: refer PMD compile and test section from bnx2x
> doc
> 
> Refer the section which explains driver compilation and running of testpmd
> in Linux, instead of describing it in driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

I've checked this from a documentation point of view but the PMD
maintainer should also check that the global build instructions
are valid for the PMD.

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 4/8] doc: refer PMD compile and test section from cxgbe doc
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 4/8] doc: refer PMD compile and test section from cxgbe doc Shijith Thotton
@ 2017-04-06 16:45     ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:45 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh, Rahul Lakkireddy; +Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 4/8] doc: refer PMD compile and test section from cxgbe
> doc
> 
> Refer the section which explains driver compilation and running of testpmd
> in Linux, instead of describing it in driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

I've checked this from a documentation point of view but the PMD
maintainer should also check that the global build instructions
are valid for the PMD.

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 5/8] doc: refer PMD compile and test section from ena doc
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 5/8] doc: refer PMD compile and test section from ena doc Shijith Thotton
@ 2017-04-06 16:45     ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:45 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh, Jan Medala, Jakub Palider,
	Netanel Belgazal, Evgeny Schemeilin
  Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Jan Medala <jan@semihalf.com>; Jakub Palider
> <jpa@semihalf.com>; Netanel Belgazal <netanel@amazon.com>; Evgeny
> Schemeilin <evgenys@amazon.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 5/8] doc: refer PMD compile and test section from ena doc
> 
> Refer the section which explains driver compilation and running of testpmd
> in Linux, instead of describing it in driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

I've checked this from a documentation point of view but the PMD
maintainer should also check that the global build instructions
are valid for the PMD.

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 6/8] doc: refer PMD compile and test section from i40e doc
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 6/8] doc: refer PMD compile and test section from i40e doc Shijith Thotton
@ 2017-04-06 16:46     ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:46 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh, Zhang, Helin, Wu, Jingjing; +Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Zhang, Helin <helin.zhang@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 6/8] doc: refer PMD compile and test section from i40e doc
> 
> Refer the section which explains driver compilation and running of testpmd
> in Linux, instead of describing it in driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

I've checked this from a documentation point of view but the PMD
maintainer should also check that the global build instructions
are valid for the PMD.

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 7/8] doc: refer PMD compile and test section from nfp doc
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 7/8] doc: refer PMD compile and test section from nfp doc Shijith Thotton
@ 2017-04-06 16:46     ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:46 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh, Alejandro Lucero; +Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Alejandro Lucero
> <alejandro.lucero@netronome.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 7/8] doc: refer PMD compile and test section from nfp doc
> 
> Refer the section which explains driver compilation and running of testpmd
> in Linux, instead of describing it in driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

I've checked this from a documentation point of view but the PMD
maintainer should also check that the global build instructions
are valid for the PMD.

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 8/8] doc: refer PMD compile and test section from qede doc
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 8/8] doc: refer PMD compile and test section from qede doc Shijith Thotton
@ 2017-04-06 16:46     ` Mcnamara, John
  0 siblings, 0 replies; 42+ messages in thread
From: Mcnamara, John @ 2017-04-06 16:46 UTC (permalink / raw)
  To: Shijith Thotton, Yigit, Ferruh, Rasesh Mody, Harish Patil; +Cc: dev



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Thursday, April 6, 2017 8:52 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Rasesh Mody <rasesh.mody@cavium.com>; Harish
> Patil <harish.patil@cavium.com>
> Cc: dev@dpdk.org
> Subject: [PATCH 8/8] doc: refer PMD compile and test section from qede doc
> 
> Refer the section which explains driver compilation and running of testpmd
> in Linux, instead of describing it in driver documentation.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

I've checked this from a documentation point of view but the PMD
maintainer should also check that the global build instructions
are valid for the PMD.

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD Shijith Thotton
  2017-04-06 16:43     ` Mcnamara, John
@ 2017-04-06 18:30     ` Thomas Monjalon
  2017-04-07  7:07       ` Shijith Thotton
  1 sibling, 1 reply; 42+ messages in thread
From: Thomas Monjalon @ 2017-04-06 18:30 UTC (permalink / raw)
  To: Shijith Thotton, John Mcnamara; +Cc: dev, Ferruh Yigit

2017-04-06 13:21, Shijith Thotton:
> Add a section in NIC drivers documentation to explain compiling and
> testing of a PMD. It also mentions about host setup, which is required
> before running testpmd.
> 
> Add label "testpmd_ug" to refer user guide.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>

It is really good to factorize documentation.

This doc is about testpmd in Linux
and does not refer to FreeBSD.
Do we assume to take Linux as the reference?
Should we refer to the Linux Getting Started Guide instead?

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-06 18:30     ` Thomas Monjalon
@ 2017-04-07  7:07       ` Shijith Thotton
  2017-04-07  9:23         ` Mcnamara, John
  2017-04-07  9:42         ` Jerin Jacob
  0 siblings, 2 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-07  7:07 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: John Mcnamara, dev, Ferruh Yigit

On Thu, Apr 06, 2017 at 08:30:21PM +0200, Thomas Monjalon wrote:
> 2017-04-06 13:21, Shijith Thotton:
> > Add a section in NIC drivers documentation to explain compiling and
> > testing of a PMD. It also mentions about host setup, which is required
> > before running testpmd.
> > 
> > Add label "testpmd_ug" to refer user guide.
> > 
> > Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> 
> It is really good to factorize documentation.
> 
> This doc is about testpmd in Linux
> and does not refer to FreeBSD.
> Do we assume to take Linux as the reference?

I can submit v2 with a subsection for running testpmd in FreeBSD.

> Should we refer to the Linux Getting Started Guide instead?

Agree that the new section just has steps from getting started guide. It may
seem redundant from a developer point of view, but hope it will be useful to
users.

Please share thoughts.

Thanks,
Shijith

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-07  7:07       ` Shijith Thotton
@ 2017-04-07  9:23         ` Mcnamara, John
  2017-04-07  9:34           ` Thomas Monjalon
  2017-04-07  9:42         ` Jerin Jacob
  1 sibling, 1 reply; 42+ messages in thread
From: Mcnamara, John @ 2017-04-07  9:23 UTC (permalink / raw)
  To: Shijith Thotton, Thomas Monjalon; +Cc: dev, Yigit, Ferruh



> -----Original Message-----
> From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> Sent: Friday, April 7, 2017 8:07 AM
> To: Thomas Monjalon <thomas.monjalon@6wind.com>
> Cc: Mcnamara, John <john.mcnamara@intel.com>; dev@dpdk.org; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and
> testing of PMD
> 
> On Thu, Apr 06, 2017 at 08:30:21PM +0200, Thomas Monjalon wrote:
> > 2017-04-06 13:21, Shijith Thotton:
> > > Add a section in NIC drivers documentation to explain compiling and
> > > testing of a PMD. It also mentions about host setup, which is
> > > required before running testpmd.
> > >
> > > Add label "testpmd_ug" to refer user guide.
> > >
> > > Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> >
> > It is really good to factorize documentation.
> >
> > This doc is about testpmd in Linux
> > and does not refer to FreeBSD.
> > Do we assume to take Linux as the reference?
> 
> I can submit v2 with a subsection for running testpmd in FreeBSD.

Hi,

> I can submit v2 with a subsection for running testpmd in FreeBSD.

I don't think that is necessary. You patch already calls out the
Linux and FreeBSD Getting Started Guides. I think that is enough.


@tmonjalo
For me this new "Compiling and testing a PMD for a NIC" section
is a way of avoiding duplicate sections in the NIC guides. I don't
think it has to be a definitive guide to TestPMD.

As and aside, I would like to do something similar with the sample
app guides, i.e., have one section on compilation that the other
app guides can refer to. I'll try to add that in the next release.

So for me this patchset is okay as it is.

John

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-07  9:23         ` Mcnamara, John
@ 2017-04-07  9:34           ` Thomas Monjalon
  0 siblings, 0 replies; 42+ messages in thread
From: Thomas Monjalon @ 2017-04-07  9:34 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: Shijith Thotton, dev, Yigit, Ferruh

2017-04-07 09:23, Mcnamara, John:
> 
> > -----Original Message-----
> > From: Shijith Thotton [mailto:shijith.thotton@caviumnetworks.com]
> > Sent: Friday, April 7, 2017 8:07 AM
> > To: Thomas Monjalon <thomas.monjalon@6wind.com>
> > Cc: Mcnamara, John <john.mcnamara@intel.com>; dev@dpdk.org; Yigit, Ferruh
> > <ferruh.yigit@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and
> > testing of PMD
> > 
> > On Thu, Apr 06, 2017 at 08:30:21PM +0200, Thomas Monjalon wrote:
> > > 2017-04-06 13:21, Shijith Thotton:
> > > > Add a section in NIC drivers documentation to explain compiling and
> > > > testing of a PMD. It also mentions about host setup, which is
> > > > required before running testpmd.
> > > >
> > > > Add label "testpmd_ug" to refer user guide.
> > > >
> > > > Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> > >
> > > It is really good to factorize documentation.
> > >
> > > This doc is about testpmd in Linux
> > > and does not refer to FreeBSD.
> > > Do we assume to take Linux as the reference?
> > 
> > I can submit v2 with a subsection for running testpmd in FreeBSD.
> 
> Hi,
> 
> > I can submit v2 with a subsection for running testpmd in FreeBSD.
> 
> I don't think that is necessary. You patch already calls out the
> Linux and FreeBSD Getting Started Guides. I think that is enough.
> 
> 
> @tmonjalo
> For me this new "Compiling and testing a PMD for a NIC" section
> is a way of avoiding duplicate sections in the NIC guides. I don't
> think it has to be a definitive guide to TestPMD.
> 
> As and aside, I would like to do something similar with the sample
> app guides, i.e., have one section on compilation that the other
> app guides can refer to. I'll try to add that in the next release.
> 
> So for me this patchset is okay as it is.

OK
I just wanted to start discussing about more factorization.
Thanks for leading this work, John.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-07  7:07       ` Shijith Thotton
  2017-04-07  9:23         ` Mcnamara, John
@ 2017-04-07  9:42         ` Jerin Jacob
  2017-04-07 10:10           ` Shijith Thotton
  1 sibling, 1 reply; 42+ messages in thread
From: Jerin Jacob @ 2017-04-07  9:42 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Thomas Monjalon, John Mcnamara, dev, Ferruh Yigit

-----Original Message-----
> Date: Fri, 7 Apr 2017 12:37:26 +0530
> From: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> To: Thomas Monjalon <thomas.monjalon@6wind.com>
> CC: John Mcnamara <john.mcnamara@intel.com>, dev@dpdk.org, Ferruh Yigit
>  <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and
>  testing of PMD
> User-Agent: Mutt/1.5.21 (2010-09-15)
> 
> On Thu, Apr 06, 2017 at 08:30:21PM +0200, Thomas Monjalon wrote:
> > 2017-04-06 13:21, Shijith Thotton:
> > > Add a section in NIC drivers documentation to explain compiling and
> > > testing of a PMD. It also mentions about host setup, which is required
> > > before running testpmd.
> > > 
> > > Add label "testpmd_ug" to refer user guide.
> > > 
> > > Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> > 
> > It is really good to factorize documentation.
> > 
> > This doc is about testpmd in Linux
> > and does not refer to FreeBSD.
> > Do we assume to take Linux as the reference?
> 
> I can submit v2 with a subsection for running testpmd in FreeBSD.
> 
> > Should we refer to the Linux Getting Started Guide instead?
> 
> Agree that the new section just has steps from getting started guide. It may
> seem redundant from a developer point of view, but hope it will be useful to
> users.
> 
> Please share thoughts.

1) Some reason thunderx PMD is not added in refactoring. I guess its due
to x86 and arm64 name space collision in the common document, if so we need
to find a way to fix it and thunderx PMD.

2)I guess, It is better to keep all the startup logs in respective PMD.I
think, it will help in debugging in case there are any issues.


> 
> Thanks,
> Shijith

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD
  2017-04-07  9:42         ` Jerin Jacob
@ 2017-04-07 10:10           ` Shijith Thotton
  0 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-07 10:10 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Thomas Monjalon, John Mcnamara, dev, Ferruh Yigit

On Fri, Apr 07, 2017 at 03:12:25PM +0530, Jerin Jacob wrote:
> -----Original Message-----
> > Date: Fri, 7 Apr 2017 12:37:26 +0530
> > From: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> > To: Thomas Monjalon <thomas.monjalon@6wind.com>
> > CC: John Mcnamara <john.mcnamara@intel.com>, dev@dpdk.org, Ferruh Yigit
> >  <ferruh.yigit@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and
> >  testing of PMD
> > User-Agent: Mutt/1.5.21 (2010-09-15)
> > 
> > On Thu, Apr 06, 2017 at 08:30:21PM +0200, Thomas Monjalon wrote:
> > > 2017-04-06 13:21, Shijith Thotton:
> > > > Add a section in NIC drivers documentation to explain compiling and
> > > > testing of a PMD. It also mentions about host setup, which is required
> > > > before running testpmd.
> > > > 
> > > > Add label "testpmd_ug" to refer user guide.
> > > > 
> > > > Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
> > > 
> > > It is really good to factorize documentation.
> > > 
> > > This doc is about testpmd in Linux
> > > and does not refer to FreeBSD.
> > > Do we assume to take Linux as the reference?
> > 
> > I can submit v2 with a subsection for running testpmd in FreeBSD.
> > 
> > > Should we refer to the Linux Getting Started Guide instead?
> > 
> > Agree that the new section just has steps from getting started guide. It may
> > seem redundant from a developer point of view, but hope it will be useful to
> > users.
> > 
> > Please share thoughts.
> 
> 1) Some reason thunderx PMD is not added in refactoring. I guess its due
> to x86 and arm64 name space collision in the common document, if so we need
> to find a way to fix it and thunderx PMD.
> 

Made text more generic for all platforms and gave two examples.

	To compile a PMD for a platform, run make with proper target from config
	folder. Use “make” command in Linux and “gmake” in FreeBSD OS. It will
	also build testpmd.

	To compile a PMD for Linux x86_64 gcc target, run the following “make”
	command:

	cd <DPDK-source-directory>
	make install T=x86_64-native-linuxapp-gcc

	To compile the ThunderX NICVF PMD for Linux arm64 gcc target, run the
	following “make” command:

	cd <DPDK-source-directory>
	make config T=arm64-thunderx-linuxapp-gcc install


> 2)I guess, It is better to keep all the startup logs in respective PMD.I
> think, it will help in debugging in case there are any issues.
> 

+1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs
  2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
                     ` (7 preceding siblings ...)
  2017-04-06  7:51   ` [dpdk-dev] [PATCH 8/8] doc: refer PMD compile and test section from qede doc Shijith Thotton
@ 2017-04-11 18:56   ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 01/10] doc: add doc to explain compiling and testing of PMD Shijith Thotton
                       ` (10 more replies)
  8 siblings, 11 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara; +Cc: dev

Steps for compiling PMDs and running testpmd in Linux are common among
drivers. So it can be moved to a new document and be referred from other
driver documentations.

This patchset adds a new section for compiling and testing a PMD in
Network Interface Controller Drivers documentation. Other driver docs
with similar part are replaced with reference to this section.

v2 changes:
* Make doc to compile and test PMD more generic.
* Modify docs of ark and thunderx.
* Keep testpmd logs in PMD docs.

v1 changes:
* Address review comments from John.
 - Corrections to documentation.
 - Create a new section after NIC overview for the doc.
 - Refer the section instead of including it in PMD docs.
* Change documentation of all PMDs with common part.

RFC:
* http://dpdk.org/ml/archives/dev/2017-April/062848.html

Shijith Thotton (10):
  doc: add doc to explain compiling and testing of PMD
  doc: refer PMD compile and test section from ark doc
  doc: refer PMD compile and test section from bnx2x doc
  doc: refer PMD compile and test section from cxgbe doc
  doc: refer PMD compile and test section from ena doc
  doc: refer PMD compile and test section from i40e doc
  doc: refer PMD compile and test section from liquidio doc
  doc: refer PMD compile and test section from nfp doc
  doc: refer PMD compile and test section from qede doc
  doc: refer PMD compile and test section from thunderx doc

 doc/guides/nics/ark.rst             |  75 ++++-----------
 doc/guides/nics/bnx2x.rst           | 178 +++++++++--------------------------
 doc/guides/nics/build_and_test.rst  | 179 ++++++++++++++++++++++++++++++++++++
 doc/guides/nics/cxgbe.rst           |  86 +++--------------
 doc/guides/nics/ena.rst             |  69 ++++----------
 doc/guides/nics/i40e.rst            | 108 ++++++++--------------
 doc/guides/nics/index.rst           |   1 +
 doc/guides/nics/liquidio.rst        | 123 +++++++------------------
 doc/guides/nics/nfp.rst             | 141 ++--------------------------
 doc/guides/nics/qede.rst            | 176 +++++++++++++----------------------
 doc/guides/nics/thunderx.rst        | 175 ++++++++++-------------------------
 doc/guides/testpmd_app_ug/index.rst |   2 +
 12 files changed, 466 insertions(+), 847 deletions(-)
 create mode 100644 doc/guides/nics/build_and_test.rst

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 01/10] doc: add doc to explain compiling and testing of PMD
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 02/10] doc: refer PMD compile and test section from ark doc Shijith Thotton
                       ` (9 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara; +Cc: dev, Jerin Jacob

Add a section in NIC drivers documentation to explain compiling and
testing of a PMD. It also mentions about host setup, which is required
before running testpmd.

Add label "testpmd_ug" to refer user guide.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/build_and_test.rst  | 179 ++++++++++++++++++++++++++++++++++++
 doc/guides/nics/index.rst           |   1 +
 doc/guides/testpmd_app_ug/index.rst |   2 +
 3 files changed, 182 insertions(+)
 create mode 100644 doc/guides/nics/build_and_test.rst

diff --git a/doc/guides/nics/build_and_test.rst b/doc/guides/nics/build_and_test.rst
new file mode 100644
index 0000000..2d70af8
--- /dev/null
+++ b/doc/guides/nics/build_and_test.rst
@@ -0,0 +1,179 @@
+..  BSD LICENSE
+    Copyright(c) 2017 Cavium, Inc.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+    * Neither the name of Cavium, Inc. nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+.. _pmd_build_and_test:
+
+Compiling and testing a PMD for a NIC
+=====================================
+
+This section demonstrates how to compile and run a Poll Mode Driver (PMD) for
+the available Network Interface Cards in DPDK using TestPMD.
+
+TestPMD is one of the reference applications distributed with the DPDK. Its main
+purpose is to forward packets between Ethernet ports on a network interface and
+as such is the best way to test a PMD.
+
+Refer to the :ref:`testpmd application user guide <testpmd_ug>` for detailed
+information on how to build and run testpmd.
+
+Driver Compilation
+------------------
+
+To compile a PMD for a platform, run make with appropriate target as shown below.
+Use "make" command in Linux and "gmake" in FreeBSD. This will also build testpmd.
+
+To check available targets:
+
+.. code-block:: console
+
+   cd <DPDK-source-directory>
+   make showconfigs
+
+Example output:
+
+.. code-block:: console
+
+   arm-armv7a-linuxapp-gcc
+   arm64-armv8a-linuxapp-gcc
+   arm64-dpaa2-linuxapp-gcc
+   arm64-thunderx-linuxapp-gcc
+   arm64-xgene1-linuxapp-gcc
+   i686-native-linuxapp-gcc
+   i686-native-linuxapp-icc
+   ppc_64-power8-linuxapp-gcc
+   x86_64-native-bsdapp-clang
+   x86_64-native-bsdapp-gcc
+   x86_64-native-linuxapp-clang
+   x86_64-native-linuxapp-gcc
+   x86_64-native-linuxapp-icc
+   x86_x32-native-linuxapp-gcc
+
+To compile a PMD for Linux x86_64 gcc target, run the following "make" command:
+
+.. code-block:: console
+
+   make install T=x86_64-native-linuxapp-gcc
+
+Use ARM (ThunderX, DPAA, X-Gene) or PowerPC target for respective platform.
+
+For more information, refer to the :ref:`Getting Started Guide for Linux <linux_gsg>`
+or :ref:`Getting Started Guide for FreeBSD <freebsd_gsg>` depending on your platform.
+
+Running testpmd in Linux
+------------------------
+
+This section demonstrates how to setup and run ``testpmd`` in Linux.
+
+#. Mount huge pages:
+
+   .. code-block:: console
+
+      mkdir /mnt/huge
+      mount -t hugetlbfs nodev /mnt/huge
+
+#. Request huge pages:
+
+   Hugepage memory should be reserved as per application requirement. Check
+   hugepage size configured in the system and calculate the number of pages
+   required.
+
+   To reserve 1024 pages of 2MB:
+
+   .. code-block:: console
+
+      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
+
+   .. note::
+
+      Check ``/proc/meminfo`` to find system hugepage size:
+
+      .. code-block:: console
+
+         grep "Hugepagesize:" /proc/meminfo
+
+      Example output:
+
+      .. code-block:: console
+
+         Hugepagesize:       2048 kB
+
+#. Load ``igb_uio`` or ``vfio-pci`` driver:
+
+   .. code-block:: console
+
+      modprobe uio
+      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+
+   or
+
+   .. code-block:: console
+
+      modprobe vfio-pci
+
+#. Setup VFIO permissions for regular users before binding to ``vfio-pci``:
+
+   .. code-block:: console
+
+      sudo chmod a+x /dev/vfio
+
+      sudo chmod 0666 /dev/vfio/*
+
+#. Bind the adapters to ``igb_uio`` or ``vfio-pci`` loaded in the previous step:
+
+   .. code-block:: console
+
+      ./usertools/dpdk-devbind.py --bind igb_uio DEVICE1 DEVICE2 ...
+
+   Or setup VFIO permissions for regular users and then bind to ``vfio-pci``:
+
+   .. code-block:: console
+
+      ./usertools/dpdk-devbind.py --bind vfio-pci DEVICE1 DEVICE2 ...
+
+   .. note::
+
+      DEVICE1, DEVICE2 are specified via PCI "domain:bus:slot.func" syntax or
+      "bus:slot.func" syntax.
+
+#. Start ``testpmd`` with basic parameters:
+
+   .. code-block:: console
+
+      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i
+
+   Successful execution will show initialization messages from EAL, PMD and
+   testpmd application. A prompt will be displayed at the end for user commands
+   as interactive mode (``-i``) is on.
+
+   .. code-block:: console
+
+      testpmd>
+
+   Refer to the :ref:`testpmd runtime functions <testpmd_runtime>` for a list
+   of available commands.
diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst
index 3305e80..3c7722f 100644
--- a/doc/guides/nics/index.rst
+++ b/doc/guides/nics/index.rst
@@ -36,6 +36,7 @@ Network Interface Controller Drivers
     :numbered:
 
     overview
+    build_and_test
     ark
     avp
     bnx2x
diff --git a/doc/guides/testpmd_app_ug/index.rst b/doc/guides/testpmd_app_ug/index.rst
index 1c39a17..61a9121 100644
--- a/doc/guides/testpmd_app_ug/index.rst
+++ b/doc/guides/testpmd_app_ug/index.rst
@@ -28,6 +28,8 @@
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+.. _testpmd_ug:
+
 Testpmd Application User Guide
 ==============================
 
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 02/10] doc: refer PMD compile and test section from ark doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 01/10] doc: add doc to explain compiling and testing of PMD Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 03/10] doc: refer PMD compile and test section from bnx2x doc Shijith Thotton
                       ` (8 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara, Shepard Siegel, Ed Czeck, John Miller; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
 doc/guides/nics/ark.rst | 75 +++++++++++++------------------------------------
 1 file changed, 20 insertions(+), 55 deletions(-)

diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst
index 064ed11..a7c2590 100644
--- a/doc/guides/nics/ark.rst
+++ b/doc/guides/nics/ark.rst
@@ -239,58 +239,23 @@ application runs to completion, the ARK PMD can be detached from igb_uio if nece
 Usage Example
 -------------
 
-This section demonstrates how to launch **testpmd** with Atomic Rules ARK
-devices managed by librte_pmd_ark.
-
-#. Load the kernel modules:
-
-   .. code-block:: console
-
-      modprobe uio
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   .. note::
-
-      The ARK PMD driver depends upon the igb_uio user space I/O kernel module
-
-#. Mount and request huge pages:
-
-   .. code-block:: console
-
-      mount -t hugetlbfs nodev /mnt/huge
-      echo 256 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
-
-#. Bind UIO driver to ARK device at 0000:01:00.0 (using dpdk-devbind.py):
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind=igb_uio 0000:01:00.0
-
-   .. note::
-
-      The last argument to dpdk-devbind.py is the 4-tuple that indentifies a specific PCIe
-      device. You can use lspci -d 1d6c: to indentify all Atomic Rules devices in the system,
-      and thus determine the correct 4-tuple argument to dpdk-devbind.py
-
-#. Start testpmd with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      EAL: PCI device 0000:01:00.0 on NUMA socket -1
-      EAL:   probe driver: 1d6c:100e rte_ark_pmd
-      EAL:   PCI memory mapped at 0x7f9b6c400000
-      PMD: eth_ark_dev_init(): Initializing 0:2:0.1
-      ARKP PMD CommitID: 378f3a67
-      Configuring Port 0 (socket 0)
-      Port 0: DC:3C:F6:00:00:01
-      Checking link statuses...
-      Port 0 Link Up - speed 100000 Mbps - full-duplex
-      Done
-      testpmd>
+Follow instructions available in the document
+:ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>` to launch
+**testpmd** with Atomic Rules ARK devices managed by librte_pmd_ark.
+
+Example output:
+
+.. code-block:: console
+
+   [...]
+   EAL: PCI device 0000:01:00.0 on NUMA socket -1
+   EAL:   probe driver: 1d6c:100e rte_ark_pmd
+   EAL:   PCI memory mapped at 0x7f9b6c400000
+   PMD: eth_ark_dev_init(): Initializing 0:2:0.1
+   ARKP PMD CommitID: 378f3a67
+   Configuring Port 0 (socket 0)
+   Port 0: DC:3C:F6:00:00:01
+   Checking link statuses...
+   Port 0 Link Up - speed 100000 Mbps - full-duplex
+   Done
+   testpmd>
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 03/10] doc: refer PMD compile and test section from bnx2x doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 01/10] doc: add doc to explain compiling and testing of PMD Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 02/10] doc: refer PMD compile and test section from ark doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 04/10] doc: refer PMD compile and test section from cxgbe doc Shijith Thotton
                       ` (7 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara, Harish Patil, Rasesh Mody; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/bnx2x.rst | 178 +++++++++++-----------------------------------
 1 file changed, 42 insertions(+), 136 deletions(-)

diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index 17780ed..a3a0665 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -123,143 +123,14 @@ enabling debugging options may affect system performance.
 
 .. _bnx2x_driver-compilation:
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-BNX2X PMD for Linux x86_64 gcc target, run the following "make"
-command::
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-gcc install
-
-To compile BNX2X PMD for Linux x86_64 clang target, run the following "make"
-command::
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-clang install
-
-To compile BNX2X PMD for Linux i686 gcc target, run the following "make"
-command::
-
-   cd <DPDK-source-directory>
-   make config T=i686-native-linuxapp-gcc install
-
-To compile BNX2X PMD for Linux i686 gcc target, run the following "make"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   make config T=i686-native-linuxapp-gcc install
-
-To compile BNX2X PMD for FreeBSD x86_64 clang target, run the following "gmake"
-command::
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-clang install
-
-To compile BNX2X PMD for FreeBSD x86_64 gcc target, run the following "gmake"
-command::
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc49 CC=gcc49
-
-To compile BNX2X PMD for FreeBSD x86_64 gcc target, run the following "gmake"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc49 CC=gcc49
-
-Linux
------
-
-.. _bnx2x_Linux-installation:
-
-Linux Installation
-~~~~~~~~~~~~~~~~~~
-
-Sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-This section demonstrates how to launch ``testpmd`` with QLogic 578xx
-devices managed by ``librte_pmd_bnx2x`` in Linux operating system.
-
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
-
-#. Load ``igb_uio`` or ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   or
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the QLogic adapters to ``igb_uio`` or ``vfio-pci`` loaded in the
-   previous step::
-
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1
-
-   or
-
-   Setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      sudo chmod a+x /dev/vfio
-
-      sudo chmod 0666 /dev/vfio/*
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:84:00.0 0000:84:00.1
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
+Driver compilation and testing
+------------------------------
 
-      [...]
-      EAL: PCI device 0000:84:00.0 on NUMA socket 1
-      EAL:   probe driver: 14e4:168e rte_bnx2x_pmd
-      EAL:   PCI memory mapped at 0x7f14f6fe5000
-      EAL:   PCI memory mapped at 0x7f14f67e5000
-      EAL:   PCI memory mapped at 0x7f15fbd9b000
-      EAL: PCI device 0000:84:00.1 on NUMA socket 1
-      EAL:   probe driver: 14e4:168e rte_bnx2x_pmd
-      EAL:   PCI memory mapped at 0x7f14f5fe5000
-      EAL:   PCI memory mapped at 0x7f14f57e5000
-      EAL:   PCI memory mapped at 0x7f15fbd4f000
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      PMD: bnx2x_dev_tx_queue_setup(): fp[00] req_bd=512, thresh=512,
-                   usable_bd=1020, total_bd=1024,
-                                tx_pages=4
-      PMD: bnx2x_dev_rx_queue_setup(): fp[00] req_bd=128, thresh=0,
-                   usable_bd=510, total_bd=512,
-                                rx_pages=1, cq_pages=8
-      PMD: bnx2x_print_adapter_info():
-      [...]
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Port 1 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 SR-IOV: Prerequisites and sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------------------------------
 
 This section provides instructions to configure SR-IOV with Linux OS.
 
@@ -311,7 +182,6 @@ This section provides instructions to configure SR-IOV with Linux OS.
 
       echo 2 > /sys/devices/pci0000:00/0000:00:03.0/0000:81:00.0/sriov_numvfs
 
-
 #. Assign VF MAC address:
 
    Assign MAC address to the VF using iproute2 utility. The syntax is:
@@ -323,9 +193,45 @@ This section provides instructions to configure SR-IOV with Linux OS.
 
       ip link set ens5f0 vf 0 mac 52:54:00:2f:9d:e8
 
-
 #. PCI Passthrough:
 
    The VF devices may be passed through to the guest VM using virt-manager or
    virsh etc. bnx2x PMD should be used to bind the VF devices in the guest VM
    using the instructions outlined in the Application notes below.
+
+#. Running testpmd:
+
+   Follow instructions available in the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+   to run testpmd.
+
+   Example output:
+
+   .. code-block:: console
+
+      [...]
+      EAL: PCI device 0000:84:00.0 on NUMA socket 1
+      EAL:   probe driver: 14e4:168e rte_bnx2x_pmd
+      EAL:   PCI memory mapped at 0x7f14f6fe5000
+      EAL:   PCI memory mapped at 0x7f14f67e5000
+      EAL:   PCI memory mapped at 0x7f15fbd9b000
+      EAL: PCI device 0000:84:00.1 on NUMA socket 1
+      EAL:   probe driver: 14e4:168e rte_bnx2x_pmd
+      EAL:   PCI memory mapped at 0x7f14f5fe5000
+      EAL:   PCI memory mapped at 0x7f14f57e5000
+      EAL:   PCI memory mapped at 0x7f15fbd4f000
+      Interactive-mode selected
+      Configuring Port 0 (socket 0)
+      PMD: bnx2x_dev_tx_queue_setup(): fp[00] req_bd=512, thresh=512,
+                   usable_bd=1020, total_bd=1024,
+                                tx_pages=4
+      PMD: bnx2x_dev_rx_queue_setup(): fp[00] req_bd=128, thresh=0,
+                   usable_bd=510, total_bd=512,
+                                rx_pages=1, cq_pages=8
+      PMD: bnx2x_print_adapter_info():
+      [...]
+      Checking link statuses...
+      Port 0 Link Up - speed 10000 Mbps - full-duplex
+      Port 1 Link Up - speed 10000 Mbps - full-duplex
+      Done
+      testpmd>
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 04/10] doc: refer PMD compile and test section from cxgbe doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (2 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 03/10] doc: refer PMD compile and test section from bnx2x doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 05/10] doc: refer PMD compile and test section from ena doc Shijith Thotton
                       ` (6 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara, Rahul Lakkireddy; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/cxgbe.rst | 86 ++++++-----------------------------------------
 1 file changed, 11 insertions(+), 75 deletions(-)

diff --git a/doc/guides/nics/cxgbe.rst b/doc/guides/nics/cxgbe.rst
index 308a926..a205b43 100644
--- a/doc/guides/nics/cxgbe.rst
+++ b/doc/guides/nics/cxgbe.rst
@@ -125,24 +125,11 @@ enabling debugging options may affect system performance.
 
 .. _driver-compilation:
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-To compile CXGBE PMD for Linux x86_64 gcc target, run the following "make"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-gcc install
-
-To compile CXGBE PMD for FreeBSD x86_64 clang target, run the following "gmake"
-command:
-
-.. code-block:: console
+Driver compilation and testing
+------------------------------
 
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-clang install
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 Linux
 -----
@@ -218,13 +205,6 @@ Running testpmd
 This section demonstrates how to launch **testpmd** with Chelsio T5
 devices managed by librte_pmd_cxgbe in Linux operating system.
 
-#. Change to DPDK source directory where the target has been compiled in
-   section :ref:`driver-compilation`:
-
-   .. code-block:: console
-
-      cd <DPDK-source-directory>
-
 #. Load the kernel module:
 
    .. code-block:: console
@@ -255,60 +235,16 @@ devices managed by librte_pmd_cxgbe in Linux operating system.
 
       modprobe -ar cxgb4 csiostor
 
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
-
-#. Mount huge pages:
-
-   .. code-block:: console
-
-      mkdir /mnt/huge
-      mount -t hugetlbfs nodev /mnt/huge
-
-#. Load igb_uio or vfio-pci driver:
-
-   .. code-block:: console
-
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   or
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the Chelsio T5 adapters to igb_uio or vfio-pci loaded in the previous
-   step:
+#. Running testpmd
 
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:02:00.4
-
-   or
-
-   Setup VFIO permissions for regular users and then bind to vfio-pci:
-
-   .. code-block:: console
-
-      sudo chmod a+x /dev/vfio
-
-      sudo chmod 0666 /dev/vfio/*
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:02:00.4
+   Follow instructions available in the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+   to run testpmd.
 
    .. note::
 
       Currently, CXGBE PMD only supports the binding of PF4 for Chelsio T5 NICs.
 
-#. Start testpmd with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 0000:02:00.4 -- -i
-
    Example output:
 
    .. code-block:: console
@@ -334,10 +270,10 @@ devices managed by librte_pmd_cxgbe in Linux operating system.
       Done
       testpmd>
 
-.. note::
+   .. note::
 
-   Flow control pause TX/RX is disabled by default and can be enabled via
-   testpmd. Refer section :ref:`flow-control` for more details.
+      Flow control pause TX/RX is disabled by default and can be enabled via
+      testpmd. Refer section :ref:`flow-control` for more details.
 
 FreeBSD
 -------
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 05/10] doc: refer PMD compile and test section from ena doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (3 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 04/10] doc: refer PMD compile and test section from cxgbe doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 06/10] doc: refer PMD compile and test section from i40e doc Shijith Thotton
                       ` (5 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara, Netanel Belgazal, Evgeny Schemeilin; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/ena.rst | 69 ++++++++++++++-----------------------------------
 1 file changed, 20 insertions(+), 49 deletions(-)

diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index c2d6b85..d19912e 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -200,52 +200,23 @@ application runs to completion, the ENA can be detached from igb_uio if necessar
 Usage example
 -------------
 
-This section demonstrates how to launch **testpmd** with Amazon ENA
-devices managed by librte_pmd_ena.
-
-#. Load the kernel modules:
-
-   .. code-block:: console
-
-      modprobe uio
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   .. note::
-
-      Currently Amazon ENA PMD driver depends on igb_uio user space I/O kernel module
-
-#. Mount and request huge pages:
-
-   .. code-block:: console
-
-      mount -t hugetlbfs nodev /mnt/hugepages
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-#. Bind UIO driver to ENA device (using provided by DPDK binding tool):
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind=igb_uio 0000:02:00.1
-
-#. Start testpmd with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      EAL: PCI device 0000:02:00.1 on NUMA socket -1
-      EAL:   probe driver: 1d0f:ec20 rte_ena_pmd
-      EAL:   PCI memory mapped at 0x7f9b6c400000
-      PMD: eth_ena_dev_init(): Initializing 0:2:0.1
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      Port 0: 00:00:00:11:00:01
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
+Follow instructions available in the document
+:ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>` to launch
+**testpmd** with Amazon ENA devices managed by librte_pmd_ena.
+
+Example output:
+
+.. code-block:: console
+
+   [...]
+   EAL: PCI device 0000:02:00.1 on NUMA socket -1
+   EAL:   probe driver: 1d0f:ec20 rte_ena_pmd
+   EAL:   PCI memory mapped at 0x7f9b6c400000
+   PMD: eth_ena_dev_init(): Initializing 0:2:0.1
+   Interactive-mode selected
+   Configuring Port 0 (socket 0)
+   Port 0: 00:00:00:11:00:01
+   Checking link statuses...
+   Port 0 Link Up - speed 10000 Mbps - full-duplex
+   Done
+   testpmd>
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 06/10] doc: refer PMD compile and test section from i40e doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (4 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 05/10] doc: refer PMD compile and test section from ena doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 07/10] doc: refer PMD compile and test section from liquidio doc Shijith Thotton
                       ` (4 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara, Helin Zhang, Jingjing Wu; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/i40e.rst | 108 ++++++++++++++++-------------------------------
 1 file changed, 36 insertions(+), 72 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index d5efa3f..4d3c7ca 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -126,82 +126,15 @@ Please note that enabling debugging options may affect system performance.
   Interrupt Throttling interval.
 
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-To compile the I40E PMD see :ref:`Getting Started Guide for Linux <linux_gsg>` or
-:ref:`Getting Started Guide for FreeBSD <freebsd_gsg>` depending on your platform.
-
-
-Linux
------
-
-
-Running testpmd
-~~~~~~~~~~~~~~~
-
-This section demonstrates how to launch ``testpmd`` with Intel XL710/X710
-devices managed by ``librte_pmd_i40e`` in the Linux operating system.
-
-#. Load ``igb_uio`` or ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      modprobe uio
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-   or
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the XL710/X710 adapters to ``igb_uio`` or ``vfio-pci`` loaded in the previous step:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:83:00.0
-
-   Or setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:83:00.0
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 83:00.0 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      ...
-      EAL: PCI device 0000:83:00.0 on NUMA socket 1
-      EAL: probe driver: 8086:1572 rte_i40e_pmd
-      EAL: PCI memory mapped at 0x7f7f80000000
-      EAL: PCI memory mapped at 0x7f7f80800000
-      PMD: eth_i40e_dev_init(): FW 5.0 API 1.5 NVM 05.00.02 eetrack 8000208a
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      ...
-
-      PMD: i40e_dev_rx_queue_setup(): Rx Burst Bulk Alloc Preconditions are
-      satisfied.Rx Burst Bulk Alloc function will be used on port=0, queue=0.
-
-      ...
-      Port 0: 68:05:CA:26:85:84
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Done
+Driver compilation and testing
+------------------------------
 
-      testpmd>
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
 
 SR-IOV: Prerequisites and sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------------------------------
 
 #. Load the kernel module:
 
@@ -250,6 +183,37 @@ SR-IOV: Prerequisites and sample Application Notes
 #. Assign VF to VM, and bring up the VM.
    Please see the documentation for the *I40E/IXGBE/IGB Virtual Function Driver*.
 
+#. Running testpmd:
+
+   Follow instructions available in the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+   to run testpmd.
+
+   Example output:
+
+   .. code-block:: console
+
+      ...
+      EAL: PCI device 0000:83:00.0 on NUMA socket 1
+      EAL: probe driver: 8086:1572 rte_i40e_pmd
+      EAL: PCI memory mapped at 0x7f7f80000000
+      EAL: PCI memory mapped at 0x7f7f80800000
+      PMD: eth_i40e_dev_init(): FW 5.0 API 1.5 NVM 05.00.02 eetrack 8000208a
+      Interactive-mode selected
+      Configuring Port 0 (socket 0)
+      ...
+
+      PMD: i40e_dev_rx_queue_setup(): Rx Burst Bulk Alloc Preconditions are
+      satisfied.Rx Burst Bulk Alloc function will be used on port=0, queue=0.
+
+      ...
+      Port 0: 68:05:CA:26:85:84
+      Checking link statuses...
+      Port 0 Link Up - speed 10000 Mbps - full-duplex
+      Done
+
+      testpmd>
+
 
 Sample Application Notes
 ------------------------
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 07/10] doc: refer PMD compile and test section from liquidio doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (5 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 06/10] doc: refer PMD compile and test section from i40e doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 08/10] doc: refer PMD compile and test section from nfp doc Shijith Thotton
                       ` (3 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/liquidio.rst | 123 ++++++++++++-------------------------------
 1 file changed, 33 insertions(+), 90 deletions(-)

diff --git a/doc/guides/nics/liquidio.rst b/doc/guides/nics/liquidio.rst
index 9ffdc35..b7c80c5 100644
--- a/doc/guides/nics/liquidio.rst
+++ b/doc/guides/nics/liquidio.rst
@@ -80,90 +80,6 @@ Please note that enabling debugging options may affect system performance.
   Toggle display of register reads and writes.
 
 
-.. _lio_driver-compilation:
-
-Driver Compilation
-------------------
-
-To compile LiquidIO PMD for Linux x86_64 gcc target, run the following "make"
-command:
-
-.. code-block:: console
-
-   cd <DPDK-source-directory>
-   make install T=x86_64-native-linuxapp-gcc
-
-
-Sample Application Notes
-------------------------
-
-This section demonstrates how to launch ``testpmd`` with LiquidIO® CN23XX
-device managed by ``librte_pmd_lio`` in Linux operating system.
-
-#. Mount huge pages:
-
-   .. code-block:: console
-
-      mkdir /mnt/huge
-      mount -t hugetlbfs nodev /mnt/huge
-
-#. Request huge pages:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
-
-#. Load ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind the LiquidIO VFs to ``vfio-pci`` loaded in previous step:
-
-   Setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      sudo chmod a+x /dev/vfio
-
-      sudo chmod 0666 /dev/vfio/*
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0000:03:00.3 0000:03:08.3
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./build/app/testpmd -c 0xf -n 4 -- -i
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      EAL: PCI device 0000:03:00.3 on NUMA socket 0
-      EAL:   probe driver: 177d:9712 net_liovf
-      EAL:   using IOMMU type 1 (Type 1)
-      PMD: net_liovf[03:00.3]INFO: DEVICE : CN23XX VF
-      EAL: PCI device 0000:03:08.3 on NUMA socket 0
-      EAL:   probe driver: 177d:9712 net_liovf
-      PMD: net_liovf[03:08.3]INFO: DEVICE : CN23XX VF
-      Interactive-mode selected
-      USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=171456, size=2176, socket=0
-      Configuring Port 0 (socket 0)
-      PMD: net_liovf[03:00.3]INFO: Starting port 0
-      Port 0: F2:A8:1B:5E:B4:66
-      Configuring Port 1 (socket 0)
-      PMD: net_liovf[03:08.3]INFO: Starting port 1
-      Port 1: 32:76:CC:EE:56:D7
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Port 1 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
-
-
 SR-IOV: Prerequisites and Sample Application Notes
 --------------------------------------------------
 
@@ -216,7 +132,6 @@ This section provides instructions to configure SR-IOV with Linux OS.
       echo 1 > /sys/bus/pci/devices/0000:03:00.0/sriov_numvfs
       echo 1 > /sys/bus/pci/devices/0000:03:00.1/sriov_numvfs
 
-
 #. Assign VF MAC address:
 
    Assign MAC address to the VF using iproute2 utility. The syntax is::
@@ -229,7 +144,6 @@ This section provides instructions to configure SR-IOV with Linux OS.
 
       ip link set p4p1 vf 0 mac F2:A8:1B:5E:B4:66
 
-
 #. Assign VF(s) to VM.
 
    The VF devices may be passed through to the guest VM using qemu or
@@ -245,12 +159,41 @@ This section provides instructions to configure SR-IOV with Linux OS.
       -device virtio-blk-pci,scsi=off,drive=disk1,id=virtio-disk1,bootindex=1 \
       -device vfio-pci,host=03:00.3 -device vfio-pci,host=03:08.3
 
-
 #. Running testpmd
 
-   Refer :ref:`notes above <lio_driver-compilation>`
-   to compile and run ``testpmd`` application.
-   Use ``igb_uio`` instead of ``vfio-pci`` in VM.
+   Refer to the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>` to run
+   ``testpmd`` application.
+
+   .. note::
+
+      Use ``igb_uio`` instead of ``vfio-pci`` in VM.
+
+   Example output:
+
+   .. code-block:: console
+
+      [...]
+      EAL: PCI device 0000:03:00.3 on NUMA socket 0
+      EAL:   probe driver: 177d:9712 net_liovf
+      EAL:   using IOMMU type 1 (Type 1)
+      PMD: net_liovf[03:00.3]INFO: DEVICE : CN23XX VF
+      EAL: PCI device 0000:03:08.3 on NUMA socket 0
+      EAL:   probe driver: 177d:9712 net_liovf
+      PMD: net_liovf[03:08.3]INFO: DEVICE : CN23XX VF
+      Interactive-mode selected
+      USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=171456, size=2176, socket=0
+      Configuring Port 0 (socket 0)
+      PMD: net_liovf[03:00.3]INFO: Starting port 0
+      Port 0: F2:A8:1B:5E:B4:66
+      Configuring Port 1 (socket 0)
+      PMD: net_liovf[03:08.3]INFO: Starting port 1
+      Port 1: 32:76:CC:EE:56:D7
+      Checking link statuses...
+      Port 0 Link Up - speed 10000 Mbps - full-duplex
+      Port 1 Link Up - speed 10000 Mbps - full-duplex
+      Done
+      testpmd>
 
 
 Limitations
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 08/10] doc: refer PMD compile and test section from nfp doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (6 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 07/10] doc: refer PMD compile and test section from liquidio doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 09/10] doc: refer PMD compile and test section from qede doc Shijith Thotton
                       ` (2 subsequent siblings)
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara, Alejandro Lucero; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/nfp.rst | 141 +++---------------------------------------------
 1 file changed, 6 insertions(+), 135 deletions(-)

diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index b643e5b..c732fb1 100644
--- a/doc/guides/nics/nfp.rst
+++ b/doc/guides/nics/nfp.rst
@@ -81,85 +81,15 @@ Once DPDK is built all the DPDK apps and examples include support for
 the NFP PMD.
 
 
-System configuration
---------------------
-
-Using the NFP PMD is not different to using other PMDs. Usual steps are:
-
-#. **Configure hugepages:** All major Linux distributions have the hugepages
-   functionality enabled by default. By default this allows the system uses for
-   working with transparent hugepages. But in this case some hugepages need to
-   be created/reserved for use with the DPDK through the hugetlbfs file system.
-   First the virtual file system need to be mounted:
-
-   .. code-block:: console
-
-      mount -t hugetlbfs none /mnt/hugetlbfs
-
-   The command uses the common mount point for this file system and it needs to
-   be created if necessary.
-
-   Configuring hugepages is performed via sysfs:
-
-   .. code-block:: console
-
-      /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-   This sysfs file is used to specify the number of hugepages to reserve.
-   For example:
-
-   .. code-block:: console
-
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-   This will reserve 2GB of memory using 1024 2MB hugepages. The file may be
-   read to see if the operation was performed correctly:
-
-   .. code-block:: console
-
-      cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-   The number of unused hugepages may also be inspected.
-
-   Before executing the DPDK app it should match the value of nr_hugepages.
-
-   .. code-block:: console
-
-      cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages
-
-   The hugepages reservation should be performed at system initialization and
-   it is usual to use a kernel parameter for configuration. If the reservation
-   is attempted on a busy system it will likely fail. Reserving memory for
-   hugepages may be done adding the following to the grub kernel command line:
-
-   .. code-block:: console
-
-      default_hugepagesz=1M hugepagesz=2M hugepages=1024
-
-   This will reserve 2GBytes of memory using 2Mbytes huge pages.
-
-   Finally, for a NUMA system the allocation needs to be made on the correct
-   NUMA node. In a DPDK app there is a master core which will (usually) perform
-   memory allocation. It is important that some of the hugepages are reserved
-   on the NUMA memory node where the network device is attached. This is because
-   of a restriction in DPDK by which TX and RX descriptors rings must be created
-   on the master code.
-
-   Per-node allocation of hugepages may be inspected and controlled using sysfs.
-   For example:
-
-   .. code-block:: console
+Driver compilation and testing
+------------------------------
 
-      cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
-   For a NUMA system there will be a specific hugepage directory per node
-   allowing control of hugepage reservation. A common problem may occur when
-   hugepages reservation is performed after the system has been working for
-   some time. Configuration using the global sysfs hugepage interface will
-   succeed but the per-node allocations may be unsatisfactory.
 
-   The number of hugepages that need to be reserved depends on how the app uses
-   TX and RX descriptors, and packets mbufs.
+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
@@ -191,62 +121,3 @@ Using the NFP PMD is not different to using other PMDs. Usual steps are:
    -k option shows the device driver, if any, that devices are bound to.
    Depending on the modules loaded at this point the new PCI devices may be
    bound to nfp_netvf driver.
-
-#. **To install the uio kernel module (manually):** All major Linux
-   distributions have support for this kernel module so it is straightforward
-   to install it:
-
-   .. code-block:: console
-
-      modprobe uio
-
-   The module should now be listed by the lsmod command.
-
-#. **To install the igb_uio kernel module (manually):** This module is part
-   of DPDK sources and configured by default (CONFIG_RTE_EAL_IGB_UIO=y).
-
-   .. code-block:: console
-
-      modprobe igb_uio.ko
-
-   The module should now be listed by the lsmod command.
-
-   Depending on which NFP modules are loaded, it could be necessary to
-   detach NFP devices from the nfp_netvf module. If this is the case the
-   device needs to be unbound, for example:
-
-   .. code-block:: console
-
-      echo 0000:03:08.0 > /sys/bus/pci/devices/0000:03:08.0/driver/unbind
-
-      lspci -d19ee: -k
-
-   The output of lspci should now show that 0000:03:08.0 is not bound to
-   any driver.
-
-   The next step is to add the NFP PCI ID to the IGB UIO driver:
-
-   .. code-block:: console
-
-      echo 19ee 6003 > /sys/bus/pci/drivers/igb_uio/new_id
-
-   And then to bind the device to the igb_uio driver:
-
-   .. code-block:: console
-
-      echo 0000:03:08.0 > /sys/bus/pci/drivers/igb_uio/bind
-
-      lspci -d19ee: -k
-
-   lspci should show that device bound to igb_uio driver.
-
-#. **Using scripts to install and bind modules:** DPDK provides scripts which are
-   useful for installing the UIO modules and for binding the right device to those
-   modules avoiding doing so manually:
-
-   * **dpdk-setup.sh**
-   * **dpdk-devbind.py**
-
-   Configuration may be performed by running dpdk-setup.sh which invokes
-   dpdk-devbind.py as needed. Executing dpdk-setup.sh will display a menu of
-   configuration options.
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 09/10] doc: refer PMD compile and test section from qede doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (7 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 08/10] doc: refer PMD compile and test section from nfp doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 10/10] doc: refer PMD compile and test section from thunderx doc Shijith Thotton
  2017-04-12 15:23     ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Ferruh Yigit
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara, Rasesh Mody, Harish Patil; +Cc: dev

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/nics/qede.rst | 176 ++++++++++++++++++-----------------------------
 1 file changed, 66 insertions(+), 110 deletions(-)

diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
index eacb3da..afe2df8 100644
--- a/doc/guides/nics/qede.rst
+++ b/doc/guides/nics/qede.rst
@@ -124,64 +124,96 @@ enabling debugging options may affect system performance.
   Empty string indicates driver will pick up the firmware file
   from the default location.
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
+Driver compilation and testing
+------------------------------
 
-To compile QEDE PMD for Linux x86_64 gcc target, run the following ``make``
-command::
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-gcc install
+SR-IOV: Prerequisites and Sample Application Notes
+--------------------------------------------------
 
-To compile QEDE PMD for Linux x86_64 clang target, run the following ``make``
-command::
+This section provides instructions to configure SR-IOV with Linux OS.
 
-   cd <DPDK-source-directory>
-   make config T=x86_64-native-linuxapp-clang install
+**Note**: librte_pmd_qede will be used to bind to SR-IOV VF device and Linux native kernel driver (QEDE) will function as SR-IOV PF driver. Requires PF driver to be 8.10.x.x or higher.
 
-To compile QEDE PMD for FreeBSD x86_64 clang target, run the following ``gmake``
-command::
+#. Verify SR-IOV and ARI capability is enabled on the adapter using ``lspci``:
 
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-clang install
+   .. code-block:: console
 
-To compile QEDE PMD for FreeBSD x86_64 gcc target, run the following ``gmake``
-command::
+      lspci -s <slot> -vvv
 
-   cd <DPDK-source-directory>
-   gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=\
-                                        /usr/local/lib/gcc49 CC=gcc49
+   Example output:
 
+   .. code-block:: console
 
-Sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~
+      [...]
+      Capabilities: [1b8 v1] Alternative Routing-ID Interpretation (ARI)
+      [...]
+      Capabilities: [1c0 v1] Single Root I/O Virtualization (SR-IOV)
+      [...]
+      Kernel driver in use: igb_uio
 
-This section demonstrates how to launch ``testpmd`` with QLogic 4xxxx
-devices managed by ``librte_pmd_qede`` in Linux operating system.
+#. Load the kernel module:
 
-#. Request huge pages:
+   .. code-block:: console
+
+      modprobe qede
+
+   Example output:
 
    .. code-block:: console
 
-      echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/ \
-                                                                nr_hugepages
+      systemd-udevd[4848]: renamed network interface eth0 to ens5f0
+      systemd-udevd[4848]: renamed network interface eth1 to ens5f1
 
-#. Load ``igb_uio`` driver:
+#. Bring up the PF ports:
 
    .. code-block:: console
 
-      insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+      ifconfig ens5f0 up
+      ifconfig ens5f1 up
+
+#. Create VF device(s):
+
+   Echo the number of VFs to be created into ``"sriov_numvfs"`` sysfs entry
+   of the parent PF.
 
-#. Bind the QLogic 4xxxx adapters to ``igb_uio`` loaded in the
-   previous step:
+   Example output:
 
    .. code-block:: console
 
-      ./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1 \
-                                              0000:84:00.2 0000:84:00.3
+      echo 2 > /sys/devices/pci0000:00/0000:00:03.0/0000:81:00.0/sriov_numvfs
 
-#. Start ``testpmd`` with basic parameters:
-   (Enable QEDE_DEBUG_INFO=y to view informational messages)
+
+#. Assign VF MAC address:
+
+   Assign MAC address to the VF using iproute2 utility. The syntax is::
+
+      ip link set <PF iface> vf <VF id> mac <macaddr>
+
+   Example output:
+
+   .. code-block:: console
+
+      ip link set ens5f0 vf 0 mac 52:54:00:2f:9d:e8
+
+
+#. PCI Passthrough:
+
+   The VF devices may be passed through to the guest VM using ``virt-manager`` or
+   ``virsh``. QEDE PMD should be used to bind the VF devices in the guest VM
+   using the instructions from Driver compilation and testing section above.
+
+
+#. Running testpmd
+   (Enable QEDE_DEBUG_INFO=y to view informational messages):
+
+   Refer to the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>` to run
+   ``testpmd`` application.
+
+   Example output:
 
    .. code-block:: console
 
@@ -236,79 +268,3 @@ devices managed by ``librte_pmd_qede`` in Linux operating system.
     Port 3 Link Up - speed 25000 Mbps - full-duplex
     Done
     testpmd>
-
-
-SR-IOV: Prerequisites and Sample Application Notes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This section provides instructions to configure SR-IOV with Linux OS.
-
-**Note**: librte_pmd_qede will be used to bind to SR-IOV VF device and Linux native kernel driver (QEDE) will function as SR-IOV PF driver. Requires PF driver to be 8.10.x.x or higher.
-
-#. Verify SR-IOV and ARI capability is enabled on the adapter using ``lspci``:
-
-   .. code-block:: console
-
-      lspci -s <slot> -vvv
-
-   Example output:
-
-   .. code-block:: console
-
-      [...]
-      Capabilities: [1b8 v1] Alternative Routing-ID Interpretation (ARI)
-      [...]
-      Capabilities: [1c0 v1] Single Root I/O Virtualization (SR-IOV)
-      [...]
-      Kernel driver in use: igb_uio
-
-#. Load the kernel module:
-
-   .. code-block:: console
-
-      modprobe qede
-
-   Example output:
-
-   .. code-block:: console
-
-      systemd-udevd[4848]: renamed network interface eth0 to ens5f0
-      systemd-udevd[4848]: renamed network interface eth1 to ens5f1
-
-#. Bring up the PF ports:
-
-   .. code-block:: console
-
-      ifconfig ens5f0 up
-      ifconfig ens5f1 up
-
-#. Create VF device(s):
-
-   Echo the number of VFs to be created into ``"sriov_numvfs"`` sysfs entry
-   of the parent PF.
-
-   Example output:
-
-   .. code-block:: console
-
-      echo 2 > /sys/devices/pci0000:00/0000:00:03.0/0000:81:00.0/sriov_numvfs
-
-
-#. Assign VF MAC address:
-
-   Assign MAC address to the VF using iproute2 utility. The syntax is::
-
-      ip link set <PF iface> vf <VF id> mac <macaddr>
-
-   Example output:
-
-   .. code-block:: console
-
-      ip link set ens5f0 vf 0 mac 52:54:00:2f:9d:e8
-
-
-#. PCI Passthrough:
-
-   The VF devices may be passed through to the guest VM using ``virt-manager`` or
-   ``virsh``. QEDE PMD should be used to bind the VF devices in the guest VM
-   using the instructions outlined in the Application notes above.
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [dpdk-dev] [PATCH v2 10/10] doc: refer PMD compile and test section from thunderx doc
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (8 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 09/10] doc: refer PMD compile and test section from qede doc Shijith Thotton
@ 2017-04-11 18:56     ` Shijith Thotton
  2017-04-12 15:23     ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Ferruh Yigit
  10 siblings, 0 replies; 42+ messages in thread
From: Shijith Thotton @ 2017-04-11 18:56 UTC (permalink / raw)
  To: Ferruh Yigit, John McNamara; +Cc: dev, Jerin Jacob

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 doc/guides/nics/thunderx.rst | 188 +++++++++++++------------------------------
 1 file changed, 55 insertions(+), 133 deletions(-)

diff --git a/doc/guides/nics/thunderx.rst b/doc/guides/nics/thunderx.rst
index 036db86..4fa0039 100644
--- a/doc/guides/nics/thunderx.rst
+++ b/doc/guides/nics/thunderx.rst
@@ -101,95 +101,18 @@ Please note that enabling debugging options may affect system performance.
 
   Toggle display of PF mailbox related run-time check messages
 
-Driver Compilation
-~~~~~~~~~~~~~~~~~~
-
-To compile the ThunderX NICVF PMD for Linux arm64 gcc target, run the
-following “make” command:
+Driver compilation and testing
+------------------------------
 
-.. code-block:: console
+Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+for details.
 
-   cd <DPDK-source-directory>
-   make config T=arm64-thunderx-linuxapp-gcc install
+To compile the ThunderX NICVF PMD for Linux arm64 gcc,
+use arm64-thunderx-linuxapp-gcc as target.
 
 Linux
 -----
 
-.. _thunderx_testpmd_example:
-
-Running testpmd
-~~~~~~~~~~~~~~~
-
-This section demonstrates how to launch ``testpmd`` with ThunderX NIC VF device
-managed by ``librte_pmd_thunderx_nicvf`` in the Linux operating system.
-
-#. Load ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-   .. _thunderx_vfio_noiommu:
-
-#. Enable **VFIO-NOIOMMU** mode (optional):
-
-   .. code-block:: console
-
-      echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
-
-   .. note::
-
-      **VFIO-NOIOMMU** is required only when running in VM context and should not be enabled otherwise.
-      See also :ref:`SR-IOV: Prerequisites and sample Application Notes <thunderx_sriov_example>`.
-
-#. Bind the ThunderX NIC VF device to ``vfio-pci`` loaded in the previous step:
-
-   Setup VFIO permissions for regular users and then bind to ``vfio-pci``:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0002:01:00.2
-
-#. Start ``testpmd`` with basic parameters:
-
-   .. code-block:: console
-
-      ./arm64-thunderx-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 0002:01:00.2 \
-        -- -i --disable-hw-vlan-filter --no-flush-rx \
-        --port-topology=loop
-
-   Example output:
-
-   .. code-block:: console
-
-      ...
-
-      PMD: rte_nicvf_pmd_init(): librte_pmd_thunderx nicvf version 1.0
-
-      ...
-      EAL:   probe driver: 177d:11 rte_nicvf_pmd
-      EAL:   using IOMMU type 1 (Type 1)
-      EAL:   PCI memory mapped at 0x3ffade50000
-      EAL: Trying to map BAR 4 that contains the MSI-X table.
-           Trying offsets: 0x40000000000:0x0000, 0x10000:0x1f0000
-      EAL:   PCI memory mapped at 0x3ffadc60000
-      PMD: nicvf_eth_dev_init(): nicvf: device (177d:11) 2:1:0:2
-      PMD: nicvf_eth_dev_init(): node=0 vf=1 mode=tns-bypass sqs=false
-           loopback_supported=true
-      PMD: nicvf_eth_dev_init(): Port 0 (177d:11) mac=a6:c6:d9:17:78:01
-      Interactive-mode selected
-      Configuring Port 0 (socket 0)
-      ...
-
-      PMD: nicvf_dev_configure(): Configured ethdev port0 hwcap=0x0
-      Port 0: A6:C6:D9:17:78:01
-      Checking link statuses...
-      Port 0 Link Up - speed 10000 Mbps - full-duplex
-      Done
-      testpmd>
-
-.. _thunderx_sriov_example:
-
 SR-IOV: Prerequisites and sample Application Notes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -248,58 +171,10 @@ This section provides instructions to configure SR-IOV with Linux OS.
 
       Unless ``thunder-nicvf`` driver is in use make sure your kernel config includes ``CONFIG_THUNDER_NIC_VF`` setting.
 
-#. Verify PF/VF bind using ``dpdk-devbind.py``:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --status
-
-   Example output:
-
-   .. code-block:: console
-
-      ...
-      0002:01:00.0 'Device a01e' if= drv=thunder-nic unused=vfio-pci
-      0002:01:00.1 'Device 0011' if=eth0 drv=thunder-nicvf unused=vfio-pci
-      0002:01:00.2 'Device 0011' if=eth1 drv=thunder-nicvf unused=vfio-pci
-      ...
-
-#. Load ``vfio-pci`` driver:
-
-   .. code-block:: console
-
-      modprobe vfio-pci
-
-#. Bind VF devices to ``vfio-pci`` using ``dpdk-devbind.py``:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0002:01:00.1
-      ./usertools/dpdk-devbind.py --bind vfio-pci 0002:01:00.2
-
-#. Verify VF bind using ``dpdk-devbind.py``:
-
-   .. code-block:: console
-
-      ./usertools/dpdk-devbind.py --status
-
-   Example output:
-
-   .. code-block:: console
-
-      ...
-      0002:01:00.1 'Device 0011' drv=vfio-pci unused=
-      0002:01:00.2 'Device 0011' drv=vfio-pci unused=
-      ...
-      0002:01:00.0 'Device a01e' if= drv=thunder-nic unused=vfio-pci
-      ...
-
 #. Pass VF device to VM context (PCIe Passthrough):
 
    The VF devices may be passed through to the guest VM using qemu or
    virt-manager or virsh etc.
-   ``librte_pmd_thunderx_nicvf`` or ``thunder-nicvf`` should be used to bind
-   the VF devices in the guest VM in :ref:`VFIO-NOIOMMU <thunderx_vfio_noiommu>` mode.
 
    Example qemu guest launch command:
 
@@ -320,8 +195,55 @@ This section provides instructions to configure SR-IOV with Linux OS.
       -serial stdio \
       -mem-path /dev/huge
 
-#. Refer to section :ref:`Running testpmd <thunderx_testpmd_example>` for instruction
-   how to launch ``testpmd`` application.
+#. Enable **VFIO-NOIOMMU** mode (optional):
+
+   .. code-block:: console
+
+      echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
+
+   .. note::
+
+      **VFIO-NOIOMMU** is required only when running in VM context and should not be enabled otherwise.
+
+#. Running testpmd:
+
+   Follow instructions available in the document
+   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
+   to run testpmd.
+
+   Example output:
+
+   .. code-block:: console
+
+      ./arm64-thunderx-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 0002:01:00.2 \
+        -- -i --disable-hw-vlan-filter --disable-crc-strip --no-flush-rx \
+        --port-topology=loop
+
+      ...
+
+      PMD: rte_nicvf_pmd_init(): librte_pmd_thunderx nicvf version 1.0
+
+      ...
+      EAL:   probe driver: 177d:11 rte_nicvf_pmd
+      EAL:   using IOMMU type 1 (Type 1)
+      EAL:   PCI memory mapped at 0x3ffade50000
+      EAL: Trying to map BAR 4 that contains the MSI-X table.
+           Trying offsets: 0x40000000000:0x0000, 0x10000:0x1f0000
+      EAL:   PCI memory mapped at 0x3ffadc60000
+      PMD: nicvf_eth_dev_init(): nicvf: device (177d:11) 2:1:0:2
+      PMD: nicvf_eth_dev_init(): node=0 vf=1 mode=tns-bypass sqs=false
+           loopback_supported=true
+      PMD: nicvf_eth_dev_init(): Port 0 (177d:11) mac=a6:c6:d9:17:78:01
+      Interactive-mode selected
+      Configuring Port 0 (socket 0)
+      ...
+
+      PMD: nicvf_dev_configure(): Configured ethdev port0 hwcap=0x0
+      Port 0: A6:C6:D9:17:78:01
+      Checking link statuses...
+      Port 0 Link Up - speed 10000 Mbps - full-duplex
+      Done
+      testpmd>
 
 Multiple Queue Set per DPDK port configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs
  2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
                       ` (9 preceding siblings ...)
  2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 10/10] doc: refer PMD compile and test section from thunderx doc Shijith Thotton
@ 2017-04-12 15:23     ` Ferruh Yigit
  10 siblings, 0 replies; 42+ messages in thread
From: Ferruh Yigit @ 2017-04-12 15:23 UTC (permalink / raw)
  To: Shijith Thotton, John McNamara; +Cc: dev

On 4/11/2017 7:56 PM, Shijith Thotton wrote:
> Steps for compiling PMDs and running testpmd in Linux are common among
> drivers. So it can be moved to a new document and be referred from other
> driver documentations.
> 
> This patchset adds a new section for compiling and testing a PMD in
> Network Interface Controller Drivers documentation. Other driver docs
> with similar part are replaced with reference to this section.
> 
> v2 changes:
> * Make doc to compile and test PMD more generic.
> * Modify docs of ark and thunderx.
> * Keep testpmd logs in PMD docs.
> 
> v1 changes:
> * Address review comments from John.
>  - Corrections to documentation.
>  - Create a new section after NIC overview for the doc.
>  - Refer the section instead of including it in PMD docs.
> * Change documentation of all PMDs with common part.
> 
> RFC:
> * http://dpdk.org/ml/archives/dev/2017-April/062848.html
> 
> Shijith Thotton (10):
>   doc: add doc to explain compiling and testing of PMD
>   doc: refer PMD compile and test section from ark doc
>   doc: refer PMD compile and test section from bnx2x doc
>   doc: refer PMD compile and test section from cxgbe doc
>   doc: refer PMD compile and test section from ena doc
>   doc: refer PMD compile and test section from i40e doc
>   doc: refer PMD compile and test section from liquidio doc
>   doc: refer PMD compile and test section from nfp doc
>   doc: refer PMD compile and test section from qede doc
>   doc: refer PMD compile and test section from thunderx doc

Series applied to dpdk-next-net/master, thanks.

Thanks Shijith for taking care of this.

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2017-04-12 15:23 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01 15:03 [dpdk-dev] [RFC 0/2] doc: consolidate common part among PMD docs Shijith Thotton
2017-04-01 15:03 ` [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd Shijith Thotton
2017-04-02 12:11   ` Mcnamara, John
2017-04-02 12:13     ` Mcnamara, John
2017-04-03  8:05     ` Shijith Thotton
2017-04-01 15:04 ` [dpdk-dev] [RFC 2/2] doc: include PMD build and run file in liquidio doc Shijith Thotton
2017-04-02 12:15   ` Mcnamara, John
2017-04-06  7:51 ` [dpdk-dev] [PATCH 0/8] doc: consolidate common part among PMD docs Shijith Thotton
2017-04-06  7:51   ` [dpdk-dev] [PATCH 1/8] doc: add doc to explain compiling and testing of PMD Shijith Thotton
2017-04-06 16:43     ` Mcnamara, John
2017-04-06 18:30     ` Thomas Monjalon
2017-04-07  7:07       ` Shijith Thotton
2017-04-07  9:23         ` Mcnamara, John
2017-04-07  9:34           ` Thomas Monjalon
2017-04-07  9:42         ` Jerin Jacob
2017-04-07 10:10           ` Shijith Thotton
2017-04-06  7:51   ` [dpdk-dev] [PATCH 2/8] doc: refer PMD compile and test section from liquidio doc Shijith Thotton
2017-04-06 16:43     ` Mcnamara, John
2017-04-06  7:51   ` [dpdk-dev] [PATCH 3/8] doc: refer PMD compile and test section from bnx2x doc Shijith Thotton
2017-04-06 16:45     ` Mcnamara, John
2017-04-06  7:51   ` [dpdk-dev] [PATCH 4/8] doc: refer PMD compile and test section from cxgbe doc Shijith Thotton
2017-04-06 16:45     ` Mcnamara, John
2017-04-06  7:51   ` [dpdk-dev] [PATCH 5/8] doc: refer PMD compile and test section from ena doc Shijith Thotton
2017-04-06 16:45     ` Mcnamara, John
2017-04-06  7:51   ` [dpdk-dev] [PATCH 6/8] doc: refer PMD compile and test section from i40e doc Shijith Thotton
2017-04-06 16:46     ` Mcnamara, John
2017-04-06  7:51   ` [dpdk-dev] [PATCH 7/8] doc: refer PMD compile and test section from nfp doc Shijith Thotton
2017-04-06 16:46     ` Mcnamara, John
2017-04-06  7:51   ` [dpdk-dev] [PATCH 8/8] doc: refer PMD compile and test section from qede doc Shijith Thotton
2017-04-06 16:46     ` Mcnamara, John
2017-04-11 18:56   ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 01/10] doc: add doc to explain compiling and testing of PMD Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 02/10] doc: refer PMD compile and test section from ark doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 03/10] doc: refer PMD compile and test section from bnx2x doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 04/10] doc: refer PMD compile and test section from cxgbe doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 05/10] doc: refer PMD compile and test section from ena doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 06/10] doc: refer PMD compile and test section from i40e doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 07/10] doc: refer PMD compile and test section from liquidio doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 08/10] doc: refer PMD compile and test section from nfp doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 09/10] doc: refer PMD compile and test section from qede doc Shijith Thotton
2017-04-11 18:56     ` [dpdk-dev] [PATCH v2 10/10] doc: refer PMD compile and test section from thunderx doc Shijith Thotton
2017-04-12 15:23     ` [dpdk-dev] [PATCH v2 00/10] doc: consolidate common part among PMD docs Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).