DPDK website maintenance
 help / color / mirror / Atom feed
* [dpdk-web] [PATCH] update quick start guide
@ 2019-07-19 13:42 A.McLoughlin
  2019-08-28 10:37 ` Mcloughlin, Aideen
  0 siblings, 1 reply; 6+ messages in thread
From: A.McLoughlin @ 2019-07-19 13:42 UTC (permalink / raw)
  To: web; +Cc: A.McLoughlin

The Quick Start Guide was unclear. This patch updates the Quick Start
Guide so that it can be more helpful to new users of DPDK. This patch
changes the use of physical ports to null ports as not all new users
will have easily usable ports.

These null ports simulate packets to avoid the process of setting up and
running a packet generator.

The previous version of the quick start guide  was only compatible with multi
socket platforms, this patch makes it compatible with single socket platforms.

Signed-off-by: A.McLoughlin <aideen.mcloughlin@intel.com>
---
 content/doc/quick-start.md | 118 ++++++++++++++++++++++---------------
 1 file changed, 69 insertions(+), 49 deletions(-)

diff --git a/content/doc/quick-start.md b/content/doc/quick-start.md
index fdffa98..d85bcb6 100644
--- a/content/doc/quick-start.md
+++ b/content/doc/quick-start.md
@@ -4,74 +4,94 @@ title = "Quick Start Guide"
 
 {{% alert theme="info" %}}<center>A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)</center>{{% /alert %}}
 
-Extract sources
-
+## Download DPDK {#download}
+---
+Download a DPDK package from [this page](/download/). It is best to download the latest stable version.
+If you want to have DPDK on a remote server or board, you must transfer the downloaded file to the board/server. You can do this with programs such as [WinSCP](https://winscp.net/eng/index.php) or [MobaXterm](https://mobaxterm.mobatek.net/download.html)
+
+## Extract source files from downloaded file {#extract}
+---
+Ensure the downloaded file is in the directory in which you want DPDK, and that you are in that same directory.
+To extract the DPDK files from the downloaded file into a new directory, run the command below
+(if you downloaded dpdk-19.05.tar.xz , the commands should reflect that eg. tar xf dpdk-19.05.tar.xz)
 ```
   tar xf dpdk.tar.gz
+```
+Enter the newly created directory with the cd command as below
+```
   cd dpdk
 ```
-
-Enable pcap (libpcap headers are required).
-
+## Build DPDK {#build}
+---
+To make any necessary config changes to the environment before DPDK is built, run the command below
 ```
-  make config T=x86_64-native-linuxapp-gcc
-  sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config
+  make defconfig
 ```
-
-Build libraries and test application (Linux headers may be needed with default config).
-
+The command below builds a usable version of DPDK from the DPDK folder. You must be within the new DPDK folder for this command to run.
+It may take a while for the command to fully run as there are a lot of elements to build in DPDK.
 ```
-  make
+  make -j
 ```
+'make' is the standard command to build an application, and '-j' tells the make command to use all the cores when building, which should speed up the building process
 
-Reserve huge pages memory.
-
+## Reserve memory for Hugepages {#hugepages}
+---
+Hugepages increase application performance as the performance cost of swapping between pages is much less than if only small pages were used.
+First make subdirectory huge in directory mnt
 ```
   mkdir -p /mnt/huge
+```
+Then make the filesystem 'hugelbfs nodev' accessible to directory structure /mnt/huge for the proper storage of the hugepages which will be created.
+```
   mount -t hugetlbfs nodev /mnt/huge
-  echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
 ```
-
-Run poll-mode driver test (with a cable between ports).
-
+Then allocate 1024 hugepages with the command below
+```
+  sysctl -w vm.nr_hugepages=1024
 ```
-  build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0     --vdev=net_pcap1,iface=eth1 --
-                  -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
-
-  testpmd> show port stats all
-
-  ######################## NIC statistics for port 0  ########################
-  RX-packets: 0          RX-errors: 0         RX-bytes: 0
-  TX-packets: 0          TX-errors: 0         TX-bytes: 0
-  ############################################################################
-
-  ######################## NIC statistics for port 1  ########################
-  RX-packets: 0          RX-errors: 0         RX-bytes: 0
-  TX-packets: 0          TX-errors: 0         TX-bytes: 0
-  ############################################################################
 
-  testpmd> start tx_first
+## Run poll-mode packet forwarding test {#run}
+---
+Run the command below to start a packet sending and receiving program
+```
+  build/app/testpmd --vdev=net_null0 --vdev=net_null1 -- -i
+```
 
+You may have a lot of errors like the one shown below. This is because we do not give specific device addresses to use, and so the system checks every available device to use before running. In this case, you can ignore those error messages
+```
+  EAL: PCI device 0000:83:00.1 on NUMA socket -1
+  EAL:   Invalid NUMA socket, default to 0
+  EAL:   probe driver: 8086:10fb net_ixgbe
+```
+Within the program, type 'start' to start transmission of packets. That will print out information on how the packets are being transmitted, and will keep transmitting until you stop transmission.
+```
+  testpmd> start
+```
+Type 'stop' to both stop transmission and display stats on the transmission, as shown below
+```
   testpmd> stop
-
+  Telling cores to stop...
+  Waiting for lcores to finish...
   ---------------------- Forward statistics for port 0  ----------------------
-  RX-packets: 2377688        RX-dropped: 0             RX-total: 2377688
-  TX-packets: 2007009        TX-dropped: 0             TX-total: 2007009
-  ----------------------------------------------------------------------------
-
+    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
+    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
+    ----------------------------------------------------------------------------
   ---------------------- Forward statistics for port 1  ----------------------
