usertools: add DPDK quick-start python script
PATCH v2 1/1 usertools: add DPDK quick-start python script
Add a script meant to be linked off the DPDK website from the quick start page to allow user to quickly download DPDK, configure, build DPDK and run TestPMD. It uses ``dialog`` as a user interface.
This script performs the following:
* Gets the latest DPDK release
* Gets the necessary dependencies (if needed)
* Builds DPDK with the default target
* Sets up hugepages
* Helps the user to select the ports to use on DPDK
* Runs TestPMD, showing packet forwarding between two ports
This patch also adds a new user guide for the script.
The script has no dependencies (apart from Python), and is intended to be standalone to allow easy downloading via web link on the DPDK website.
A separate patch will be submitted to the web repo adding a link to this script at http://git.dpdk.org/dpdk/plain/usertools/dpdk-quickstart.py
along with a relevant description of what the script does. It will be an addition to the page at https://core.dpdk.org/doc/quick-start/
changes in v2:
* Moved the script from being stored in the website repo to being in the usertools directory of the DPDK repo, as suggested by Thomas.
* added a userguide
--- doc/guides/linux_gsg/dpdk_quickstart.rst | 206 +++++ doc/guides/linux_gsg/index.rst | 1 + doc/guides/linux_gsg/quick_start.rst | 4 +- usertools/dpdk-quickstart.py | 996 +++++++++++++++++++++++ 4 files changed, 1205 insertions(+), 2 deletions(-) create mode 100644 doc/guides/linux_gsg/dpdk_quickstart.rst create mode 100755 usertools/dpdk-quickstart.py
doc/guides/linux_gsg/dpdk_quickstart.rst new file +206 -0
@@ -0,0 +1,206 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2010-2014 Intel Corporation. + +.. _linux_quickstart_script: + +DPDK Quick-Start Script +======================== + +The ``dpdk-quickstart.py`` script provides a quick way to get DPDK up and running. +With this script, there is no need to download the DPDK source archive first, +as the script performs that task, as well as building and running an +example app (TestPMD). + +The script can be downloaded here: http://git.dpdk.org/dpdk/plain/usertools/dpdk-quickstart.py + +The script performs the following operations, on a guided and +interactive graphical interface: + +* Gets the latest DPDK release from the main git repository + +* Checks and downloads the necessary dependencies + +* Builds DPDK with the default target + +* Sets up the minimum amount of hugepages to run TestPMD (a basic L2 + forwarding application) + +* Helps the user to select the ports to use on DPDK (including loopback + detection between ports) + +* Runs TestPMD, to show packet forwarding between two ports (virtual + interfaces can also be used, if no ports connected with a loopback + are available). + +Note that this script is only supported on Fedora and Ubuntu. + +If you prefer to have more control of what's going on, then see the +:doc:`DPDK Setup Script<quick_start>` section. + +Alternatively, DPDK can be installed and configured in a more manual +manner, and without using NICs using the following instructions on +the DPDK website: https://core.dpdk.org/doc/quick-start/ + + +Downloading and Running +----------------------- + +The user does not need to have previously downloaded DPDK, as the script +does that as part of it's operation, so all that is needed is to get the +script onto a supported system: + +.. code-block:: console + + wget http://git.dpdk.org/dpdk/plain/usertools/dpdk-quickstart.py + +Once the script is downloaded, it should be simply a case of running on the +command line: + +.. code-block:: console + + python ./dpdk-quickstart.py + + +Depending on what packages are already installed on the system, the script +will prompt the user to allow it to install some required dependencies. +In the following example, the dialog package is needed for the text-based +gui: + +.. code-block:: console + + We are about to install following dependencies. + dialog libnuma-dev + Do you want to continue? (Y/n) + +Once all the dependencies are installed, the DPDK repository will be cloned. + +.. code-block:: console + + ---------------------------------------------------------------------- + | Cloning DPDK repository from dpdk.org... | + ---------------------------------------------------------------------- + | Cloning into 'dpdk_demo'... | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + ---------------------------------------------------------------------- + +Once the repolitory is successfully checked out, DPDK is then built, along +with the TestPMD application. + +.. code-block:: console + + ---------------------------------------------------------------------- + | Compiling DPDK... | + ---------------------------------------------------------------------- + | == Build lib | + | == Build lib/librte_compat | + | == Build lib/librte_cfgfile | + | SYMLINK-FILE include/rte_compat.h | + | SYMLINK-FILE include/rte_cfgfile.h | + | CC rte_cfgfile.o | + | == Build lib/librte_kvargs | + | AR librte_cfgfile.a | + | INSTALL-LIB librte_cfgfile.a | + | SYMLINK-FILE include/rte_kvargs.h | + | CC rte_kvargs.o | + | AR librte_kvargs.a | + | INSTALL-LIB librte_kvargs.a | + | == Build lib/librte_eal | + | | + | | + ---------------------------------------------------------------------- + +The user may then be asked to input the number of hugepages to configure. +The number displayed is the minimum required to run testpmd, and may be +increased if desired. + +.. code-block:: console + + -------------------------- + | Number of Hugepages | + | (Minimum required | + | displayed) | + -------------------------- + | |32 | | + -------------------------- + | < OK > <Cancel> | + -------------------------- + +Next, to the NIC selection. If the user knows which ports are looped back, +they may select them at this stage. They may also attempt the auto-select +feature, which pings on each port and attempts to discover which ports have +a loopback cable. + +.. code-block:: console + + ---------------------------------------------------------------------- + | Select two loopback ports to bind to DPDK driver (<space> to | + | select/deselect) | + ---------------------------------------------------------------------- + | [ ] 0000:18:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection | + | [ ] 0000:18:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection | + | [ ] 0000:41:00.0 Ethernet Connection X722 for 10GBASE-T | + | [ ] 0000:41:00.1 Ethernet Connection X722 for 10GBASE-T | + | [ ] 0000:86:00.0 82599ES 10-Gigabit SFI/SFP+ Network Connection | + | [ ] 0000:86:00.1 82599ES 10-Gigabit SFI/SFP+ Network Connection | + | [*] 0000:af:00.0 Ethernet Controller XL710 for 40GbE QSFP+ | + | [ ] 0000:af:00.1 Ethernet Controller XL710 for 40GbE QSFP+ | + | [*] 0000:b1:00.0 Ethernet Controller XL710 for 40GbE QSFP+ | + | [ ] 0000:b1:00.1 Ethernet Controller XL710 for 40GbE QSFP+ | + ---------------------------------------------------------------------- + | | + | | + ---------------------------------------------------------------------- + | <Use ports selected> < Detect loopback > <Use Virtual ports > | + ---------------------------------------------------------------------- + +Then the testpmd application is run. + +.. code-block:: console + + ---------------------------------------------------------------------- + | About to run testpmd DPDK application... | + ---------------------------------------------------------------------- + | < OK > | + ---------------------------------------------------------------------- + +There should be traffic flowing, and the user should see the statics +increasing every few seconds. + +.. code-block:: console + + Port statistics ==================================== + ######################## NIC statistics for port 0 ######################## + RX-packets: 0 RX-missed: 0 RX-bytes: 0 + RX-errors: 0 + RX-nombuf: 0 + TX-packets: 32 TX-errors: 0 TX-bytes: 2048 + + Throughput (since last show) + Rx-pps: 0 + Tx-pps: 0 + ############################################################################ + + ######################## NIC statistics for port 1 ######################## + RX-packets: 0 RX-missed: 0 RX-bytes: 0 + RX-errors: 0 + RX-nombuf: 0 + TX-packets: 32 TX-errors: 0 TX-bytes: 2048 + + Throughput (since last show) + Rx-pps: 0 + Tx-pps: 0 + ############################################################################ + + +
doc/guides/linux_gsg/index.rst +1 -0
@@ -17,5 +17,6 @@ Getting Started Guide for Linux linux_drivers build_sample_apps enable_func + dpdk_quickstart quick_start nic_perf_intel_platform
doc/guides/linux_gsg/quick_start.rst +2 -2
@@ -3,8 +3,8 @@ .. _linux_setup_script: -Quick Start Setup Script -======================== +DPDK Setup Script +================= The dpdk-setup.sh script, found in the usertools subdirectory, allows the user to perform the following tasks:
usertools/dpdk-quickstart.py new file +996 -0
996 lines not on this page · raw message
Signature · 1 line
2.17.1