Compiling the Application
-------------------------
-#. DPDK needs to be built with ``baseband_turbo_sw`` PMD driver enabled along
- with ``FLEXRAN SDK`` Libraries. Refer to *SW Turbo Poll Mode Driver*
- documentation for more details on this.
+DPDK needs to be built with ``baseband_turbo_sw`` PMD driver enabled along
+with ``FLEXRAN SDK`` Libraries. Refer to *SW Turbo Poll Mode Driver*
+documentation for more details on this.
-#. Go to the example directory:
+To compile the sample application see :doc:`compiling`.
- .. code-block:: console
-
- export RTE_SDK=/path/to/rte_sdk
- cd ${RTE_SDK}/examples/bbdev_app
-
-#. Set the target (a default target is used if not specified). For example:
-
- .. code-block:: console
-
- export RTE_TARGET=x86_64-native-linux-gcc
-
- See the *DPDK Getting Started Guide* for possible RTE_TARGET values.
-
-#. Build the application:
-
- .. code-block:: console
-
- make
Running the Application
-----------------------
.. code-block:: console
- $ ./build/bbdev [EAL options] -- [-e ENCODING_CORES] [-d DECODING_CORES] /
- [-p ETH_PORT_ID] [-b BBDEV_ID]
+ $ ./<build_dir>/examples/dpdk-bbdev [EAL options] -- [-e ENCODING_CORES] /
+ [-d DECODING_CORES] [-p ETH_PORT_ID] [-b BBDEV_ID]
where:
.. code-block:: console
- $ ./build/bbdev --vdev='baseband_turbo_sw' -w <NIC0PCIADDR> -c 0x38 --socket-mem=2,2 \
- --file-prefix=bbdev -- -e 0x10 -d 0x20
+ $ ./<build_dir>/examples/dpdk-bbdev --vdev='baseband_turbo_sw' -w <NIC0PCIADDR> \
+ -c 0x38 --socket-mem=2,2 --file-prefix=bbdev -- -e 0x10 -d 0x20
where, NIC0PCIADDR is the PCI address of the Rx port
.. code-block:: console
- $ ./build/cmdline -l 0-3 -n 4
+ $ ./<build_dir>/examples/dpdk-cmdline -l 0-3 -n 4
Refer to the *DPDK Getting Started Guide* for general information on running applications
and the Environment Abstraction Layer (EAL) options.
To compile all the sample applications
--------------------------------------
-Set the path to DPDK source code if its not set:
+Go to DPDK build directory:
.. code-block:: console
- export RTE_SDK=/path/to/rte_sdk
+ cd dpdk/<build_dir>
-Go to DPDK source:
-
- .. code-block:: console
-
- cd $RTE_SDK
-
-Build DPDK:
+Enable examples compilation:
.. code-block:: console
- make defconfig
- make
+ meson configure -Dexamples=all
-Build the sample applications:
+Build:
.. code-block:: console
- export RTE_TARGET=build
- make -C examples
+ ninja
-For other possible ``RTE_TARGET`` values and additional information on
-compiling see
+For additional information on compiling see
:ref:`Compiling DPDK on Linux <linux_gsg_compiling_dpdk>` or
:ref:`Compiling DPDK on FreeBSD <building_from_source>`.
-Applications are output to: ``$RTE_SDK/examples/app-dir/build`` or
-``$RTE_SDK/examples/app-dir/$RTE_TARGET``.
+Applications are output to: ``dpdk/<build_dir>/examples``.
-In the example above the compiled application is written to the ``build`` subdirectory.
-To have the applications written to a different location,
-the ``O=/path/to/build/directory`` option may be specified in the make command.
+To compile a single application
+-------------------------------
- .. code-block:: console
- make O=/tmp
+Using meson
+~~~~~~~~~~~
-To build the applications for debugging use the ``DEBUG`` option.
-This option adds some extra flags, disables compiler optimizations and
-sets verbose output.
+Go to DPDK build directory:
.. code-block:: console
- make DEBUG=1
-
-
-To compile a single application
--------------------------------
+ cd dpdk/<build_dir>
-Set the path to DPDK source code:
+Enable example app compilation:
- .. code-block:: console
+ .. code-block:: console
- export RTE_SDK=/path/to/rte_sdk
+ meson configure -Dexamples=helloworld
-Go to DPDK source:
+Build:
- .. code-block:: console
+ .. code-block:: console
- cd $RTE_SDK
+ ninja
-Build DPDK:
- .. code-block:: console
+Using Make
+~~~~~~~~~~
- make defconfig
- make
+Pkg-config is used when building an example app standalone using make, please
+see :ref:`building_app_using_installed_dpdk` for more information.
Go to the sample application directory. Unless otherwise specified the sample
-applications are located in ``$RTE_SDK/examples/``.
-
+applications are located in ``dpdk/examples/``.
Build the application:
.. code-block:: console
- export RTE_TARGET=build
make
-To cross compile the sample application(s)
-------------------------------------------
-
-For cross compiling the sample application(s), please append 'CROSS=$(CROSS_COMPILER_PREFIX)' to the 'make' command.
-In example of AARCH64 cross compiling:
+To build the application for debugging use the ``DEBUG`` option.
+This option adds some extra flags, disables compiler optimizations and
+sets verbose output.
.. code-block:: console
- export RTE_TARGET=build
- export RTE_SDK=/path/to/rte_sdk
- make -C examples CROSS=aarch64-linux-gnu-
- or
- make CROSS=aarch64-linux-gnu-
+ make DEBUG=1
.. code-block:: console
- ./build/distributor_app [EAL options] -- -p PORTMASK
+ ./<build-dir>/examples/dpdk-distributor [EAL options] -- -p PORTMASK
where,
.. code-block:: console
- $ ./build/distributor_app -l 1-9,22 -n 4 -- -p f
+ $ ./<build-dir>/examples/dpdk-distributor -l 1-9,22 -n 4 -- -p f
#. Refer to the DPDK Getting Started Guide for general information on running
applications and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./ethtool-app/${RTE_TARGET}/ethtool [EAL options]
+ ./<build_dir>/examples/dpdk-ethtool [EAL options]
Refer to the *DPDK Getting Started Guide* for general information on
running applications and the Environment Abstraction Layer (EAL)
.. code-block:: console
- ./build/eventdev_pipeline --vdev event_sw0 -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
+ ./<build_dir>/examples/dpdk-eventdev_pipeline --vdev event_sw0 -- -r1 -t1 /
+ -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
The application has some sanity checking built-in, so if there is a function
(e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
* Compile Application
- .. code-block:: console
-
- make -C examples/fips_validation
+ To compile the sample application see :doc:`compiling`.
* Run ``dos2unix`` on the request files
.. code-block:: console
- ./fips_validation [EAL options]
+ ./dpdk-fips_validation [EAL options]
-- --req-file FILE_PATH/FOLDER_PATH
--rsp-file FILE_PATH/FOLDER_PATH
[--cryptodev DEVICE_NAME] [--cryptodev-id ID] [--path-is-folder]
.. code-block:: console
- $ ./fips_validation --vdev crypto_aesni_mb --
+ $ ./dpdk-fips_validation --vdev crypto_aesni_mb --
--req-file /PATH/TO/REQUEST/FILE.req --rsp-file ./PATH/TO/RESPONSE/FILE.rsp
--cryptodev crypto_aesni_mb
.. code-block:: console
- $ ./fips_validation --vdev crypto_aesni_gcm0 --
+ $ ./dpdk-fips_validation --vdev crypto_aesni_gcm0 --
--req-file /PATH/TO/REQUEST/FILE/FOLDER/
--rsp-file ./PATH/TO/RESPONSE/FILE/FOLDER/
--cryptodev-id 0 --path-is-folder
.. code-block:: console
- cd ~/dpdk/examples/flow_classify
- ./build/flow_classify -c 4 -n 4 -- --rule_ipv4="../ipv4_rules_file.txt"
+ ./<build_dir>/examples/dpdk-flow_classify -c 4 -n 4 -- /
+ --rule_ipv4="../ipv4_rules_file.txt"
Please refer to the *DPDK Getting Started Guide*, section
:doc:`../linux_gsg/build_sample_apps`
Compiling the Application
-------------------------
-To compile the application export the path to the DPDK source tree and go to
-the example directory:
-
-.. code-block:: console
-
- export RTE_SDK=/path/to/rte_sdk
-
- cd ${RTE_SDK}/examples/flow_filtering
-
-Set the target, for example:
-
-.. code-block:: console
-
- export RTE_TARGET=x86_64-native-linux-gcc
-
-See the *DPDK Getting Started* Guide for possible ``RTE_TARGET`` values.
-
-Build the application as follows:
-
-.. code-block:: console
-
- make
+To compile the sample application see :doc:`compiling`.
Running the Application
.. code-block:: console
- ./build/flow -l 1 -n 1
+ ./<build_dir>/examples/dpdk-flow_filtering -l 1 -n 1
Refer to *DPDK Getting Started Guide* for general information on running
applications and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- $ ./build/helloworld -l 0-3 -n 4
+ $ ./<build_dir>/examples/dpdk-helloworld -l 0-3 -n 4
Refer to *DPDK Getting Started Guide* for general information on running applications
and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./build/ioatfwd [EAL options] -- [-p MASK] [-q NQ] [-s RS] [-c <sw|hw>]
+ ./<build_dir>/examples/dpdk-ioat [EAL options] -- [-p MASK] [-q NQ] [-s RS] [-c <sw|hw>]
[--[no-]mac-updating]
where,
.. code-block:: console
- $ ./build/ioatfwd -l 0-2 -n 2 -- -p 0x1 --mac-updating -c sw
+ $ ./<build_dir>/examples/dpdk-ioat -l 0-2 -n 2 -- -p 0x1 --mac-updating -c sw
To run the application in a Linux environment with 2 lcores (the main lcore,
plus one forwarding core), 2 ports (ports 0 and 1), hardware copying and no MAC
.. code-block:: console
- $ ./build/ioatfwd -l 0-1 -n 1 -- -p 0x3 --no-mac-updating -c hw
+ $ ./<build_dir>/examples/dpdk-ioat -l 0-1 -n 1 -- -p 0x3 --no-mac-updating -c hw
Refer to the *DPDK Getting Started Guide* for general information on
running applications and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./build/ip_fragmentation [EAL options] -- -p PORTMASK [-q NQ]
+ ./<build_dir>/examples/dpdk-ip_fragmentation [EAL options] -- -p PORTMASK [-q NQ]
where:
.. code-block:: console
- ./build/ip_fragmentation -l 2,4 -n 3 -- -p 5
+ ./<build_dir>/examples/dpdk-ip_fragmentation -l 2,4 -n 3 -- -p 5
EAL: coremask set to 14
EAL: Detected lcore 0 on socket 0
EAL: Detected lcore 1 on socket 1
.. code-block:: console
- ./build/ip_fragmentation -l 4 -n 3 -- -p 5 -q 2
+ ./<build_dir>/examples/dpdk-ip_fragmentation -l 4 -n 3 -- -p 5 -q 2
To test the application, flows should be set up in the flow generator that match the values in the
l3fwd_ipv4_route_array and/or l3fwd_ipv6_route_array table.
The application startup command line is::
- ip_pipeline [EAL_ARGS] -- [-s SCRIPT_FILE] [-h HOST] [-p PORT]
+ dpdk-ip_pipeline [EAL_ARGS] -- [-s SCRIPT_FILE] [-h HOST] [-p PORT]
The application startup arguments are:
.. code-block:: console
- $ ./build/ip_pipeline -c 0x3 -- -s examples/route_ecmp.cli
+ $ ./<build_dir>/examples/dpdk-ip_pipeline -c 0x3 -- -s examples/route_ecmp.cli
The application should start successfully and display as follows:
.. code-block:: console
- ./build/ip_reassembly [EAL options] -- -p PORTMASK [-q NQ] [--maxflows=FLOWS>] [--flowttl=TTL[(s|ms)]]
+ ./<build_dir>/examples/dpdk-ip_reassembly [EAL options] -- -p PORTMASK [-q NQ] [--maxflows=FLOWS>] [--flowttl=TTL[(s|ms)]]
where:
.. code-block:: console
- ./build/ip_reassembly -l 2,4 -n 3 -- -p 5
+ ./<build_dir>/examples/dpdk-ip_reassembly -l 2,4 -n 3 -- -p 5
EAL: coremask set to 14
EAL: Detected lcore 0 on socket 0
EAL: Detected lcore 1 on socket 1
.. code-block:: console
- ./build/ip_reassembly -l 4 -n 3 -- -p 5 -q 2
+ ./<build_dir>/examples/dpdk-ip_reassembly -l 4 -n 3 -- -p 5 -q 2
To test the application, flows should be set up in the flow generator that match the values in the
l3fwd_ipv4_route_array and/or l3fwd_ipv6_route_array table.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The RTE_LIBRTE_IP_FRAG_TBL_STAT controls statistics collection for the IP Fragment Table.
-This macro is disabled by default.
+This macro is disabled by default, but it can be enabled by modifying the appropriate line
+in ``config/rte_config.h``.
To make ip_reassembly print the statistics to the standard output,
the user must send either an USR1, INT or TERM signal to the process.
For all of these signals, the ip_reassembly process prints Fragment table statistics for each RX queue,
The application is located in the ``ipsec-secgw`` sub-directory.
-#. [Optional] Build the application for debugging:
- This option adds some extra flags, disables compiler optimizations and
- is verbose::
-
- make DEBUG=1
-
Running the Application
-----------------------
The application has a number of command line options::
- ./build/ipsec-secgw [EAL options] --
+ ./<build_dir>/examples/dpdk-ipsec-secgw [EAL options] --
-p PORTMASK -P -u PORTMASK -j FRAMESIZE
-l -w REPLAY_WINOW_SIZE -e -a
-c SAD_CACHE_SIZE
For example, given the following command line to run application in poll mode::
- ./build/ipsec-secgw -l 20,21 -n 4 --socket-mem 0,2048 \
+ ./<build_dir>/examples/dpdk-ipsec-secgw -l 20,21 -n 4 --socket-mem 0,2048 \
--vdev "crypto_null" -- -p 0xf -P -u 0x3 \
--config="(0,0,20),(1,0,20),(2,0,21),(3,0,21)" \
-f /path/to/config_file --transfer-mode poll \
Similarly for example, given the following command line to run application in
event app mode::
- ./build/ipsec-secgw -c 0x3 -- -P -p 0x3 -u 0x1 \
+ ./<build_dir>/examples/dpdk-ipsec-secgw -c 0x3 -- -P -p 0x3 -u 0x1 \
-f /path/to/config_file --transfer-mode event \
--event-schedule-type parallel \
.. code-block:: console
- ./build/ipsec-secgw -l 20,21 -n 4 --socket-mem 0,2048 \
+ ./<build_dir>/examples/dpdk-ipsec-secgw -l 20,21 -n 4 --socket-mem 0,2048 \
-w 81:00.0 -w 81:00.1 -w 81:00.2 -w 81:00.3 \
--vdev "crypto_aesni_mb" --vdev "crypto_null" \
-- \
.. code-block:: console
- ./build/ipv4_multicast [EAL options] -- -p PORTMASK [-q NQ]
+ ./<build_dir>/examples/dpdk-ipv4_multicast [EAL options] -- -p PORTMASK [-q NQ]
where,
.. code-block:: console
- ./build/ipv4_multicast -l 0-3 -n 3 -- -p 0x3 -q 1
+ ./<build_dir>/examples/dpdk-ipv4_multicast -l 0-3 -n 3 -- -p 0x3 -q 1
In this command:
.. code-block:: console
- ./build/l2fwd-keepalive [EAL options] \
+ ./<build_dir>/examples/dpdk-l2fwd-keepalive [EAL options] \
-- -p PORTMASK [-q NQ] [-K PERIOD] [-T PERIOD]
where,
.. code-block:: console
- ./build/l2fwd-keepalive -l 0-3 -n 4 -- -q 8 -p ffff -K 10
+ ./<build_dir>/examples/dpdk-l2fwd-keepalive -l 0-3 -n 4 -- -q 8 -p ffff -K 10
Refer to the *DPDK Getting Started Guide* for general information on
running applications and the Environment Abstraction Layer (EAL)
.. code-block:: console
- kni [EAL options] -- -p PORTMASK --config="(port,lcore_rx,lcore_tx[,lcore_kthread,...])[,(port,lcore_rx,lcore_tx[,lcore_kthread,...])]" [-P] [-m]
+ dpdk-kni [EAL options] -- -p PORTMASK --config="(port,lcore_rx,lcore_tx[,lcore_kthread,...])[,(port,lcore_rx,lcore_tx[,lcore_kthread,...])]" [-P] [-m]
Where:
.. code-block:: console
# rmmod rte_kni
- # insmod kmod/rte_kni.ko kthread_mode=multiple
- # ./build/kni -l 4-7 -n 4 -- -P -p 0x3 -m --config="(0,4,6,8),(1,5,7,9)"
+ # insmod <build_dir>/kernel/linux/kni/rte_kni.ko kthread_mode=multiple
+ # ./<build-dir>/examples/dpdk-kni -l 4-7 -n 4 -- -P -p 0x3 -m --config="(0,4,6,8),(1,5,7,9)"
The following example is identical, except an additional ``lcore_kthread``
core is specified per physical port. In this case, ``kni`` will create
.. code-block:: console
# rmmod rte_kni
- # insmod kmod/rte_kni.ko kthread_mode=multiple
- # ./build/kni -l 4-7 -n 4 -- -P -p 0x3 -m --config="(0,4,6,8,10),(1,5,7,9,11)"
+ # insmod <build_dir>/kernel/linux/kni/rte_kni.ko kthread_mode=multiple
+ # ./<build-dir>/examples/dpdk-kni -l 4-7 -n 4 -- -P -p 0x3 -m --config="(0,4,6,8,10),(1,5,7,9,11)"
The following example can be used to test the interface between the ``kni``
test application and the ``rte_kni`` kernel module. In this example,
.. code-block:: console
# rmmod rte_kni
- # insmod kmod/rte_kni.ko lo_mode=lo_mode_fifo carrier=on
- # ./build/kni -l 4-7 -n 4 -- -P -p 0x3 --config="(0,4,6,8),(1,5,7,9)"
+ # insmod <build_dir>/kernel/linux/kni/rte_kni.ko lo_mode=lo_mode_fifo carrier=on
+ # ./<build-dir>/examples/dpdk-kni -l 4-7 -n 4 -- -P -p 0x3 --config="(0,4,6,8),(1,5,7,9)"
KNI Operations
--------------
.. code-block:: console
- ./build/l2fwd-cat -l 1 -n 4 -- --l3ca="0x3@(0-2)"
+ ./<build_dir>/examples/dpdk-l2fwd-cat -l 1 -n 4 -- --l3ca="0x3@(0-2)"
or to enable CAT and CDP on cpus 1,3:
.. code-block:: console
- ./build/l2fwd-cat -l 1 -n 4 -- --l3ca="(0x00C00,0x00300)@(1,3)"
+ ./<build_dir>/examples/dpdk-l2fwd-cat -l 1 -n 4 -- --l3ca="(0x00C00,0x00300)@(1,3)"
If CDP is not supported it will fail with following error message:
.. code-block:: console
- ./build/l2fwd-crypto [EAL options] -- [-p PORTMASK] [-q NQ] [-s] [-T PERIOD] /
+ ./<build_dir>/examples/dpdk-l2fwd-crypto [EAL options] -- [-p PORTMASK] [-q NQ] [-s] [-T PERIOD] /
[--cdev_type HW/SW/ANY] [--chain HASH_CIPHER/CIPHER_HASH/CIPHER_ONLY/HASH_ONLY/AEAD] /
[--cipher_algo ALGO] [--cipher_op ENCRYPT/DECRYPT] [--cipher_key KEY] /
[--cipher_key_random_size SIZE] [--cipher_iv IV] [--cipher_iv_random_size SIZE] /
.. code-block:: console
- $ ./build/l2fwd-crypto -l 0-1 -n 4 --vdev "crypto_aesni_mb0" \
+ $ ./<build_dir>/examples/dpdk-l2fwd-crypto -l 0-1 -n 4 --vdev "crypto_aesni_mb0" \
--vdev "crypto_aesni_mb1" -- -p 0x3 --chain CIPHER_HASH \
--cipher_op ENCRYPT --cipher_algo aes-cbc \
--cipher_key 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f \
.. code-block:: console
- ./build/l2fwd-event [EAL options] -- -p PORTMASK [-q NQ] --[no-]mac-updating --mode=MODE --eventq-sched=SCHED_MODE
+ ./<build_dir>/examples/dpdk-l2fwd-event [EAL options] -- -p PORTMASK [-q NQ] --[no-]mac-updating --mode=MODE --eventq-sched=SCHED_MODE
where,
.. code-block:: console
- ./build/l2fwd-event -l 0-3 -n 4 -- -q 8 -p ffff --mode=poll
+ ./<build_dir>/examples/dpdk-l2fwd-event -l 0-3 -n 4 -- -q 8 -p ffff --mode=poll
Eventdev mode with 4 lcores, 16 ports , sched method ordered and MAC address updating enabled,
issue the command:
.. code-block:: console
- ./build/l2fwd-event -l 0-3 -n 4 -- -p ffff --eventq-sched=ordered
+ ./<build_dir>/examples/dpdk-l2fwd-event -l 0-3 -n 4 -- -p ffff --eventq-sched=ordered
or
.. code-block:: console
- ./build/l2fwd-event -l 0-3 -n 4 -- -q 8 -p ffff --mode=eventdev --eventq-sched=ordered
+ ./<build_dir>/examples/dpdk-l2fwd-event -l 0-3 -n 4 -- -q 8 -p ffff --mode=eventdev --eventq-sched=ordered
Refer to the *DPDK Getting Started Guide* for general information on running
applications and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./build/l2fwd-event -l 0-7 -s 0-3 -n 4 --vdev event_sw0 -- -q 8 -p ffff --mode=eventdev --eventq-sched=ordered
+ ./<build_dir>/examples/dpdk-l2fwd-event -l 0-7 -s 0-3 -n 4 --vdev event_sw0 -- -q 8 -p ffff --mode=eventdev --eventq-sched=ordered
Explanation
-----------
.. code-block:: console
- ./build/l2fwd-jobstats [EAL options] -- -p PORTMASK [-q NQ] [-l]
+ ./<build_dir>/examples/dpdk-l2fwd-jobstats [EAL options] -- -p PORTMASK [-q NQ] [-l]
where,
.. code-block:: console
- $ ./build/l2fwd-jobstats -l 0-3 -n 4 -- -q 8 -p ffff -l
+ $ ./<build_dir>/examples/dpdk-l2fwd-jobstats -l 0-3 -n 4 -- -q 8 -p ffff -l
Refer to the *DPDK Getting Started Guide* for general information on running applications
and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./build/l2fwd [EAL options] -- -p PORTMASK
+ ./<build_dir>/examples/dpdk-l2fwd [EAL options] -- -p PORTMASK
[-q NQ]
--[no-]mac-updating
[--portmap="(port, port)[,(port, port)]"]
.. code-block:: console
- $ ./build/l2fwd -l 0-3 -n 4 -- -q 8 -p ffff
+ $ ./<build_dir>/examples/dpdk-l2fwd -l 0-3 -n 4 -- -q 8 -p ffff
To run the application in linux environment with 4 lcores, 4 ports, 8 RX queues
per lcore, to forward RX traffic of ports 0 & 1 on ports 2 & 3 respectively and
.. code-block:: console
- $ ./build/l2fwd -l 0-3 -n 4 -- -q 8 -p f --portmap="(0,2)(1,3)"
+ $ ./<build_dir>/examples/dpdk-l2fwd -l 0-3 -n 4 -- -q 8 -p f --portmap="(0,2)(1,3)"
Refer to the *DPDK Getting Started Guide* for general information on running applications
and the Environment Abstraction Layer (EAL) options.
The application has a number of command line options::
- ./l3fwd [EAL options] -- -p PORTMASK
+ ./dpdk-l3fwd [EAL options] -- -p PORTMASK
[-P]
[-E]
[-L]
.. code-block:: console
- ./build/l3fwd -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)"
+ ./<build_dir>/examples/dpdk-l3fwd -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)"
In this command:
.. code-block:: console
- ./build/l3fwd -l 0-3 -n 4 -w <event device> -- -p 0x3 --eventq-sched=ordered
+ ./<build_dir>/examples/dpdk-l3fwd -l 0-3 -n 4 -w <event device> -- -p 0x3 --eventq-sched=ordered
or
.. code-block:: console
- ./build/l3fwd -l 0-3 -n 4 -w <event device> -- -p 0x03 --mode=eventdev --eventq-sched=ordered
+ ./<build_dir>/examples/dpdk-l3fwd -l 0-3 -n 4 -w <event device> -- -p 0x03 --mode=eventdev --eventq-sched=ordered
In this command:
.. code-block:: console
- ./build/l3fwd -l 0-7 -s 0xf0000 -n 4 --vdev event_sw0 -- -p 0x3 --mode=eventdev --eventq-sched=ordered
+ ./<build_dir>/examples/dpdk-l3fwd -l 0-7 -s 0xf0000 -n 4 --vdev event_sw0 -- -p 0x3 --mode=eventdev --eventq-sched=ordered
In case of eventdev mode, *--config* option is not used for ethernet port
configuration. Instead each ethernet port will be configured with mentioned
Packet 3 matches Rule 3 and is forwarded to port 0.
For more details on the rule file format,
-please refer to rule_ipv4.db and rule_ipv6.db files (inside <RTE_SDK>/examples/l3fwd-acl/).
+please refer to rule_ipv4.db and rule_ipv6.db files (inside dpdk/examples/l3fwd-acl/).
Application Phases
~~~~~~~~~~~~~~~~~~
.. code-block:: console
- ./build/l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME rule_ipv6 FILENAME [--alg=<val>] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa] [--eth-dest=X,MM:MM:MM:MM:MM:MM]
+ ./<build_dir>/examples/dpdk-l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME rule_ipv6 FILENAME [--alg=<val>] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa] [--eth-dest=X,MM:MM:MM:MM:MM:MM]
where,
.. code-block:: console
- ./build/l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="./rule_ipv4.db" -- rule_ipv6="./rule_ipv6.db" --alg=scalar
+ ./<build_dir>/examples/dpdk-l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="./rule_ipv4.db" -- rule_ipv6="./rule_ipv6.db" --alg=scalar
In this command:
The application has a number of command line options similar to l3fwd::
- ./l3fwd-graph [EAL options] -- -p PORTMASK
+ ./dpdk-l3fwd-graph [EAL options] -- -p PORTMASK
[-P]
--config(port,queue,lcore)[,(port,queue,lcore)]
[--eth-dest=X,MM:MM:MM:MM:MM:MM]
.. code-block:: console
- ./build/l3fwd-graph -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)"
+ ./<build_dir>/examples/dpdk-l3fwd-graph -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)"
In this command:
.. code-block:: console
- ./build/l3fwd_power [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa]
+ ./<build_dir>/examples/dpdk-l3fwd_power [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa]
where,
.. code-block:: console
- ./l3fwd-power -l xxx -n 4 -w 0000:xx:00.0 -w 0000:xx:00.1 -- -p 0x3 -P --config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1
+ ./<build_dir>/examples/dpdk-l3fwd-power -l xxx -n 4 -w 0000:xx:00.0 -w 0000:xx:00.1 -- -p 0x3 -P --config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1
Where,
.. code-block:: console
- ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "1,0,0" –P
+ ./<build_dir>/examples/dpdk-l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "1,0,0" –P
This will run the training algorithm for x seconds on each core (cores 2
and 3), and then print out the recommended threshold values for those
.. code-block:: console
- ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P
+ ./<build_dir>/examples/dpdk-l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P
Telemetry Mode
--------------
reference cycles and accordingly busy rate is set to either 0% or
50% or 100%.
- .. Note::
-
- * The CONFIG_RTE_LIBRTE_TELEMETRY should be set in order to get the stats in DPDK telemetry.
-
.. code-block:: console
- ./examples/l3fwd-power/build/l3fwd-power --telemetry -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --telemetry
+ ./<build_dir>/examples/dpdk-l3fwd-power --telemetry -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --telemetry
The new stats ``empty_poll`` , ``full_poll`` and ``busy_percent`` can be viewed by running the script
``/usertools/dpdk-telemetry-client.py`` and selecting the menu option ``Send for global Metrics``.
.. code-block:: console
- ./build/link_status_interrupt [EAL options] -- -p PORTMASK [-q NQ][-T PERIOD]
+ ./<build_dir>/examples/dpdk-link_status_interrupt [EAL options] -- -p PORTMASK [-q NQ][-T PERIOD]
where,
.. code-block:: console
- $ ./build/link_status_interrupt -l 0-3 -n 4-- -q 8 -p ffff
+ $ ./<build_dir>/examples/dpdk-link_status_interrupt -l 0-3 -n 4-- -q 8 -p ffff
Refer to the *DPDK Getting Started Guide* for general information on running applications
and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./build/simple_mp -l 0-1 -n 4 --proc-type=primary
+ ./<build_dir>/examples/dpdk-simple_mp -l 0-1 -n 4 --proc-type=primary
For the first DPDK process run, the proc-type flag can be omitted or set to auto,
since all DPDK processes will default to being a primary instance,
.. code-block:: console
- $ ./build/simple_mp -l 0-1 -n 4 --proc-type=primary
+ $ ./<build_dir>/examples/dpdk-simple_mp -l 0-1 -n 4 --proc-type=primary
EAL: coremask set to 3
EAL: Detected lcore 0 on socket 0
EAL: Detected lcore 1 on socket 0
.. code-block:: console
- ./build/simple_mp -l 2-3 -n 4 --proc-type=secondary
+ ./<build_dir>/examples/dpdk-simple_mp -l 2-3 -n 4 --proc-type=secondary
When running a secondary process such as that shown above, the proc-type parameter can again be specified as auto.
However, omitting the parameter altogether will cause the process to try and start as a primary rather than secondary process.
.. code-block:: console
- # ./build/symmetric_mp -l 1 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=0
- # ./build/symmetric_mp -l 2 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=1
- # ./build/symmetric_mp -l 3 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=2
- # ./build/symmetric_mp -l 4 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=3
+ # ./<build_dir>/examples/dpdk-symmetric_mp -l 1 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=0
+ # ./<build_dir>/examples/dpdk-symmetric_mp -l 2 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=1
+ # ./<build_dir>/examples/dpdk-symmetric_mp -l 3 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=2
+ # ./<build_dir>/examples/dpdk-symmetric_mp -l 4 -n 4 --proc-type=auto -- -p 3 --num-procs=4 --proc-id=3
.. note::
.. code-block:: console
- # ./mp_server/build/mp_server -l 1-2 -n 4 -- -p 3 -n 2
- # ./mp_client/build/mp_client -l 3 -n 4 --proc-type=auto -- -n 0
- # ./mp_client/build/mp_client -l 4 -n 4 --proc-type=auto -- -n 1
+ # ./<build_dir>/examples/dpdk-mp_server -l 1-2 -n 4 -- -p 3 -n 2
+ # ./<build_dir>/examples/dpdk-mp_client -l 3 -n 4 --proc-type=auto -- -n 0
+ # ./<build_dir>/examples/dpdk-mp_client -l 4 -n 4 --proc-type=auto -- -n 1
.. note::
.. code-block:: console
- ./build/ntb_fwd -c 0xf -n 6 -- -i
+ ./<build_dir>/examples/dpdk-ntb -c 0xf -n 6 -- -i
Refer to the *DPDK Getting Started Guide* for general information on
running applications and the Environment Abstraction Layer (EAL)
.. code-block:: console
- ./packet_ordering [EAL options] -- -p PORTMASK [--disable-reorder] [--insight-worker]
+ ./<build_dir>/examples/dpdk-packet_ordering [EAL options] -- -p PORTMASK /
+ [--disable-reorder] [--insight-worker]
The -c EAL CPU_COREMASK option has to contain at least 3 CPU cores.
The first CPU core in the core mask is the main core and would be assigned to
The application has a number of command line options::
- ./build/l3fwd-thread [EAL options] --
+ ./<build_dir>/examples/dpdk-l3fwd-thread [EAL options] --
-p PORTMASK [-P]
--rx(port,queue,lcore,thread)[,(port,queue,lcore,thread)]
--tx(lcore,thread)[,(lcore,thread)]
For example, the following places every l-thread on different lcores::
- l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
--rx="(0,0,0,0)(1,0,1,1)" \
--tx="(2,0)(3,1)"
The following places RX l-threads on lcore 0 and TX l-threads on lcore 1 and 2
and so on::
- l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
--rx="(0,0,0,0)(1,0,0,1)" \
--tx="(1,0)(2,1)"
For example, the following places every EAL thread on different lcores::
- l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
--rx="(0,0,0,0)(1,0,1,1)" \
--tx="(2,0)(3,1)" \
--no-lthreads
The following places RX EAL threads on lcore 0 and TX EAL threads on lcore 1
and 2 and so on::
- l3fwd-thread -l 0-7 -n 2 --lcores="(0,1)@0,(2,3)@1" -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 --lcores="(0,1)@0,(2,3)@1" -- -P -p 3 \
--rx="(0,0,0,0)(1,0,1,1)" \
--tx="(2,0)(3,1)" \
--no-lthreads
a) Start every thread on different scheduler (1:1)::
- l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
--rx="(0,0,0,0)(1,0,1,1)" \
--tx="(2,0)(3,1)"
EAL thread equivalent::
- l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
--rx="(0,0,0,0)(1,0,1,1)" \
--tx="(2,0)(3,1)" \
--no-lthreads
Start 4 L-threads on lcore 0::
- l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
--rx="(0,0,0,0)(1,0,0,1)" \
--tx="(0,0)(0,1)"
Start 4 EAL threads on cpu-set 0::
- l3fwd-thread -l 0-7 -n 2 --lcores="(0-3)@0" -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 --lcores="(0-3)@0" -- -P -p 3 \
--rx="(0,0,0,0)(1,0,0,1)" \
--tx="(2,0)(3,1)" \
--no-lthreads
Start 2 L-threads for RX on lcore 0, and 2 L-threads for TX on lcore 1::
- l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 -- -P -p 3 \
--rx="(0,0,0,0)(1,0,0,1)" \
--tx="(1,0)(1,1)"
Start 2 EAL threads for RX on cpu-set 0, and 2 EAL threads for TX on
cpu-set 1::
- l3fwd-thread -l 0-7 -n 2 --lcores="(0-1)@0,(2-3)@1" -- -P -p 3 \
+ dpdk-l3fwd-thread -l 0-7 -n 2 --lcores="(0-1)@0,(2-3)@1" -- -P -p 3 \
--rx="(0,0,0,0)(1,0,1,1)" \
--tx="(2,0)(3,1)" \
--no-lthreads
To build and run the pthread shim example
-#. Go to the example applications folder
-
- .. code-block:: console
-
- export RTE_SDK=/path/to/rte_sdk
- cd ${RTE_SDK}/examples/performance-thread/pthread_shim
-
-
-#. Set the target (a default target is used if not specified). For example:
-
- .. code-block:: console
-
- export RTE_TARGET=x86_64-native-linux-gcc
-
- See the DPDK Getting Started Guide for possible RTE_TARGET values.
-
#. Build the application:
- .. code-block:: console
-
- make
+ To compile the sample application see :doc:`compiling`.
#. To run the pthread_shim example
.. code-block:: console
- lthread-pthread-shim -c core_mask -n number_of_channels
+ dpdk-pthread-shim -c core_mask -n number_of_channels
.. _lthread_diagnostics:
The application is located in the ``ptpclient`` sub-directory.
-.. note::
- To compile the application edit the ``config/common_linux`` configuration file to enable IEEE1588
- and then recompile DPDK:
-
- .. code-block:: console
-
- CONFIG_RTE_LIBRTE_IEEE1588=y
Running the Application
-----------------------
.. code-block:: console
- ./build/ptpclient -l 1 -n 4 -- -p 0x1 -T 0
+ ./<build_dir>/examples/dpdk-ptpclient -l 1 -n 4 -- -p 0x1 -T 0
Refer to *DPDK Getting Started Guide* for general information on running
applications and the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./qos_meter [EAL options] -- -p PORTMASK
+ ./dpdk-qos_meter [EAL options] -- -p PORTMASK
The application is constrained to use a single core in the EAL core mask and 2 ports only in the application port mask
(first port from the port mask is used for RX and the other port in the core mask is used for TX).
.. note::
To get statistics on the sample app using the command line interface as described in the next section,
- DPDK must be compiled defining *CONFIG_RTE_SCHED_COLLECT_STATS*,
- which can be done by changing the configuration file for the specific target to be compiled.
+ DPDK must be compiled defining *RTE_SCHED_COLLECT_STATS*, which can be done by changing the relevant
+ entry in the ``config/rte_config.h`` file.
Running the Application
-----------------------
.. code-block:: console
- ./qos_sched [EAL options] -- <APP PARAMS>
+ ./<build_dir>/examples/dpdk-qos_sched [EAL options] -- <APP PARAMS>
Mandatory application parameters include:
.. code-block:: console
- ./qos_sched -l 1,5,7 -n 4 -- --pfc "3,2,5,7" --cfg ./profile.cfg
+ ./<build_dir>/examples/dpdk-qos_sched -l 1,5,7 -n 4 -- --pfc "3,2,5,7" --cfg ./profile.cfg
This example uses a single packet flow configuration which creates one RX thread on lcore 5 reading
from port 3 and a worker thread on lcore 7 writing to port 2.
.. code-block:: console
- ./qos_sched -l 1,2,6,7 -n 4 -- --pfc "3,2,2,6,7" --pfc "1,0,2,6,7" --cfg ./profile.cfg
+ ./<build_dir>/examples/dpdk-qos_sched -l 1,2,6,7 -n 4 -- --pfc "3,2,2,6,7" --pfc "1,0,2,6,7" --cfg ./profile.cfg
Note that independent cores for the packet flow configurations for each of the RX, WT and TX thread are also supported,
providing flexibility to balance the work.
The application is located in the ``rxtx_callbacks`` sub-directory.
-The callbacks feature requires that the ``CONFIG_RTE_ETHDEV_RXTX_CALLBACKS``
-setting is on in the ``config/common_`` config file that applies to the
-target. This is generally on by default:
-
-.. code-block:: console
-
- CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y
Running the Application
-----------------------
.. code-block:: console
- ./build/rxtx_callbacks -l 1 -n 4 -- [-t]
+ ./<build_dir>/examples/dpdk-rxtx_callbacks -l 1 -n 4 -- [-t]
Use -t to enable hardware timestamping. If not supported by the NIC, an error
will be displayed.
The frontend server (server) has the following command line options::
- ./server [EAL options] -- -p PORTMASK -n NUM_NODES -f NUM_FLOWS
+ ./<build_dir>/examples/dpdk-server [EAL options] -- -p PORTMASK -n NUM_NODES -f NUM_FLOWS
Where,
Compiling the Application
-------------------------
-#. Go to the example directory:
+To compile the sample application see :doc:`compiling`.
- .. code-block:: console
-
- export RTE_SDK=/path/to/rte_sdk
- cd ${RTE_SDK}/examples/service_cores
-
-#. Set the target (a default target is used if not specified). For example:
-
- .. code-block:: console
-
- export RTE_TARGET=x86_64-native-linux-gcc
-
- See the *DPDK Getting Started* Guide for possible RTE_TARGET values.
-
-#. Build the application:
-
- .. code-block:: console
-
- make
+The application is located in the ``service_cores`` sub-directory.
Running the Application
-----------------------
.. code-block:: console
- $ ./build/service_cores
+ $ ./<build_dir>/examples/dpdk-service_cores
Explanation
.. code-block:: console
- ./build/basicfwd -l 1 -n 4
+ ./<build_dir>/examples/dpdk-skeleton -l 1 -n 4
Refer to *DPDK Getting Started Guide* for general information on running
applications and the Environment Abstraction Layer (EAL) options.
* Fedora* 20
-Compiling the Sample Code
--------------------------
-
-To enable vhost, turn on vhost library in the configure file
-``config/common_linux``.
-
- .. code-block:: console
-
- CONFIG_RTE_LIBRTE_VHOST=y
-
-Then following the to compile the sample application shown in
-:doc:`compiling`.
Running the Sample Code
-----------------------
-#. Go to the examples directory:
+Run the tep_termination sample code:
- .. code-block:: console
-
- export RTE_SDK=/path/to/rte_sdk
- cd ${RTE_SDK}/examples/tep_termination
-
-#. Run the tep_termination sample code:
-
- .. code-block:: console
+.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
- -p 0x1 --dev-basename tep-termination --nb-devices 4
- --udp-port 4789 --filter-type 1
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ -p 0x1 --dev-basename tep-termination --nb-devices 4
+ --udp-port 4789 --filter-type 1
.. note::
.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
--nb-devices 2
**Tunneling UDP port.**
.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
--nb-devices 2 --udp-port 4789
**Filter Type.**
.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
--nb-devices 2 --udp-port 4789 --filter-type 1
**TX Checksum.**
.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
--nb-devices 2 --tx-checksum
**TCP segment size.**
.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
--tx-checksum --tso-segsz 800
**Decapsulation option.**
.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
--nb-devices 4 --udp-port 4789 --decap 1
**Encapsulation option.**
.. code-block:: console
- user@target:~$ ./build/app/tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
+ user@target:~$ ./<build_dir>/examples/dpdk-tep_termination -l 0-3 -n 4 --huge-dir /mnt/huge --
--nb-devices 4 --udp-port 4789 --encap 1
-------------------------
To compile the sample application see :doc:`compiling`
-The application is located in the ``$RTE_SDK/app/test-pipeline`` directory.
+The application is located in the ``dpdk/<build_dir>/app`` directory.
Running the Application
.. code-block:: console
- ./test-pipeline [EAL options] -- -p PORTMASK --TABLE_TYPE
+ ./dpdk-test-pipeline [EAL options] -- -p PORTMASK --TABLE_TYPE
The -c or -l EAL CPU coremask/corelist option has to contain exactly 3 CPU cores.
The first CPU core in the core mask is assigned for core A, the second for core B and the third for core C.
.. code-block:: console
- $ ./build/timer -l 0-3 -n 4
+ $ ./<build_dir>/examples/dpdk-timer -l 0-3 -n 4
Refer to the *DPDK Getting Started Guide* for general information on running applications and
the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- ./vdpa [EAL options] -- [--client] [--interactive|-i] or [--iface SOCKET_PATH]
+ ./dpdk-vdpa [EAL options] -- [--client] [--interactive|-i] or [--iface SOCKET_PATH]
where
.. code-block:: console
- ./vdpa -c 0x2 -n 4 --socket-mem 1024,1024 \
+ ./dpdk-vdpa -c 0x2 -n 4 --socket-mem 1024,1024 \
-w 0000:06:00.3,vdpa=1 -w 0000:06:00.4,vdpa=1 \
-- --interactive
.. code-block:: console
- ./vhost-switch -l 0-3 -n 4 --socket-mem 1024 \
+ ./dpdk-vhost-switch -l 0-3 -n 4 --socket-mem 1024 \
-- --socket-file /tmp/sock0 --client \
...
.. code-block:: console
modprobe uio_pci_generic
- $RTE_SDK/usertools/dpdk-devbind.py -b uio_pci_generic 0000:00:04.0
+ dpdk/usertools/dpdk-devbind.py -b uio_pci_generic 0000:00:04.0
Then start testpmd for packet forwarding testing.
.. code-block:: console
- ./x86_64-native-gcc/app/testpmd -l 0-1 -- -i
+ ./<build_dir>/app/dpdk-testpmd -l 0-1 -- -i
> start tx_first
Inject packets
max queue number is larger than 128, device start will fail due to
insufficient mbuf.
- Change the default number to make it work as below, just set the number
- according to the NIC's property. ::
-
- make EXTRA_CFLAGS="-DMAX_QUEUES=320"
-
* Option "builtin-net-driver" is incompatible with QEMU
QEMU vhost net device start will fail if protocol feature is not negotiated.
.. code-block:: console
- ./vhost_blk -m 1024
+ ./dpdk-vhost_blk -m 1024
.. _vhost_blk_app_run_vm:
.. code-block:: console
- ./vhost_crypto [EAL options] --
+ ./dpdk-vhost_crypto [EAL options] --
--config (lcore,cdev-id,queue-id)[,(lcore,cdev-id,queue-id)]
--socket-file lcore,PATH
[--zero-copy]
.. code-block:: console
- export RTE_SDK=/path/to/rte_sdk
- export RTE_TARGET=build
- cd ${RTE_SDK}/examples/vm_power_manager/
+ cd dpdk/examples/vm_power_manager/
make
-The resulting binary is ``${RTE_SDK}/build/examples/vm_power_manager``.
+The resulting binary is ``dpdk/build/examples/vm_power_manager``.
To build just the ``vm_power_manager`` application using ``meson``/``ninja``:
.. code-block:: console
- export RTE_SDK=/path/to/rte_sdk
- cd ${RTE_SDK}
+ cd dpdk
meson build
cd build
ninja
meson configure -Dexamples=vm_power_manager
ninja
-The resulting binary is ``${RTE_SDK}/build/examples/dpdk-vm_power_manager``.
+The resulting binary is ``dpdk/build/examples/dpdk-vm_power_manager``.
Running the Host Application
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
- ./build/vm_power_mgr [EAL options]
+ ./<build_dir>/examples/dpdk-vm_power_mgr [EAL options]
The application requires exactly two cores to run. One core for the CLI
and the other for the channel endpoint monitor. For example, to run on
.. code-block:: console
- ./build/vm_power_mgr -l 0-1 -n 4
+ ./<build_dir>/examples/dpdk-vm_power_mgr -l 0-1 -n 4
After successful initialization, the VM Power Manager CLI prompt appears:
.. code-block:: console
- export RTE_SDK=/path/to/rte_sdk
- export RTE_TARGET=build
- cd ${RTE_SDK}/examples/vm_power_manager/guest_cli/
+ cd dpdk/examples/vm_power_manager/guest_cli/
make
-The resulting binary is ``${RTE_SDK}/build/examples/guest_cli``.
+The resulting binary is ``dpdk/build/examples/guest_cli``.
**Note**: This sample application conditionally links in the Jansson JSON
library. Consequently, if you are using a multilib or cross-compile
.. code-block:: console
- export RTE_SDK=/path/to/rte_sdk
- cd ${RTE_SDK}
+ cd dpdk
meson build
cd build
ninja
meson configure -Dexamples=vm_power_manager/guest_cli
ninja
-The resulting binary is ``${RTE_SDK}/build/examples/guest_cli``.
+The resulting binary is ``dpdk/build/examples/guest_cli``.
Running the Guest Application
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
- ./build/vm_power_mgr [EAL options] -- [guest options]
+ ./<build_dir>/examples/dpdk-vm_power_mgr [EAL options] -- [guest options]
The guest example uses a channel for each lcore enabled. For example, to
run on cores 0, 1, 2 and 3:
.. code-block:: console
- ./build/guest_vm_power_mgr -l 0-3
+ ./<build_dir>/examples/dpdk-guest_vm_power_mgr -l 0-3
.. _sending_policy:
.. code-block:: console
- ./build/guest_vm_power_mgr -l 0-3 -n 4 -- --vm-name=ubuntu --policy=BRANCH_RATIO --vcpu-list=2-4
+ ./<build_dir>/examples/dpdk-guest_vm_power_mgr -l 0-3 -n 4 -- --vm-name=ubuntu --policy=BRANCH_RATIO --vcpu-list=2-4
Once the VM Power Manager Guest CLI appears, issuing the 'send_policy now' command
will send the policy to the host:
.. code-block:: console
- ./build/guest_vm_power_mgr -l 0-3 -n 4 -- --vm-name=ubuntu --policy=BRANCH_RATIO --vcpu-list=2-4
+ ./<build_dir>/examples/dpdk-guest_vm_power_mgr -l 0-3 -n 4 -- --vm-name=ubuntu --policy=BRANCH_RATIO --vcpu-list=2-4
Once the VM Power Manager Guest CLI appears, issuing the 'send_policy now' command
will send the policy to the host:
As supplied, the sample application configures the VMDQ feature to have 32 pools with 4 queues each as indicated in :numref:`figure_vmdq_dcb_example`.
The Intel® 82599 10 Gigabit Ethernet Controller NIC also supports the splitting of traffic into 16 pools of 8 queues. While the
Intel® X710 or XL710 Ethernet Controller NICs support many configurations of VMDQ pools of 4 or 8 queues each. For simplicity, only 16
-or 32 pools is supported in this sample. And queues numbers for each VMDQ pool can be changed by setting CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM
-in config/common_* file.
+or 32 pools is supported in this sample. And queues numbers for each VMDQ pool can be changed by setting RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM
+in config/rte_config.h file.
The nb-pools, nb-tcs and enable-rss parameters can be passed on the command line, after the EAL parameters:
.. code-block:: console
- ./build/vmdq_dcb [EAL options] -- -p PORTMASK --nb-pools NP --nb-tcs TC --enable-rss
+ ./<build_dir>/examples/dpdk-vmdq_dcb [EAL options] -- -p PORTMASK --nb-pools NP --nb-tcs TC --enable-rss
where, NP can be 16 or 32, TC can be 4 or 8, rss is disabled by default.
.. code-block:: console
- user@target:~$ ./build/vmdq_dcb -l 0-3 -n 4 -- -p 0x3 --nb-pools 32 --nb-tcs 4
+ user@target:~$ ./<build_dir>/examples/dpdk-vmdq_dcb -l 0-3 -n 4 -- -p 0x3 --nb-pools 32 --nb-tcs 4
Refer to the *DPDK Getting Started Guide* for general information on running applications and
the Environment Abstraction Layer (EAL) options.
As supplied, the sample application configures the VMDq feature to have 32 pools with 4 queues each.
The Intel® 82599 10 Gigabit Ethernet Controller NIC also supports the splitting of traffic into 16 pools of 2 queues.
While the Intel® X710 or XL710 Ethernet Controller NICs support many configurations of VMDq pools of 4 or 8 queues each.
-And queues numbers for each VMDq pool can be changed by setting CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM
-in config/common_* file.
+And queues numbers for each VMDq pool can be changed by setting RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM
+in config/rte_config.h file.
The nb-pools and enable-rss parameters can be passed on the command line, after the EAL parameters:
.. code-block:: console
- ./build/vmdq_app [EAL options] -- -p PORTMASK --nb-pools NP --enable-rss
+ ./<build_dir>/examples/dpdk-vmdq [EAL options] -- -p PORTMASK --nb-pools NP --enable-rss
where, NP can be 8, 16 or 32, rss is disabled by default.
.. code-block:: console
- user@target:~$ ./build/vmdq_app -l 0-3 -n 4 -- -p 0x3 --nb-pools 16
+ user@target:~$ ./<build_dir>/examples/dpdk-vmdq -l 0-3 -n 4 -- -p 0x3 --nb-pools 16
Refer to the *DPDK Getting Started Guide* for general information on running applications and
the Environment Abstraction Layer (EAL) options.
.. code-block:: console
- sudo ./testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2
+ sudo ./dpdk-testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2
The command line options are:
* ``--nb-cores=N``
Set the number of forwarding cores,
- where 1 <= N <= "number of cores" or ``CONFIG_RTE_MAX_LCORE`` from the configuration file.
+ where 1 <= N <= "number of cores" or ``RTE_MAX_LCORE`` from the configuration file.
The default value is 1.
* ``--nb-ports=N``
Set the number of forwarding ports,
- where 1 <= N <= "number of ports" on the board or ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file.
+ where 1 <= N <= "number of ports" on the board or ``RTE_MAX_ETHPORTS`` from the configuration file.
The default value is the number of ports on the board.
* ``--coremask=0xXX``
* ``--eth-peer=N,XX:XX:XX:XX:XX:XX``
Set the MAC address ``XX:XX:XX:XX:XX:XX`` of the peer port N,
- where 0 <= N < ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file.
+ where 0 <= N < ``RTE_MAX_ETHPORTS``.
* ``--tx-ip=SRC,DST``
.. code-block:: console
- ./testpmd -n4 -r2 ... -- -i --cmdline-file=/home/ubuntu/flow-create-commands.txt
+ ./dpdk-testpmd -n4 -r2 ... -- -i --cmdline-file=/home/ubuntu/flow-create-commands.txt
Interactive-mode selected
CLI commands to be read from /home/ubuntu/flow-create-commands.txt
Configuring Port 0 (socket 0)
* ``icmpecho``: Receives a burst of packets, lookup for ICMP echo requests and, if any, send back ICMP echo replies.
-* ``ieee1588``: Demonstrate L2 IEEE1588 V2 PTP timestamping for RX and TX. Requires ``CONFIG_RTE_LIBRTE_IEEE1588=y``.
+* ``ieee1588``: Demonstrate L2 IEEE1588 V2 PTP timestamping for RX and TX.
* ``noisy``: Noisy neighbor simulation.
Simulate more realistic behavior of a guest machine engaged in receiving
TX-packets: 548595568 TX-dropped: 128 TX-total: 548595696
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-.. note::
-
- Enabling CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES appends "CPU cycles/packet" stats, like:
-
- CPU cycles/packet=xx.dd (total cycles=xxxx / total RX packets=xxxx) at xxx MHz clock
clear fwd
~~~~~~~~~