Intel® Ethernet Controller E810 Data Plane Development Kit (DPDK) 22.11/23.03
Configuration Guide
Example pktgen Configuration
This section provides a more complex example of a pktgen command.
This command starts pktgen with these EAL parameters:
-l <core list> : List of cores to run on, where ‘-‘ is used as a range separator and ‘,’ is used as a single number separator.-n <number of channels> : Set the number of memory channels to use.--proc-type : Type of this process.--log-level :--socket-mem : Memory to allocate on specific sockets (use comma separated values)--file-prefix : Prefix for hugepage filenames-a, --allow <[domain:]bus:devid.func> : Add a PCI device into the list of devices to probe.
For a complete list of EAL parameters, see dpdk.org:
https://pktgen-dpdk.readthedocs.io/en/latest/usage_eal.html
For a complete list of command-line options, see dpdk.org:
https://pktgen-dpdk.readthedocs.io/en/latest/usage_pktgen.html
- Example pktgen configuration command:
./pktgen -l 24-32 -n 4 --proc-type auto --log-level 7 --socket- mem=0,1024 --file- prefix pgb2000 -a b2:00.0 -- -N -P -T -m [25-28:29-32].0 - Pktgen entropy configuration to enable multiple traffic streams with RSS:
Pktgen:/> set 0 proto tcp Pktgen:/> set 0 size 128 Pktgen:/> set 0 src mac 68:05:ca:a6:0b:1c Pktgen:/> set 0 dst mac 68:05:ca:a6:0a:b0 Pktgen:/> set 0 src ip 192.168.103.101/24 Pktgen:/> set 0 dst ip 192.168.103.102 Pktgen:/> enable 0 range Pktgen:/> range 0 proto tcp Pktgen:/> range 0 size 128 128 128 1 Pktgen:/> range 0 src mac 68:05:ca:a6:0b:1c 68:05:ca:a6:0b:1c 68:05:ca:a6:0b:1c 00:00:00:00:00:01 Pktgen:/> range 0 dst mac 68:05:ca:a6:0a:b0 68:05:ca:a6:0a:b0 68:05:ca:a6:0a:b0 00:00:00:00:00:01 Pktgen:/> range 0 src ip 192.168.103.101 192.168.103.101 192.168.103.101 0.0.0.1 Pktgen:/> range 0 dst ip 192.168.103.102 192.168.103.102 192.168.103.102 0.0.0.1 Pktgen:/> range 0 dst port 2000 2000 2000 1 Pktgen:/> range 0 src port 3000 3000 3016 1 Pktgen:/> start 0 Note: The above configuration can be saved to a file and loaded directly to the pktgen. Pktgen:/> save <path-to-file> Pktgen:/> load <path-to-file>
To view the range config, use the following command:
To switch back to packets view, use the following command:
Also refer to:
https://pktgen-dpdk.readthedocs.io/en/latest/commands.html#runtime-options-and-command