-  RX-packets: 2006977        RX-dropped: 0             RX-total: 2006977
-  TX-packets: 2377720        TX-dropped: 0             TX-total: 2377720
-  ----------------------------------------------------------------------------
-
-  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
-  RX-packets: 4384665        RX-dropped: 0             RX-total: 4384665
-  TX-packets: 4384729        TX-dropped: 0             TX-total: 4384729
-  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
+    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
+    ----------------------------------------------------------------------------
+  +++++++++++++++ Accumulated forward statistics for all ports+++++++++
+    RX-packets: 210652544      RX-dropped: 0             RX-total: 210652544
+    TX-packets: 210652544      TX-dropped: 0             TX-total: 210652544
+    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  Done.
 ```
+To exit the program, type 'quit'
 
-Some sample applications can be tested after building them.
+You have now run testpmd, a DPDK packet forwarding application. To continue learning about how to use DPDK, go to the [DPDK guide website](https://doc.dpdk.org/guides/index.html).
+
+Testpmd is a forwarding application and not a packet generator. We can see packets being sent and received in this example as the null devices (net_null0, net_null1) simulate packets.
+
+The next step in understanding and setting up DPDK is binding ports. This will allow you to send actual packets, instead of simulated packets
+For an explanation on how to bind ports to DPDK follow [these instructions](https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html) from the DPDK guide website.
 
-```
-  make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples
-```
-- 
2.17.1

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.

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

* Re: [dpdk-web] [PATCH] update quick start guide
  2019-07-19 13:42 [dpdk-web] [PATCH] update quick start guide A.McLoughlin
@ 2019-08-28 10:37 ` Mcloughlin, Aideen
  2019-08-30  5:07   ` Yasufumi Ogawa
  2019-09-03 20:16   ` Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Mcloughlin, Aideen @ 2019-08-28 10:37 UTC (permalink / raw)
  To: web

If anyone has a chance to look over this that'd be great- It's been sitting on the mailing list for a while

-----Original Message-----
From: Mcloughlin, Aideen 
Sent: Friday, July 19, 2019 2:43 PM
To: web@dpdk.org
Cc: Mcloughlin, Aideen <aideen.mcloughlin@intel.com>
Subject: [PATCH] update quick start guide

The Quick Start Guide was unclear. This patch updates the Quick Start Guide so that it can be more helpful to new users of DPDK. This patch changes the use of physical ports to null ports as not all new users will have easily usable ports.

These null ports simulate packets to avoid the process of setting up and running a packet generator.

The previous version of the quick start guide  was only compatible with multi socket platforms, this patch makes it compatible with single socket platforms.

Signed-off-by: A.McLoughlin <aideen.mcloughlin@intel.com>
---
 content/doc/quick-start.md | 118 ++++++++++++++++++++++---------------
 1 file changed, 69 insertions(+), 49 deletions(-)

diff --git a/content/doc/quick-start.md b/content/doc/quick-start.md index fdffa98..d85bcb6 100644
--- a/content/doc/quick-start.md
+++ b/content/doc/quick-start.md
@@ -4,74 +4,94 @@ title = "Quick Start Guide"
 
 {{% alert theme="info" %}}<center>A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)</center>{{% /alert %}}
 
