Copyright 2017. All rights reserved. Advantech Co. Ltd.
Page 51
3.9.4
Intel DPDK L3 Forwarding
The L3 Forwarding is use of the hash and LPM libraries in the DPDK to implement packet
forwarding. The initialization and run-time paths are very similar to those of the L2
Forwarding (see Section 3.9.3). The main difference from the L2 Forwarding is that the
forwarding decision is made based on information read from the input packet.
For more detail information, following website can be referred directly.
https://dpdk.org/doc/guides-18.02/sample_app_ug/l3_forward.html
This section will introduce how to run DPDK l3fwd application with DPDK packet generator
(Pktgen) to perform a 4 ports loopback test. In our example, we use the same connection
method as l2fwd (please check Section 3.9.3 for how to connect cable).
3.9.4.1
Command Usage of L3fwd
The l3fwd program calls the same DPDK engine to perform L3 forwarding. The l3fwd splits its
command line arguments into arguments for the EAL and arguments for the application
itself. The first group is a list of EAL options that are common to all DPDK based applications.
The second group of options are application specific. The two sets of arguments are
separated using the standard convention of -- as shown below.
# l3fwd-atom-latest [EAL options] -- -p PORTMASK
Here is the usage of EAL and application arguments which are used in our examples:
EAL options:
--master-lcore <ID>: Core ID which is used as master. Note that the master core
should be used for handing Tx or Rx packets transmission.
-l <CORELIST>: List of cores to run on
-c <COREMASK>: a hexadecimal bitmask of the cores to run on
-n <CHANNELS>: number of memory channels
-w, --pci-whitelist: Add a PCI device in white list. Only use the specified PCI
devices. The argument format is <[domain:]bus:devid.func>. This option can be
present several times (once per device).
--socket-mem: memory to allocate on specific sockets (use comma separated
values)
--file-prefix: prefix for hugepage filenames
Application options:
-p <PORTMASK>: designated port ID according to PCIe devices assigned
--config (port,queue,lcore)[,(port,queue,lcore)]: determines which queues from
which ports are mapped to which cores.
More complete usage can be found in:
https://dpdk.org/doc/guides-18.02/sample_app_ug/l3_forward.html
3.9.4.2
L3fwd Example with Running Pktgen
Steps 1 to 5
: Repeat the same steps described in DPDK Pktgen section .
Step 6
: Find the PFA addresses of the following devices: Port 1, Port 2, Port 3 and Port 4.
(The following command output is only an example)
#lseth