distributions, `/usr/local/lib` and `/usr/local/lib64` should be added
to a file in `/etc/ld.so.conf.d/` before running `ldconfig`.
+.. _adjusting_build_options:
Adjusting Build Options
~~~~~~~~~~~~~~~~~~~~~~~
When `-Dexamples=all` is set as a meson option, meson will check each example application to see if it can be built,
and add all which can be built to the list of tasks in the ninja build configuration file.
+.. _building_app_using_installed_dpdk:
+
Building Applications Using Installed DPDK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
- Unlike with the older make build system, the meson system is not
+ Unlike with the make build system present in older DPDK releases,
+ the meson system is not
designed to be used directly from a build directory. Instead it is
recommended that it be installed either system-wide or to a known
location in the user's home directory. The install location can be set
.. SPDX-License-Identifier: BSD-3-Clause
Copyright(c) 2010-2014 Intel Corporation.
-Compiling and Running Sample Applications
-=========================================
+Running Sample Applications
+===========================
The chapter describes how to compile and run applications in an DPDK environment.
It also provides a pointer to where sample applications are stored.
(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 -l 0-3 -n 4
+ ./dpdk-helloworld -l 0-3 -n 4
.. note::
Additional Sample Applications
------------------------------
-Additional sample applications are included in the ${RTE_SDK}/examples directory.
+Additional sample applications are included in the DPDK examples directory.
These sample applications may be built and run in a manner similar to that described in earlier sections in this manual.
In addition, see the *DPDK Sample Applications User Guide* for a description of the application,
specific instructions on compilation and execution and some explanation of the code.
-
-Additional Test Applications
-----------------------------
-
-In addition, there are two other applications that are built when the libraries are created.
-The source files for these are in the DPDK/app directory and are called test and testpmd.
-Once the libraries are created, they can be found in the build/app directory.
-
-* The test application provides a variety of specific tests for the various functions in the DPDK.
-
-* The testpmd application provides a number of different packet throughput tests and
- examples of features such as how to use the Flow Director found in the IntelĀ® 82599 10 Gigabit Ethernet Controller.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
By default, HPET support is disabled in the DPDK build configuration files.
-To use HPET, the ``CONFIG_RTE_LIBEAL_USE_HPET`` setting should be changed to ``y``, which will enable the HPET settings at compile time.
+To use HPET, use the following meson build option which will enable the HPET settings at compile time::
+
+ meson configure -Duse_hpet=true
For an application to use the ``rte_get_hpet_cycles()`` and ``rte_get_hpet_hz()`` API calls,
and optionally to make the HPET the default time source for the rte_timer library,
----------------------------------
To run the DPDK Kernel NIC Interface (KNI) sample application, an extra kernel module (the kni module) must be loaded into the running kernel.
-The module is found in the kmod sub-directory of the DPDK target directory.
-Similar to the loading of the ``igb_uio`` module, this module should be loaded using the insmod command as shown below
-(assuming that the current directory is the DPDK target directory):
-
-.. code-block:: console
+The module is found in the kernel/linux sub-directory of the DPDK build directory.
+It should be loaded using the insmod command::
- insmod kmod/rte_kni.ko
+ insmod <build_dir>/kernel/linux/kni/rte_kni.ko
.. 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
+module which can be found in the kernel/linux subdirectory referred to above. It can
be loaded as shown below:
.. code-block:: console
sudo modprobe uio
- sudo insmod kmod/igb_uio.ko
+ sudo insmod <build_dir>/kernel/linux/igb_uio/igb_uio.ko
.. note::
- ``igb_uio`` module is disabled by default starting from ``DPDK v20.02``.
- To build it, the config option ``CONFIG_RTE_EAL_IGB_UIO`` should be enabled.
+ Building DPDK Linux kernel modules is disabled by default starting from DPDK 20.02.
+ To enable them again, the config option "enable_kmods" needs to be set
+ in the meson build configuration.
+ See :ref:`adjusting_build_options` for details on how to set/clear build options.
It is planned to move ``igb_uio`` module to a different git repository.
.. note::
3. echo 2 > /sys/bus/pci/devices/0000:86:00.0/sriov_numvfs
4. Start the PF:
- ./x86_64-native-linux-gcc/app/testpmd -l 22-25 -n 4 -w 86:00.0 \
+ <build_dir>/app/dpdk-testpmd -l 22-25 -n 4 -w 86:00.0 \
--vfio-vf-token=14d63f20-8445-11ea-8900-1f9ce7d5650d --file-prefix=pf -- -i
5. Start the VF:
- ./x86_64-native-linux-gcc/app/testpmd -l 26-29 -n 4 -w 86:02.0 \
+ <build_dir>/app/dpdk-testpmd -l 26-29 -n 4 -w 86:02.0 \
--vfio-vf-token=14d63f20-8445-11ea-8900-1f9ce7d5650d --file-prefix=vf0 -- -i
Also, to use VFIO, both kernel and BIOS must support and be configured to use IO virtualization (such as IntelĀ® VT-d).
* For Ubuntu/Debian systems these can be installed using ``apt install build-essential``
-* Python, recommended version 3.5+.
-
- * Python v3.5+ is needed to build DPDK using meson and ninja
-
- * Python 2.7+ or 3.2+, to use various helper scripts included in the DPDK package.
+* Python 3.5 or later.
* Meson (version 0.47.1+) and ninja