aboutsummaryrefslogtreecommitdiffstats
path: root/doc/guides/linux_gsg
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-05-16 14:51:32 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2017-05-16 16:20:45 +0200
commit7595afa4d30097c1177b69257118d8ad89a539be (patch)
tree4bfeadc905c977e45e54a90c42330553b8942e4e /doc/guides/linux_gsg
parentce3d555e43e3795b5d9507fcfc76b7a0a92fd0d6 (diff)
Imported Upstream version 17.05
Change-Id: Id1e419c5a214e4a18739663b91f0f9a549f1fdc6 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'doc/guides/linux_gsg')
-rw-r--r--doc/guides/linux_gsg/build_dpdk.rst26
-rw-r--r--doc/guides/linux_gsg/build_sample_apps.rst26
-rw-r--r--doc/guides/linux_gsg/nic_perf_intel_platform.rst8
-rw-r--r--doc/guides/linux_gsg/quick_start.rst6
-rw-r--r--doc/guides/linux_gsg/sys_reqs.rst16
5 files changed, 50 insertions, 32 deletions
diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
index 527c38dc..cf6c06d6 100644
--- a/doc/guides/linux_gsg/build_dpdk.rst
+++ b/doc/guides/linux_gsg/build_dpdk.rst
@@ -45,8 +45,8 @@ First, uncompress the archive and move to the uncompressed DPDK source directory
.. code-block:: console
- unzip DPDK-<version>.zip
- cd DPDK-<version>
+ tar xJf dpdk-<version>.tar.xz
+ cd dpdk-<version>
The DPDK is composed of several directories:
@@ -58,7 +58,7 @@ The DPDK is composed of several directories:
* examples: Source code of DPDK application examples
-* config, tools, scripts, mk: Framework-related makefiles, scripts and configuration
+* config, buildtools, mk: Framework-related makefiles, scripts and configuration
Installation of DPDK Target Environments
----------------------------------------
@@ -155,6 +155,10 @@ can provide the uio capability. This module can be loaded using the command
sudo modprobe uio_pci_generic
+.. note::
+
+ ``uio_pci_generic`` module doesn't support the creation of virtual functions.
+
As an alternative to the ``uio_pci_generic``, the DPDK also includes the igb_uio
module which can be found in the kmod subdirectory referred to above. It can
be loaded as shown below:
@@ -187,8 +191,12 @@ however please consult your distributions documentation to make sure that is the
Also, to use VFIO, both kernel and BIOS must support and be configured to use IO virtualization (such as IntelĀ® VT-d).
+.. note::
+
+ ``vfio-pci`` module doesn't support the creation of virtual functions.
+
For proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up.
-This can be done by using the DPDK setup script (called dpdk-setup.sh and located in the tools directory).
+This can be done by using the DPDK setup script (called dpdk-setup.sh and located in the usertools directory).
.. _linux_gsg_binding_kernel:
@@ -208,7 +216,7 @@ Any network ports under Linux* control will be ignored by the DPDK poll-mode dri
To bind ports to the ``uio_pci_generic``, ``igb_uio`` or ``vfio-pci`` module for DPDK use,
and then subsequently return ports to Linux* control,
-a utility script called dpdk_nic _bind.py is provided in the tools subdirectory.
+a utility script called dpdk-devbind.py is provided in the usertools subdirectory.
This utility can be used to provide a view of the current state of the network ports on the system,
and to bind and unbind those ports from the different kernel modules, including the uio and vfio modules.
The following are some examples of how the script can be used.
@@ -235,7 +243,7 @@ To see the status of all network ports on the system:
.. code-block:: console
- ./tools/dpdk-devbind.py --status
+ ./usertools/dpdk-devbind.py --status
Network devices using DPDK-compatible driver
============================================
@@ -257,16 +265,16 @@ To bind device ``eth1``,``04:00.1``, to the ``uio_pci_generic`` driver:
.. code-block:: console
- ./tools/dpdk-devbind.py --bind=uio_pci_generic 04:00.1
+ ./usertools/dpdk-devbind.py --bind=uio_pci_generic 04:00.1
or, alternatively,
.. code-block:: console
- ./tools/dpdk-devbind.py --bind=uio_pci_generic eth1
+ ./usertools/dpdk-devbind.py --bind=uio_pci_generic eth1
To restore device ``82:00.0`` to its original kernel binding:
.. code-block:: console
- ./tools/dpdk-devbind.py --bind=ixgbe 82:00.0
+ ./usertools/dpdk-devbind.py --bind=ixgbe 82:00.0
diff --git a/doc/guides/linux_gsg/build_sample_apps.rst b/doc/guides/linux_gsg/build_sample_apps.rst
index e53bd517..12fefffd 100644
--- a/doc/guides/linux_gsg/build_sample_apps.rst
+++ b/doc/guides/linux_gsg/build_sample_apps.rst
@@ -112,15 +112,16 @@ The following is the list of options that can be given to the EAL:
.. code-block:: console
- ./rte-app -c COREMASK [-n NUM] [-b <domain:bus:devid.func>] \
- [--socket-mem=MB,...] [-m MB] [-r NUM] [-v] [--file-prefix] \
+ ./rte-app [-c COREMASK | -l CORELIST] [-n NUM] [-b <domain:bus:devid.func>] \
+ [--socket-mem=MB,...] [-d LIB.so|DIR] [-m MB] [-r NUM] [-v] [--file-prefix] \
[--proc-type <primary|secondary|auto>] [-- xen-dom0]
The EAL options are as follows:
-* ``-c COREMASK``:
+* ``-c COREMASK`` or ``-l CORELIST``:
An hexadecimal bit mask of the cores to run on. Note that core numbering can
- change between platforms and should be determined beforehand.
+ change between platforms and should be determined beforehand. The corelist is
+ a set of core numbers instead of a bitmap core mask.
* ``-n NUM``:
Number of memory channels per processor socket.
@@ -136,6 +137,11 @@ The EAL options are as follows:
* ``--socket-mem``:
Memory to allocate from hugepages on specific sockets.
+* ``-d``:
+ Add a driver or driver directory to be loaded.
+ The application should use this option to load the pmd drivers
+ that are built as shared libraries.
+
* ``-m MB``:
Memory to allocate from hugepages, regardless of processor socket. It is
recommended that ``--socket-mem`` be used instead of this option.
@@ -167,13 +173,13 @@ The EAL options are as follows:
* ``--vfio-intr``:
Specify interrupt type to be used by VFIO (has no effect if VFIO is not used).
-The ``-c`` and option is mandatory; the others are optional.
+The ``-c`` or ``-l`` and option is mandatory; the others are optional.
Copy the DPDK application binary to your target, then run the application as follows
(assuming the platform has four memory channels per processor socket,
and that cores 0-3 are present and are to be used for running the application)::
- ./helloworld -c f -n 4
+ ./helloworld -l 0-3 -n 4
.. note::
@@ -185,10 +191,10 @@ and that cores 0-3 are present and are to be used for running the application)::
Logical Core Use by Applications
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The coremask parameter is always mandatory for DPDK applications.
-Each bit of the mask corresponds to the equivalent logical core number as reported by Linux.
+The coremask (-c 0x0f) or corelist (-l 0-3) parameter is always mandatory for DPDK applications.
+Each bit of the mask corresponds to the equivalent logical core number as reported by Linux. The preferred corelist option is a cleaner method to define cores to be used.
Since these logical core numbers, and their mapping to specific cores on specific NUMA sockets, can vary from platform to platform,
-it is recommended that the core layout for each platform be considered when choosing the coremask to use in each case.
+it is recommended that the core layout for each platform be considered when choosing the coremask/corelist to use in each case.
On initialization of the EAL layer by an DPDK application, the logical cores to be used and their socket location are displayed.
This information can also be determined for all cores on the system by examining the ``/proc/cpuinfo`` file, for example, by running cat ``/proc/cpuinfo``.
@@ -205,7 +211,7 @@ This can be useful when using other processors to understand the mapping of the
.. warning::
- The logical core layout can change between different board layouts and should be checked before selecting an application coremask.
+ The logical core layout can change between different board layouts and should be checked before selecting an application coremask/corelist.
Hugepage Memory Use by Applications
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/guides/linux_gsg/nic_perf_intel_platform.rst b/doc/guides/linux_gsg/nic_perf_intel_platform.rst
index d4a83624..709113dc 100644
--- a/doc/guides/linux_gsg/nic_perf_intel_platform.rst
+++ b/doc/guides/linux_gsg/nic_perf_intel_platform.rst
@@ -158,7 +158,7 @@ Configurations before running DPDK
cd dpdk_folder
- tools/cpu_layout.py
+ usertools/cpu_layout.py
Or run ``lscpu`` to check the the cores on each socket.
@@ -192,10 +192,10 @@ Configurations before running DPDK
# Bind ports 82:00.0 and 85:00.0 to dpdk driver
- ./dpdk_folder/tools/dpdk-devbind.py -b igb_uio 82:00.0 85:00.0
+ ./dpdk_folder/usertools/dpdk-devbind.py -b igb_uio 82:00.0 85:00.0
# Check the port driver status
- ./dpdk_folder/tools/dpdk-devbind.py --status
+ ./dpdk_folder/usertools/dpdk-devbind.py --status
See ``dpdk-devbind.py --help`` for more details.
@@ -246,7 +246,7 @@ See :numref:`figure_intel_perf_test_setup` for the performance test setup.
7. The command line of running l3fwd would be something like the followings::
- ./l3fwd -c 0x3c0000 -n 4 -w 82:00.0 -w 85:00.0 \
+ ./l3fwd -l 18-21 -n 4 -w 82:00.0 -w 85:00.0 \
-- -p 0x3 --config '(0,0,18),(0,1,19),(1,0,20),(1,1,21)'
This means that the application uses core 18 for port 0, queue pair 0 forwarding, core 19 for port 0, queue pair 1 forwarding,
diff --git a/doc/guides/linux_gsg/quick_start.rst b/doc/guides/linux_gsg/quick_start.rst
index 6e858c2a..39675db5 100644
--- a/doc/guides/linux_gsg/quick_start.rst
+++ b/doc/guides/linux_gsg/quick_start.rst
@@ -33,7 +33,7 @@
Quick Start Setup Script
========================
-The dpdk-setup.sh script, found in the tools subdirectory, allows the user to perform the following tasks:
+The dpdk-setup.sh script, found in the usertools subdirectory, allows the user to perform the following tasks:
* Build the DPDK libraries
@@ -108,7 +108,7 @@ Some options in the script prompt the user for further data before proceeding.
.. code-block:: console
- source tools/dpdk-setup.sh
+ source usertools/dpdk-setup.sh
------------------------------------------------------------------------
@@ -282,7 +282,7 @@ the logical core layout of the platform should be determined when selecting a co
INSTALL-APP helloworld
INSTALL-MAP helloworld.map
- sudo ./build/app/helloworld -c 0xf -n 3
+ sudo ./build/app/helloworld -l 0-3 -n 3
[sudo] password for rte:
EAL: coremask set to f
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index 3d743421..3a28c9e5 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -79,14 +79,12 @@ Compilation of the DPDK
* glibc.ppc64, libgcc.ppc64, libstdc++.ppc64 and glibc-devel.ppc64 for IBM ppc_64;
-.. note::
-
- x86_x32 ABI is currently supported with distribution packages only on Ubuntu
- higher than 13.10 or recent Debian distribution. The only supported compiler is gcc 4.9+.
+ .. note::
-.. note::
+ x86_x32 ABI is currently supported with distribution packages only on Ubuntu
+ higher than 13.10 or recent Debian distribution. The only supported compiler is gcc 4.9+.
- Python, version 2.6 or 2.7, to use various helper scripts included in the DPDK package.
+* Python, version 2.7+ or 3.2+, to use various helper scripts included in the DPDK package.
**Optional Tools:**
@@ -202,6 +200,12 @@ On a NUMA machine, pages should be allocated explicitly on separate nodes::
For 1G pages, it is not possible to reserve the hugepage memory after the system has booted.
+ On IBM POWER system, the nr_overcommit_hugepages should be set to the same value as nr_hugepages.
+ For example, if the required page number is 128, the following commands are used::
+
+ echo 128 > /sys/kernel/mm/hugepages/hugepages-16384kB/nr_hugepages
+ echo 128 > /sys/kernel/mm/hugepages/hugepages-16384kB/nr_overcommit_hugepages
+
Using Hugepages with the DPDK
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^