-Extract sources
-
+## Download DPDK {#download}
+---
+Download a DPDK package from [this page](/download/). It is best to download the latest stable version.
+If you want to have DPDK on a remote server or board, you must transfer 
+the downloaded file to the board/server. You can do this with programs 
+such as [WinSCP](https://winscp.net/eng/index.php) or 
+[MobaXterm](https://mobaxterm.mobatek.net/download.html)
+
+## Extract source files from downloaded file {#extract}
+---
+Ensure the downloaded file is in the directory in which you want DPDK, and that you are in that same directory.
+To extract the DPDK files from the downloaded file into a new 
+directory, run the command below (if you downloaded dpdk-19.05.tar.xz , 
+the commands should reflect that eg. tar xf dpdk-19.05.tar.xz)
 ```
   tar xf dpdk.tar.gz
+```
+Enter the newly created directory with the cd command as below ```
   cd dpdk
 ```
-
-Enable pcap (libpcap headers are required).
-
+## Build DPDK {#build}
+---
+To make any necessary config changes to the environment before DPDK is 
+built, run the command below
 ```
-  make config T=x86_64-native-linuxapp-gcc
-  sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config
+  make defconfig
 ```
-
-Build libraries and test application (Linux headers may be needed with default config).
-
+The command below builds a usable version of DPDK from the DPDK folder. You must be within the new DPDK folder for this command to run.
+It may take a while for the command to fully run as there are a lot of elements to build in DPDK.
 ```
-  make
+  make -j
 ```
+'make' is the standard command to build an application, and '-j' tells 
+the make command to use all the cores when building, which should speed 
+up the building process
 
-Reserve huge pages memory.
-
+## Reserve memory for Hugepages {#hugepages}
+---
+Hugepages increase application performance as the performance cost of swapping between pages is much less than if only small pages were used.
+First make subdirectory huge in directory mnt
 ```
   mkdir -p /mnt/huge
+```
+Then make the filesystem 'hugelbfs nodev' accessible to directory structure /mnt/huge for the proper storage of the hugepages which will be created.
+```
   mount -t hugetlbfs nodev /mnt/huge
-  echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
 ```
-
-Run poll-mode driver test (with a cable between ports).
-
+Then allocate 1024 hugepages with the command below ```
+  sysctl -w vm.nr_hugepages=1024
 ```
-  build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0     --vdev=net_pcap1,iface=eth1 --
-                  -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
-
-  testpmd> show port stats all
-
-  ######################## NIC statistics for port 0  ########################
-  RX-packets: 0          RX-errors: 0         RX-bytes: 0
-  TX-packets: 0          TX-errors: 0         TX-bytes: 0
-  ############################################################################
-
-  ######################## NIC statistics for port 1  ########################
-  RX-packets: 0          RX-errors: 0         RX-bytes: 0
-  TX-packets: 0          TX-errors: 0         TX-bytes: 0
-  ############################################################################
 
-  testpmd> start tx_first
+## Run poll-mode packet forwarding test {#run}
+---
+Run the command below to start a packet sending and receiving program 
+```
+  build/app/testpmd --vdev=net_null0 --vdev=net_null1 -- -i ```
 
+You may have a lot of errors like the one shown below. This is because 
+we do not give specific device addresses to use, and so the system 
+checks every available device to use before running. In this case, you 
+can ignore those error messages ```
+  EAL: PCI device 0000:83:00.1 on NUMA socket -1
+  EAL:   Invalid NUMA socket, default to 0
+  EAL:   probe driver: 8086:10fb net_ixgbe
+```
+Within the program, type 'start' to start transmission of packets. That will print out information on how the packets are being transmitted, and will keep transmitting until you stop transmission.
+```
+  testpmd> start
+```
+Type 'stop' to both stop transmission and display stats on the 
+transmission, as shown below ```
   testpmd> stop
-
+  Telling cores to stop...
+  Waiting for lcores to finish...
   ---------------------- Forward statistics for port 0  ----------------------
-  RX-packets: 2377688        RX-dropped: 0             RX-total: 2377688
-  TX-packets: 2007009        TX-dropped: 0             TX-total: 2007009
-  ----------------------------------------------------------------------------
-
+    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
+    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
+    
+ ----------------------------------------------------------------------
+ ------
   ---------------------- Forward statistics for port 1  ----------------------
-  RX-packets: 2006977        RX-dropped: 0             RX-total: 2006977
-  TX-packets: 2377720        TX-dropped: 0             TX-total: 2377720
-  ----------------------------------------------------------------------------
-
-  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
-  RX-packets: 4384665        RX-dropped: 0             RX-total: 4384665
-  TX-packets: 4384729        TX-dropped: 0             TX-total: 4384729
-  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
+    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
+    
+ ----------------------------------------------------------------------
+ ------  +++++++++++++++ Accumulated forward statistics for all 
+ ports+++++++++
+    RX-packets: 210652544      RX-dropped: 0             RX-total: 210652544
+    TX-packets: 210652544      TX-dropped: 0             TX-total: 210652544
+    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  Done.
 ```
+To exit the program, type 'quit'
 
-Some sample applications can be tested after building them.
+You have now run testpmd, a DPDK packet forwarding application. To continue learning about how to use DPDK, go to the [DPDK guide website](https://doc.dpdk.org/guides/index.html).
+
+Testpmd is a forwarding application and not a packet generator. We can see packets being sent and received in this example as the null devices (net_null0, net_null1) simulate packets.
+
+The next step in understanding and setting up DPDK is binding ports. 
+This will allow you to send actual packets, instead of simulated packets For an explanation on how to bind ports to DPDK follow [these instructions](https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html) from the DPDK guide website.
 
-```
-  make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples -```
--
2.17.1


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

* Re: [dpdk-web] [PATCH] update quick start guide
  2019-08-28 10:37 ` Mcloughlin, Aideen
@ 2019-08-30  5:07   ` Yasufumi Ogawa
  2019-08-30  8:05     ` Ferruh Yigit
  2019-09-03 20:16   ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Yasufumi Ogawa @ 2019-08-30  5:07 UTC (permalink / raw)
  To: Mcloughlin, Aideen, web

Hi Aideen,

> If anyone has a chance to look over this that'd be great- It's been sitting on the mailing list for a while
> 
> -----Original Message-----
> From: Mcloughlin, Aideen
> Sent: Friday, July 19, 2019 2:43 PM
> To: web@dpdk.org
> Cc: Mcloughlin, Aideen <aideen.mcloughlin@intel.com>
> Subject: [PATCH] update quick start guide
> 
> The Quick Start Guide was unclear. This patch updates the Quick Start Guide so that it can be more helpful to new users of DPDK. This patch changes the use of physical ports to null ports as not all new users will have easily usable ports.
> 
> These null ports simulate packets to avoid the process of setting up and running a packet generator.
> 
> The previous version of the quick start guide  was only compatible with multi socket platforms, this patch makes it compatible with single socket platforms.
> 
> Signed-off-by: A.McLoughlin <aideen.mcloughlin@intel.com>
> ---
>   content/doc/quick-start.md | 118 ++++++++++++++++++++++---------------
>   1 file changed, 69 insertions(+), 49 deletions(-)
> 
> diff --git a/content/doc/quick-start.md b/content/doc/quick-start.md index fdffa98..d85bcb6 100644
> --- a/content/doc/quick-start.md
> +++ b/content/doc/quick-start.md
> @@ -4,74 +4,94 @@ title = "Quick Start Guide"
>   
>   {{% alert theme="info" %}}<center>A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)</center>{{% /alert %}}
>   
> -Extract sources
> -
> +## Download DPDK {#download}
> +---
> +Download a DPDK package from [this page](/download/). It is best to download the latest stable version.
> +If you want to have DPDK on a remote server or board, you must transfer
> +the downloaded file to the board/server. You can do this with programs
> +such as [WinSCP](https://winscp.net/eng/index.php) or
> +[MobaXterm](https://mobaxterm.mobatek.net/download.html)
> +
> +## Extract source files from downloaded file {#extract}
> +---
> +Ensure the downloaded file is in the directory in which you want DPDK, and that you are in that same directory.
> +To extract the DPDK files from the downloaded file into a new
> +directory, run the command below (if you downloaded dpdk-19.05.tar.xz ,
> +the commands should reflect that eg. tar xf dpdk-19.05.tar.xz)
>   ```
>     tar xf dpdk.tar.gz
> +```
> +Enter the newly created directory with the cd command as below ```
>     cd dpdk
>   ```
> -
> -Enable pcap (libpcap headers are required).
> -
> +## Build DPDK {#build}
> +---
> +To make any necessary config changes to the environment before DPDK is
> +built, run the command below
>   ```
> -  make config T=x86_64-native-linuxapp-gcc
> -  sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config
> +  make defconfig
>   ```
> -
> -Build libraries and test application (Linux headers may be needed with default config).
> -
> +The command below builds a usable version of DPDK from the DPDK folder. You must be within the new DPDK folder for this command to run.
> +It may take a while for the command to fully run as there are a lot of elements to build in DPDK.
>   ```
> -  make
> +  make -j
>   ```
> +'make' is the standard command to build an application, and '-j' tells
> +the make command to use all the cores when building, which should speed
> +up the building process
>   
> -Reserve huge pages memory.
> -
> +## Reserve memory for Hugepages {#hugepages}
> +---
> +Hugepages increase application performance as the performance cost of swapping between pages is much less than if only small pages were used.
> +First make subdirectory huge in directory mnt
>   ```
>     mkdir -p /mnt/huge
> +```
> +Then make the filesystem 'hugelbfs nodev' accessible to directory structure /mnt/huge for the proper storage of the hugepages which will be created.
Here is a misc typo. 'hugetlbfs nodev' correctly.

> +```
>     mount -t hugetlbfs nodev /mnt/huge
> -  echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
>   ```
> -
> -Run poll-mode driver test (with a cable between ports).
> -
> +Then allocate 1024 hugepages with the command below ```
> +  sysctl -w vm.nr_hugepages=1024
>   ```
> -  build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0     --vdev=net_pcap1,iface=eth1 --
> -                  -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
> -
> -  testpmd> show port stats all
> -
> -  ######################## NIC statistics for port 0  ########################
> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
> -  ############################################################################
> -
> -  ######################## NIC statistics for port 1  ########################
> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
> -  ############################################################################
>   
> -  testpmd> start tx_first
> +## Run poll-mode packet forwarding test {#run}
> +---
> +Run the command below to start a packet sending and receiving program
> +```
> +  build/app/testpmd --vdev=net_null0 --vdev=net_null1 -- -i ```
I am not sure it is good for using nullpmd as an example here because 
there is no description for this pmd in the recent documents. I think 
using tap pmd described in [1] is also simple and more reasonable than 
null pmd. What do you think?

build/app/testpmd --vdev=net_tap0 --vdev=net_tap1 -- -i

sudo ip link set dtap0 up; sudo ip addr add 192.168.0.250/24 dev dtap0
sudo ip link set dtap1 up; sudo ip addr add 192.168.1.250/24 dev dtap1
sudo socat interface:dtap0 interface:dtap1

[1] http://doc.dpdk.org/guides/nics/tap.html#example

Thanks,
Yasufumi

>   
> +You may have a lot of errors like the one shown below. This is because
> +we do not give specific device addresses to use, and so the system
> +checks every available device to use before running. In this case, you
> +can ignore those error messages ```
> +  EAL: PCI device 0000:83:00.1 on NUMA socket -1
> +  EAL:   Invalid NUMA socket, default to 0
> +  EAL:   probe driver: 8086:10fb net_ixgbe
> +```
> +Within the program, type 'start' to start transmission of packets. That will print out information on how the packets are being transmitted, and will keep transmitting until you stop transmission.
> +```
> +  testpmd> start
> +```
> +Type 'stop' to both stop transmission and display stats on the
> +transmission, as shown below ```
>     testpmd> stop
> -
> +  Telling cores to stop...
> +  Waiting for lcores to finish...
>     ---------------------- Forward statistics for port 0  ----------------------
> -  RX-packets: 2377688        RX-dropped: 0             RX-total: 2377688
> -  TX-packets: 2007009        TX-dropped: 0             TX-total: 2007009
> -  ----------------------------------------------------------------------------
> -
> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
> +
> + ----------------------------------------------------------------------
> + ------
>     ---------------------- Forward statistics for port 1  ----------------------
> -  RX-packets: 2006977        RX-dropped: 0             RX-total: 2006977
> -  TX-packets: 2377720        TX-dropped: 0             TX-total: 2377720
> -  ----------------------------------------------------------------------------
> -
> -  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
> -  RX-packets: 4384665        RX-dropped: 0             RX-total: 4384665
> -  TX-packets: 4384729        TX-dropped: 0             TX-total: 4384729
> -  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
> +
> + ----------------------------------------------------------------------
> + ------  +++++++++++++++ Accumulated forward statistics for all
> + ports+++++++++
> +    RX-packets: 210652544      RX-dropped: 0             RX-total: 210652544
> +    TX-packets: 210652544      TX-dropped: 0             TX-total: 210652544
> +    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +  Done.
>   ```
> +To exit the program, type 'quit'
>   
> -Some sample applications can be tested after building them.
> +You have now run testpmd, a DPDK packet forwarding application. To continue learning about how to use DPDK, go to the [DPDK guide website](https://doc.dpdk.org/guides/index.html).
> +
> +Testpmd is a forwarding application and not a packet generator. We can see packets being sent and received in this example as the null devices (net_null0, net_null1) simulate packets.
> +
> +The next step in understanding and setting up DPDK is binding ports.
> +This will allow you to send actual packets, instead of simulated packets For an explanation on how to bind ports to DPDK follow [these instructions](https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html) from the DPDK guide website.
>   
> -```
> -  make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples -```
> --
> 2.17.1
> 

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

* Re: [dpdk-web] [PATCH] update quick start guide
  2019-08-30  5:07   ` Yasufumi Ogawa
@ 2019-08-30  8:05     ` Ferruh Yigit
  2019-09-02  9:35       ` Yasufumi Ogawa
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2019-08-30  8:05 UTC (permalink / raw)
  To: Yasufumi Ogawa, Mcloughlin, Aideen, web

On 8/30/2019 6:07 AM, Yasufumi Ogawa wrote:
> Hi Aideen,
> 
>> If anyone has a chance to look over this that'd be great- It's been sitting on the mailing list for a while
>>
>> -----Original Message-----
>> From: Mcloughlin, Aideen
>> Sent: Friday, July 19, 2019 2:43 PM
>> To: web@dpdk.org
>> Cc: Mcloughlin, Aideen <aideen.mcloughlin@intel.com>
>> Subject: [PATCH] update quick start guide
>>
>> The Quick Start Guide was unclear. This patch updates the Quick Start Guide so that it can be more helpful to new users of DPDK. This patch changes the use of physical ports to null ports as not all new users will have easily usable ports.
>>
>> These null ports simulate packets to avoid the process of setting up and running a packet generator.
>>
>> The previous version of the quick start guide  was only compatible with multi socket platforms, this patch makes it compatible with single socket platforms.
>>
>> Signed-off-by: A.McLoughlin <aideen.mcloughlin@intel.com>
>> ---
>>   content/doc/quick-start.md | 118 ++++++++++++++++++++++---------------
>>   1 file changed, 69 insertions(+), 49 deletions(-)
>>
>> diff --git a/content/doc/quick-start.md b/content/doc/quick-start.md index fdffa98..d85bcb6 100644
>> --- a/content/doc/quick-start.md
>> +++ b/content/doc/quick-start.md
>> @@ -4,74 +4,94 @@ title = "Quick Start Guide"
>>   
>>   {{% alert theme="info" %}}<center>A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)</center>{{% /alert %}}
>>   
>> -Extract sources
>> -
>> +## Download DPDK {#download}
>> +---
>> +Download a DPDK package from [this page](/download/). It is best to download the latest stable version.
>> +If you want to have DPDK on a remote server or board, you must transfer
>> +the downloaded file to the board/server. You can do this with programs
>> +such as [WinSCP](https://winscp.net/eng/index.php) or
>> +[MobaXterm](https://mobaxterm.mobatek.net/download.html)
>> +
>> +## Extract source files from downloaded file {#extract}
>> +---
>> +Ensure the downloaded file is in the directory in which you want DPDK, and that you are in that same directory.
>> +To extract the DPDK files from the downloaded file into a new
>> +directory, run the command below (if you downloaded dpdk-19.05.tar.xz ,
>> +the commands should reflect that eg. tar xf dpdk-19.05.tar.xz)
>>   ```
>>     tar xf dpdk.tar.gz
>> +```
>> +Enter the newly created directory with the cd command as below ```
>>     cd dpdk
>>   ```
>> -
>> -Enable pcap (libpcap headers are required).
>> -
>> +## Build DPDK {#build}
>> +---
>> +To make any necessary config changes to the environment before DPDK is
>> +built, run the command below
>>   ```
>> -  make config T=x86_64-native-linuxapp-gcc
>> -  sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config
>> +  make defconfig
>>   ```
>> -
>> -Build libraries and test application (Linux headers may be needed with default config).
>> -
>> +The command below builds a usable version of DPDK from the DPDK folder. You must be within the new DPDK folder for this command to run.
>> +It may take a while for the command to fully run as there are a lot of elements to build in DPDK.
>>   ```
>> -  make
>> +  make -j
>>   ```
>> +'make' is the standard command to build an application, and '-j' tells
>> +the make command to use all the cores when building, which should speed
>> +up the building process
>>   
>> -Reserve huge pages memory.
>> -
>> +## Reserve memory for Hugepages {#hugepages}
>> +---
>> +Hugepages increase application performance as the performance cost of swapping between pages is much less than if only small pages were used.
>> +First make subdirectory huge in directory mnt
>>   ```
>>     mkdir -p /mnt/huge
>> +```
>> +Then make the filesystem 'hugelbfs nodev' accessible to directory structure /mnt/huge for the proper storage of the hugepages which will be created.
> Here is a misc typo. 'hugetlbfs nodev' correctly.
> 
>> +```
>>     mount -t hugetlbfs nodev /mnt/huge
>> -  echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
>>   ```
>> -
>> -Run poll-mode driver test (with a cable between ports).
>> -
>> +Then allocate 1024 hugepages with the command below ```
>> +  sysctl -w vm.nr_hugepages=1024
>>   ```
>> -  build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0     --vdev=net_pcap1,iface=eth1 --
>> -                  -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
>> -
>> -  testpmd> show port stats all
>> -
>> -  ######################## NIC statistics for port 0  ########################
>> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
>> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
>> -  ############################################################################
>> -
>> -  ######################## NIC statistics for port 1  ########################
>> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
>> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
>> -  ############################################################################
>>   
>> -  testpmd> start tx_first
>> +## Run poll-mode packet forwarding test {#run}
>> +---
>> +Run the command below to start a packet sending and receiving program
>> +```
>> +  build/app/testpmd --vdev=net_null0 --vdev=net_null1 -- -i ```
> I am not sure it is good for using nullpmd as an example here because 
> there is no description for this pmd in the recent documents. I think 
> using tap pmd described in [1] is also simple and more reasonable than 
> null pmd. What do you think?
> 
> build/app/testpmd --vdev=net_tap0 --vdev=net_tap1 -- -i
> 
> sudo ip link set dtap0 up; sudo ip addr add 192.168.0.250/24 dev dtap0
> sudo ip link set dtap1 up; sudo ip addr add 192.168.1.250/24 dev dtap1
> sudo socat interface:dtap0 interface:dtap1
> 
> [1] http://doc.dpdk.org/guides/nics/tap.html#example

null PMD is easy to use, it doesn't have any hw and platform dependency or any
configuration requirement, it looks like good fit for Quick Start Guide.

But I agree on your concern that null PMD has no documentation, perhaps we
should fix this by adding some documentation for it.

> 
> Thanks,
> Yasufumi
> 
>>   
>> +You may have a lot of errors like the one shown below. This is because
>> +we do not give specific device addresses to use, and so the system
>> +checks every available device to use before running. In this case, you
>> +can ignore those error messages ```
>> +  EAL: PCI device 0000:83:00.1 on NUMA socket -1
>> +  EAL:   Invalid NUMA socket, default to 0
>> +  EAL:   probe driver: 8086:10fb net_ixgbe
>> +```
>> +Within the program, type 'start' to start transmission of packets. That will print out information on how the packets are being transmitted, and will keep transmitting until you stop transmission.
>> +```
>> +  testpmd> start
>> +```
>> +Type 'stop' to both stop transmission and display stats on the
>> +transmission, as shown below ```
>>     testpmd> stop
>> -
>> +  Telling cores to stop...
>> +  Waiting for lcores to finish...
>>     ---------------------- Forward statistics for port 0  ----------------------
>> -  RX-packets: 2377688        RX-dropped: 0             RX-total: 2377688
>> -  TX-packets: 2007009        TX-dropped: 0             TX-total: 2007009
>> -  ----------------------------------------------------------------------------
>> -
>> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
>> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
>> +
>> + ----------------------------------------------------------------------
>> + ------
>>     ---------------------- Forward statistics for port 1  ----------------------
>> -  RX-packets: 2006977        RX-dropped: 0             RX-total: 2006977
>> -  TX-packets: 2377720        TX-dropped: 0             TX-total: 2377720
>> -  ----------------------------------------------------------------------------
>> -
>> -  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
>> -  RX-packets: 4384665        RX-dropped: 0             RX-total: 4384665
>> -  TX-packets: 4384729        TX-dropped: 0             TX-total: 4384729
>> -  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
>> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
>> +
>> + ----------------------------------------------------------------------
>> + ------  +++++++++++++++ Accumulated forward statistics for all
>> + ports+++++++++
>> +    RX-packets: 210652544      RX-dropped: 0             RX-total: 210652544
>> +    TX-packets: 210652544      TX-dropped: 0             TX-total: 210652544
>> +    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> +  Done.
>>   ```
>> +To exit the program, type 'quit'
>>   
>> -Some sample applications can be tested after building them.
>> +You have now run testpmd, a DPDK packet forwarding application. To continue learning about how to use DPDK, go to the [DPDK guide website](https://doc.dpdk.org/guides/index.html).
>> +
>> +Testpmd is a forwarding application and not a packet generator. We can see packets being sent and received in this example as the null devices (net_null0, net_null1) simulate packets.
>> +
>> +The next step in understanding and setting up DPDK is binding ports.
>> +This will allow you to send actual packets, instead of simulated packets For an explanation on how to bind ports to DPDK follow [these instructions](https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html) from the DPDK guide website.
>>   
>> -```
>> -  make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples -```
>> --
>> 2.17.1
>>


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

* Re: [dpdk-web] [PATCH] update quick start guide
  2019-08-30  8:05     ` Ferruh Yigit
@ 2019-09-02  9:35       ` Yasufumi Ogawa
  0 siblings, 0 replies; 6+ messages in thread
From: Yasufumi Ogawa @ 2019-09-02  9:35 UTC (permalink / raw)
  To: Ferruh Yigit, Mcloughlin, Aideen, web

On 2019/08/30 17:05, Ferruh Yigit wrote:
> On 8/30/2019 6:07 AM, Yasufumi Ogawa wrote:
>> Hi Aideen,
>>
>>> If anyone has a chance to look over this that'd be great- It's been sitting on the mailing list for a while
>>>
>>> -----Original Message-----
>>> From: Mcloughlin, Aideen
>>> Sent: Friday, July 19, 2019 2:43 PM
>>> To: web@dpdk.org
>>> Cc: Mcloughlin, Aideen <aideen.mcloughlin@intel.com>
>>> Subject: [PATCH] update quick start guide
>>>
>>> The Quick Start Guide was unclear. This patch updates the Quick Start Guide so that it can be more helpful to new users of DPDK. This patch changes the use of physical ports to null ports as not all new users will have easily usable ports.
>>>
>>> These null ports simulate packets to avoid the process of setting up and running a packet generator.
>>>
>>> The previous version of the quick start guide  was only compatible with multi socket platforms, this patch makes it compatible with single socket platforms.
>>>
>>> Signed-off-by: A.McLoughlin <aideen.mcloughlin@intel.com>
>>> ---
>>>    content/doc/quick-start.md | 118 ++++++++++++++++++++++---------------
>>>    1 file changed, 69 insertions(+), 49 deletions(-)
>>>
>>> diff --git a/content/doc/quick-start.md b/content/doc/quick-start.md index fdffa98..d85bcb6 100644
>>> --- a/content/doc/quick-start.md
>>> +++ b/content/doc/quick-start.md
>>> @@ -4,74 +4,94 @@ title = "Quick Start Guide"
>>>    
>>>    {{% alert theme="info" %}}<center>A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)</center>{{% /alert %}}
>>>    
>>> -Extract sources
>>> -
>>> +## Download DPDK {#download}
>>> +---
>>> +Download a DPDK package from [this page](/download/). It is best to download the latest stable version.
>>> +If you want to have DPDK on a remote server or board, you must transfer
>>> +the downloaded file to the board/server. You can do this with programs
>>> +such as [WinSCP](https://winscp.net/eng/index.php) or
>>> +[MobaXterm](https://mobaxterm.mobatek.net/download.html)
>>> +
>>> +## Extract source files from downloaded file {#extract}
>>> +---
>>> +Ensure the downloaded file is in the directory in which you want DPDK, and that you are in that same directory.
>>> +To extract the DPDK files from the downloaded file into a new
>>> +directory, run the command below (if you downloaded dpdk-19.05.tar.xz ,
>>> +the commands should reflect that eg. tar xf dpdk-19.05.tar.xz)
>>>    ```
>>>      tar xf dpdk.tar.gz
>>> +```
>>> +Enter the newly created directory with the cd command as below ```
>>>      cd dpdk
>>>    ```
>>> -
>>> -Enable pcap (libpcap headers are required).
>>> -
>>> +## Build DPDK {#build}
>>> +---
>>> +To make any necessary config changes to the environment before DPDK is
>>> +built, run the command below
>>>    ```
>>> -  make config T=x86_64-native-linuxapp-gcc
>>> -  sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config
>>> +  make defconfig
>>>    ```
>>> -
>>> -Build libraries and test application (Linux headers may be needed with default config).
>>> -
>>> +The command below builds a usable version of DPDK from the DPDK folder. You must be within the new DPDK folder for this command to run.
>>> +It may take a while for the command to fully run as there are a lot of elements to build in DPDK.
>>>    ```
>>> -  make
>>> +  make -j
>>>    ```
>>> +'make' is the standard command to build an application, and '-j' tells
>>> +the make command to use all the cores when building, which should speed
>>> +up the building process
>>>    
>>> -Reserve huge pages memory.
>>> -
>>> +## Reserve memory for Hugepages {#hugepages}
>>> +---
>>> +Hugepages increase application performance as the performance cost of swapping between pages is much less than if only small pages were used.
>>> +First make subdirectory huge in directory mnt
>>>    ```
>>>      mkdir -p /mnt/huge
>>> +```
>>> +Then make the filesystem 'hugelbfs nodev' accessible to directory structure /mnt/huge for the proper storage of the hugepages which will be created.
>> Here is a misc typo. 'hugetlbfs nodev' correctly.
>>
>>> +```
>>>      mount -t hugetlbfs nodev /mnt/huge
>>> -  echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
>>>    ```
>>> -
>>> -Run poll-mode driver test (with a cable between ports).
>>> -
>>> +Then allocate 1024 hugepages with the command below ```
>>> +  sysctl -w vm.nr_hugepages=1024
>>>    ```
>>> -  build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0     --vdev=net_pcap1,iface=eth1 --
>>> -                  -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
>>> -
>>> -  testpmd> show port stats all
>>> -
>>> -  ######################## NIC statistics for port 0  ########################
>>> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
>>> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
>>> -  ############################################################################
>>> -
>>> -  ######################## NIC statistics for port 1  ########################
>>> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
>>> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
>>> -  ############################################################################
>>>    
>>> -  testpmd> start tx_first
>>> +## Run poll-mode packet forwarding test {#run}
>>> +---
>>> +Run the command below to start a packet sending and receiving program
>>> +```
>>> +  build/app/testpmd --vdev=net_null0 --vdev=net_null1 -- -i ```
>> I am not sure it is good for using nullpmd as an example here because
>> there is no description for this pmd in the recent documents. I think
>> using tap pmd described in [1] is also simple and more reasonable than
>> null pmd. What do you think?
>>
>> build/app/testpmd --vdev=net_tap0 --vdev=net_tap1 -- -i
>>
>> sudo ip link set dtap0 up; sudo ip addr add 192.168.0.250/24 dev dtap0
>> sudo ip link set dtap1 up; sudo ip addr add 192.168.1.250/24 dev dtap1
>> sudo socat interface:dtap0 interface:dtap1
>>
>> [1] http://doc.dpdk.org/guides/nics/tap.html#example
> 
> null PMD is easy to use, it doesn't have any hw and platform dependency or any
> configuration requirement, it looks like good fit for Quick Start Guide.
> 
> But I agree on your concern that null PMD has no documentation, perhaps we
> should fix this by adding some documentation for it.
Hi Ferruh,

I agree to add the documentation! As a user of null PMD, I hope 
community will continue to support the feature well.

Thanks,
Yasufumi

> 
>>
>> Thanks,
>> Yasufumi
>>
>>>    
>>> +You may have a lot of errors like the one shown below. This is because
>>> +we do not give specific device addresses to use, and so the system
>>> +checks every available device to use before running. In this case, you
>>> +can ignore those error messages ```
>>> +  EAL: PCI device 0000:83:00.1 on NUMA socket -1
>>> +  EAL:   Invalid NUMA socket, default to 0
>>> +  EAL:   probe driver: 8086:10fb net_ixgbe
>>> +```
>>> +Within the program, type 'start' to start transmission of packets. That will print out information on how the packets are being transmitted, and will keep transmitting until you stop transmission.
>>> +```
>>> +  testpmd> start
>>> +```
>>> +Type 'stop' to both stop transmission and display stats on the
>>> +transmission, as shown below ```
>>>      testpmd> stop
>>> -
>>> +  Telling cores to stop...
>>> +  Waiting for lcores to finish...
>>>      ---------------------- Forward statistics for port 0  ----------------------
>>> -  RX-packets: 2377688        RX-dropped: 0             RX-total: 2377688
>>> -  TX-packets: 2007009        TX-dropped: 0             TX-total: 2007009
>>> -  ----------------------------------------------------------------------------
>>> -
>>> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
>>> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
>>> +
>>> + ----------------------------------------------------------------------
>>> + ------
>>>      ---------------------- Forward statistics for port 1  ----------------------
>>> -  RX-packets: 2006977        RX-dropped: 0             RX-total: 2006977
>>> -  TX-packets: 2377720        TX-dropped: 0             TX-total: 2377720
>>> -  ----------------------------------------------------------------------------
>>> -
>>> -  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
>>> -  RX-packets: 4384665        RX-dropped: 0             RX-total: 4384665
>>> -  TX-packets: 4384729        TX-dropped: 0             TX-total: 4384729
>>> -  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
>>> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
>>> +
>>> + ----------------------------------------------------------------------
>>> + ------  +++++++++++++++ Accumulated forward statistics for all
>>> + ports+++++++++
>>> +    RX-packets: 210652544      RX-dropped: 0             RX-total: 210652544
>>> +    TX-packets: 210652544      TX-dropped: 0             TX-total: 210652544
>>> +    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> +  Done.
>>>    ```
>>> +To exit the program, type 'quit'
>>>    
>>> -Some sample applications can be tested after building them.
>>> +You have now run testpmd, a DPDK packet forwarding application. To continue learning about how to use DPDK, go to the [DPDK guide website](https://doc.dpdk.org/guides/index.html).
>>> +
>>> +Testpmd is a forwarding application and not a packet generator. We can see packets being sent and received in this example as the null devices (net_null0, net_null1) simulate packets.
>>> +
>>> +The next step in understanding and setting up DPDK is binding ports.
>>> +This will allow you to send actual packets, instead of simulated packets For an explanation on how to bind ports to DPDK follow [these instructions](https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html) from the DPDK guide website.
>>>    
>>> -```
>>> -  make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples -```
>>> --
>>> 2.17.1
>>>
> 
> .
> 

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

* Re: [dpdk-web] [PATCH] update quick start guide
  2019-08-28 10:37 ` Mcloughlin, Aideen
  2019-08-30  5:07   ` Yasufumi Ogawa
@ 2019-09-03 20:16   ` Thomas Monjalon
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2019-09-03 20:16 UTC (permalink / raw)
  To: Mcloughlin, Aideen; +Cc: web

28/08/2019 12:37, Mcloughlin, Aideen:
> If anyone has a chance to look over this that'd be great- It's been sitting on the mailing list for a while


I would like to read more comments about this writeup.
Personnally I am not sure it is the right direction.
It looks to be a tutorial for babies.
Is it really what we want as a "quick start guide"?

When I wrote the first version of this page, the intent was
to provide a quick demo for skilled people who just downloaded
the package and want to do a quick run.
If a user is interested in more help or details, the user guides
should be more appropriate.


> From: Mcloughlin, Aideen 
> 
> The Quick Start Guide was unclear. This patch updates the Quick Start Guide so that it can be more helpful to new users of DPDK. This patch changes the use of physical ports to null ports as not all new users will have easily usable ports.
> 
> These null ports simulate packets to avoid the process of setting up and running a packet generator.
> 
> The previous version of the quick start guide  was only compatible with multi socket platforms, this patch makes it compatible with single socket platforms.
> 
> Signed-off-by: A.McLoughlin <aideen.mcloughlin@intel.com>
> ---
>  content/doc/quick-start.md | 118 ++++++++++++++++++++++---------------
>  1 file changed, 69 insertions(+), 49 deletions(-)
> 
> diff --git a/content/doc/quick-start.md b/content/doc/quick-start.md index fdffa98..d85bcb6 100644
> --- a/content/doc/quick-start.md
> +++ b/content/doc/quick-start.md
> @@ -4,74 +4,94 @@ title = "Quick Start Guide"
>  
>  {{% alert theme="info" %}}<center>A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)</center>{{% /alert %}}
>  
> -Extract sources
> -
> +## Download DPDK {#download}
> +---
> +Download a DPDK package from [this page](/download/). It is best to download the latest stable version.
> +If you want to have DPDK on a remote server or board, you must transfer 
> +the downloaded file to the board/server. You can do this with programs 
> +such as [WinSCP](https://winscp.net/eng/index.php) or 
> +[MobaXterm](https://mobaxterm.mobatek.net/download.html)
> +
> +## Extract source files from downloaded file {#extract}
> +---
> +Ensure the downloaded file is in the directory in which you want DPDK, and that you are in that same directory.
> +To extract the DPDK files from the downloaded file into a new 
> +directory, run the command below (if you downloaded dpdk-19.05.tar.xz , 
> +the commands should reflect that eg. tar xf dpdk-19.05.tar.xz)
>  ```
>    tar xf dpdk.tar.gz
> +```
> +Enter the newly created directory with the cd command as below ```
>    cd dpdk
>  ```
> -
> -Enable pcap (libpcap headers are required).
> -
> +## Build DPDK {#build}
> +---
> +To make any necessary config changes to the environment before DPDK is 
> +built, run the command below
>  ```
> -  make config T=x86_64-native-linuxapp-gcc
> -  sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config
> +  make defconfig
>  ```
> -
> -Build libraries and test application (Linux headers may be needed with default config).
> -
> +The command below builds a usable version of DPDK from the DPDK folder. You must be within the new DPDK folder for this command to run.
> +It may take a while for the command to fully run as there are a lot of elements to build in DPDK.
>  ```
> -  make
> +  make -j
>  ```
> +'make' is the standard command to build an application, and '-j' tells 
> +the make command to use all the cores when building, which should speed 
> +up the building process
>  
> -Reserve huge pages memory.
> -
> +## Reserve memory for Hugepages {#hugepages}
> +---
> +Hugepages increase application performance as the performance cost of swapping between pages is much less than if only small pages were used.
> +First make subdirectory huge in directory mnt
>  ```
>    mkdir -p /mnt/huge
> +```
> +Then make the filesystem 'hugelbfs nodev' accessible to directory structure /mnt/huge for the proper storage of the hugepages which will be created.
> +```
>    mount -t hugetlbfs nodev /mnt/huge
> -  echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
>  ```
> -
> -Run poll-mode driver test (with a cable between ports).
> -
> +Then allocate 1024 hugepages with the command below ```
> +  sysctl -w vm.nr_hugepages=1024
>  ```
> -  build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0     --vdev=net_pcap1,iface=eth1 --
> -                  -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
> -
> -  testpmd> show port stats all
> -
> -  ######################## NIC statistics for port 0  ########################
> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
> -  ############################################################################
> -
> -  ######################## NIC statistics for port 1  ########################
> -  RX-packets: 0          RX-errors: 0         RX-bytes: 0
> -  TX-packets: 0          TX-errors: 0         TX-bytes: 0
> -  ############################################################################
>  
> -  testpmd> start tx_first
> +## Run poll-mode packet forwarding test {#run}
> +---
> +Run the command below to start a packet sending and receiving program 
> +```
> +  build/app/testpmd --vdev=net_null0 --vdev=net_null1 -- -i ```
>  
> +You may have a lot of errors like the one shown below. This is because 
> +we do not give specific device addresses to use, and so the system 
> +checks every available device to use before running. In this case, you 
> +can ignore those error messages ```
> +  EAL: PCI device 0000:83:00.1 on NUMA socket -1
> +  EAL:   Invalid NUMA socket, default to 0
> +  EAL:   probe driver: 8086:10fb net_ixgbe
> +```
> +Within the program, type 'start' to start transmission of packets. That will print out information on how the packets are being transmitted, and will keep transmitting until you stop transmission.
> +```
> +  testpmd> start
> +```
> +Type 'stop' to both stop transmission and display stats on the 
> +transmission, as shown below ```
>    testpmd> stop
> -
> +  Telling cores to stop...
> +  Waiting for lcores to finish...
>    ---------------------- Forward statistics for port 0  ----------------------
> -  RX-packets: 2377688        RX-dropped: 0             RX-total: 2377688
> -  TX-packets: 2007009        TX-dropped: 0             TX-total: 2007009
> -  ----------------------------------------------------------------------------
> -
> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
> +    
> + ----------------------------------------------------------------------
> + ------
>    ---------------------- Forward statistics for port 1  ----------------------
> -  RX-packets: 2006977        RX-dropped: 0             RX-total: 2006977
> -  TX-packets: 2377720        TX-dropped: 0             TX-total: 2377720
> -  ----------------------------------------------------------------------------
> -
> -  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
> -  RX-packets: 4384665        RX-dropped: 0             RX-total: 4384665
> -  TX-packets: 4384729        TX-dropped: 0             TX-total: 4384729
> -  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +    RX-packets: 105326272      RX-dropped: 0             RX-total: 105326272
> +    TX-packets: 105326272      TX-dropped: 0             TX-total: 105326272
> +    
> + ----------------------------------------------------------------------
> + ------  +++++++++++++++ Accumulated forward statistics for all 
> + ports+++++++++
> +    RX-packets: 210652544      RX-dropped: 0             RX-total: 210652544
> +    TX-packets: 210652544      TX-dropped: 0             TX-total: 210652544
> +    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +  Done.
>  ```
> +To exit the program, type 'quit'
>  
> -Some sample applications can be tested after building them.
> +You have now run testpmd, a DPDK packet forwarding application. To continue learning about how to use DPDK, go to the [DPDK guide website](https://doc.dpdk.org/guides/index.html).
> +
> +Testpmd is a forwarding application and not a packet generator. We can see packets being sent and received in this example as the null devices (net_null0, net_null1) simulate packets.
> +
> +The next step in understanding and setting up DPDK is binding ports. 
> +This will allow you to send actual packets, instead of simulated packets For an explanation on how to bind ports to DPDK follow [these instructions](https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html) from the DPDK guide website.
>  
> -```
> -  make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples -```
> --
> 2.17.1
> 
> 






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

end of thread, other threads:[~2019-09-03 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 13:42 [dpdk-web] [PATCH] update quick start guide A.McLoughlin
2019-08-28 10:37 ` Mcloughlin, Aideen
2019-08-30  5:07   ` Yasufumi Ogawa
2019-08-30  8:05     ` Ferruh Yigit
2019-09-02  9:35       ` Yasufumi Ogawa
2019-09-03 20:16   ` Thomas Monjalon

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