1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright(c) 2010-2014 Intel Corporation. 3 4Running the Application 5======================= 6 7EAL Command-line Options 8------------------------ 9 10Please refer to :doc:`../linux_gsg/linux_eal_parameters` or 11:doc:`../freebsd_gsg/freebsd_eal_parameters` for a list of available EAL 12command-line options. 13 14 15Testpmd Command-line Options 16---------------------------- 17 18The following are the command-line options for the testpmd applications. 19They must be separated from the EAL options, shown in the previous section, with a ``--`` separator: 20 21.. code-block:: console 22 23 sudo ./testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2 24 25The command line options are: 26 27* ``-i, --interactive`` 28 29 Run testpmd in interactive mode. 30 In this mode, the testpmd starts with a prompt that can be used to start and stop forwarding, 31 configure the application and display stats on the current packet processing session. 32 See :ref:`testpmd_runtime` for more details. 33 34 In non-interactive mode, 35 the application starts with the configuration specified on the command-line and 36 immediately enters forwarding mode. 37 38* ``-h, --help`` 39 40 Display a help message and quit. 41 42* ``-a, --auto-start`` 43 44 Start forwarding on initialization. 45 46* ``--tx-first`` 47 48 Start forwarding, after sending a burst of packets first. 49 50.. Note:: 51 52 This flag should be only used in non-interactive mode. 53 54* ``--stats-period PERIOD`` 55 56 Display statistics every PERIOD seconds, if interactive mode is disabled. 57 The default value is 0, which means that the statistics will not be displayed. 58 59* ``--nb-cores=N`` 60 61 Set the number of forwarding cores, 62 where 1 <= N <= "number of cores" or ``CONFIG_RTE_MAX_LCORE`` from the configuration file. 63 The default value is 1. 64 65* ``--nb-ports=N`` 66 67 Set the number of forwarding ports, 68 where 1 <= N <= "number of ports" on the board or ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file. 69 The default value is the number of ports on the board. 70 71* ``--coremask=0xXX`` 72 73 Set the hexadecimal bitmask of the cores running the packet forwarding test. 74 The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding. 75 76* ``--portmask=0xXX`` 77 78 Set the hexadecimal bitmask of the ports used by the packet forwarding test. 79 80* ``--numa`` 81 82 Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers 83 (mbufs). [Default setting] 84 85* ``--no-numa`` 86 87 Disable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs). 88 89* ``--port-numa-config=(port,socket)[,(port,socket)]`` 90 91 Specify the socket on which the memory pool to be used by the port will be allocated. 92 93* ``--ring-numa-config=(port,flag,socket)[,(port,flag,socket)]`` 94 95 Specify the socket on which the TX/RX rings for the port will be allocated. 96 Where flag is 1 for RX, 2 for TX, and 3 for RX and TX. 97 98* ``--socket-num=N`` 99 100 Set the socket from which all memory is allocated in NUMA mode, 101 where 0 <= N < number of sockets on the board. 102 103* ``--mbuf-size=N`` 104 105 Set the data size of the mbufs used to N bytes, where N < 65536. The default value is 2048. 106 107* ``--total-num-mbufs=N`` 108 109 Set the number of mbufs to be allocated in the mbuf pools, where N > 1024. 110 111* ``--max-pkt-len=N`` 112 113 Set the maximum packet size to N bytes, where N >= 64. The default value is 1518. 114 115* ``--eth-peers-configfile=name`` 116 117 Use a configuration file containing the Ethernet addresses of the peer ports. 118 The configuration file should contain the Ethernet addresses on separate lines:: 119 120 XX:XX:XX:XX:XX:01 121 XX:XX:XX:XX:XX:02 122 ... 123 124* ``--eth-peer=N,XX:XX:XX:XX:XX:XX`` 125 126 Set the MAC address ``XX:XX:XX:XX:XX:XX`` of the peer port N, 127 where 0 <= N < ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file. 128 129* ``--tx-ip=SRC,DST`` 130 131 Set the source and destination IP address used when doing transmit only test. 132 The defaults address values are source 192.18.0.1 and 133 destination 192.18.0.2. These are special purpose addresses 134 reserved for benchmarking (RFC 2544). 135 136* ``--tx-udp=SRC[,DST]`` 137 138 Set the source and destination UDP port number for transmit test only test. 139 The default port is the port 9 which is defined for the discard protocol 140 (RFC 863). 141 142* ``--pkt-filter-mode=mode`` 143 144 Set Flow Director mode where mode is either ``none`` (the default), ``signature`` or ``perfect``. 145 See :ref:`testpmd_flow_director` for more details. 146 147* ``--pkt-filter-report-hash=mode`` 148 149 Set Flow Director hash match reporting mode where mode is ``none``, ``match`` (the default) or ``always``. 150 151* ``--pkt-filter-size=N`` 152 153 Set Flow Director allocated memory size, where N is 64K, 128K or 256K. 154 Sizes are in kilobytes. The default is 64. 155 156* ``--pkt-filter-flexbytes-offset=N`` 157 158 Set the flexbytes offset. 159 The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address, 160 where N is 0 <= N <= 32. 161 The default value is 0x6. 162 163* ``--pkt-filter-drop-queue=N`` 164 165 Set the drop-queue. 166 In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue. 167 If the drop-queue does not exist, the packet is dropped. The default value is N=127. 168 169* ``--disable-crc-strip`` 170 171 Disable hardware CRC stripping. 172 173* ``--enable-lro`` 174 175 Enable large receive offload. 176 177* ``--enable-rx-cksum`` 178 179 Enable hardware RX checksum offload. 180 181* ``--enable-scatter`` 182 183 Enable scatter (multi-segment) RX. 184 185* ``--enable-hw-vlan`` 186 187 Enable hardware VLAN. 188 189* ``--enable-hw-vlan-filter`` 190 191 Enable hardware VLAN filter. 192 193* ``--enable-hw-vlan-strip`` 194 195 Enable hardware VLAN strip. 196 197* ``--enable-hw-vlan-extend`` 198 199 Enable hardware VLAN extend. 200 201* ``--enable-drop-en`` 202 203 Enable per-queue packet drop for packets with no descriptors. 204 205* ``--disable-rss`` 206 207 Disable RSS (Receive Side Scaling). 208 209* ``--port-topology=mode`` 210 211 Set port topology, where mode is ``paired`` (the default), ``chained`` or ``loop``. 212 213 In ``paired`` mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5). 214 215 In ``chained`` mode, the forwarding is to the next available port in the port mask, for example: (0,1), (1,2), (2,0). 216 217 The ordering of the ports can be changed using the portlist testpmd runtime function. 218 219 In ``loop`` mode, ingress traffic is simply transmitted back on the same interface. 220 221* ``--forward-mode=mode`` 222 223 Set the forwarding mode where ``mode`` is one of the following:: 224 225 io (the default) 226 mac 227 macswap 228 flowgen 229 rxonly 230 txonly 231 csum 232 icmpecho 233 ieee1588 234 tm 235 noisy 236 237* ``--rss-ip`` 238 239 Set RSS functions for IPv4/IPv6 only. 240 241* ``--rss-udp`` 242 243 Set RSS functions for IPv4/IPv6 and UDP. 244 245* ``--rxq=N`` 246 247 Set the number of RX queues per port to N, where 1 <= N <= 65535. 248 The default value is 1. 249 250* ``--rxd=N`` 251 252 Set the number of descriptors in the RX rings to N, where N > 0. 253 The default value is 128. 254 255* ``--txq=N`` 256 257 Set the number of TX queues per port to N, where 1 <= N <= 65535. 258 The default value is 1. 259 260* ``--txd=N`` 261 262 Set the number of descriptors in the TX rings to N, where N > 0. 263 The default value is 512. 264 265* ``--burst=N`` 266 267 Set the number of packets per burst to N, where 1 <= N <= 512. 268 The default value is 32. 269 If set to 0, driver default is used if defined. Else, if driver 270 default is not defined, default of 32 is used. 271 272* ``--mbcache=N`` 273 274 Set the cache of mbuf memory pools to N, where 0 <= N <= 512. 275 The default value is 16. 276 277* ``--rxpt=N`` 278 279 Set the prefetch threshold register of RX rings to N, where N >= 0. 280 The default value is 8. 281 282* ``--rxht=N`` 283 284 Set the host threshold register of RX rings to N, where N >= 0. 285 The default value is 8. 286 287* ``--rxfreet=N`` 288 289 Set the free threshold of RX descriptors to N, where 0 <= N < value of --rxd. 290 The default value is 0. 291 292* ``--rxwt=N`` 293 294 Set the write-back threshold register of RX rings to N, where N >= 0. 295 The default value is 4. 296 297* ``--txpt=N`` 298 299 Set the prefetch threshold register of TX rings to N, where N >= 0. 300 The default value is 36. 301 302* ``--txht=N`` 303 304 Set the host threshold register of TX rings to N, where N >= 0. 305 The default value is 0. 306 307* ``--txwt=N`` 308 309 Set the write-back threshold register of TX rings to N, where N >= 0. 310 The default value is 0. 311 312* ``--txfreet=N`` 313 314 Set the transmit free threshold of TX rings to N, where 0 <= N <= value of ``--txd``. 315 The default value is 0. 316 317* ``--txrst=N`` 318 319 Set the transmit RS bit threshold of TX rings to N, where 0 <= N <= value of ``--txd``. 320 The default value is 0. 321 322* ``--rx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]`` 323 324 Set the RX queues statistics counters mapping 0 <= mapping <= 15. 325 326* ``--tx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]`` 327 328 Set the TX queues statistics counters mapping 0 <= mapping <= 15. 329 330* ``--no-flush-rx`` 331 332 Don't flush the RX streams before starting forwarding. Used mainly with the PCAP PMD. 333 334* ``--txpkts=X[,Y]`` 335 336 Set TX segment sizes or total packet length. Valid for ``tx-only`` 337 and ``flowgen`` forwarding modes. 338 339* ``--txonly-multi-flow`` 340 341 Generate multiple flows in txonly mode. 342 343* ``--disable-link-check`` 344 345 Disable check on link status when starting/stopping ports. 346 347* ``--disable-device-start`` 348 349 Do not automatically start all ports. This allows testing 350 configuration of rx and tx queues before device is started 351 for the first time. 352 353* ``--no-lsc-interrupt`` 354 355 Disable LSC interrupts for all ports, even those supporting it. 356 357* ``--no-rmv-interrupt`` 358 359 Disable RMV interrupts for all ports, even those supporting it. 360 361* ``--bitrate-stats=N`` 362 363 Set the logical core N to perform bitrate calculation. 364 365* ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|all>`` 366 367 Enable printing the occurrence of the designated event. Using all will 368 enable all of them. 369 370* ``--mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|all>`` 371 372 Disable printing the occurrence of the designated event. Using all will 373 disable all of them. 374 375* ``--flow-isolate-all`` 376 377 Providing this parameter requests flow API isolated mode on all ports at 378 initialization time. It ensures all traffic is received through the 379 configured flow rules only (see flow command). 380 381 Ports that do not support this mode are automatically discarded. 382 383* ``--tx-offloads=0xXXXXXXXX`` 384 385 Set the hexadecimal bitmask of TX queue offloads. 386 The default value is 0. 387 388* ``--hot-plug`` 389 390 Enable device event monitor mechanism for hotplug. 391 392* ``--vxlan-gpe-port=N`` 393 394 Set the UDP port number of tunnel VXLAN-GPE to N. 395 The default value is 4790. 396 397* ``--mlockall`` 398 399 Enable locking all memory. 400 401* ``--no-mlockall`` 402 403 Disable locking all memory. 404 405* ``--mp-alloc <native|anon|xmem|xmemhuge>`` 406 407 Select mempool allocation mode: 408 409 * native: create and populate mempool using native DPDK memory 410 * anon: create mempool using native DPDK memory, but populate using 411 anonymous memory 412 * xmem: create and populate mempool using externally and anonymously 413 allocated area 414 * xmemhuge: create and populate mempool using externally and anonymously 415 allocated hugepage area 416 417* ``--noisy-tx-sw-buffer-size`` 418 419 Set the number of maximum elements of the FIFO queue to be created 420 for buffering packets. Only available with the noisy forwarding mode. 421 The default value is 0. 422 423* ``--noisy-tx-sw-buffer-flushtime=N`` 424 425 Set the time before packets in the FIFO queue is flushed. 426 Only available with the noisy forwarding mode. The default value is 0. 427 428* ``--noisy-lkup-memory=N`` 429 430 Set the size of the noisy neighbor simulation memory buffer in MB to N. 431 Only available with the noisy forwarding mode. The default value is 0. 432 433 434* ``--noisy-lkup-num-reads=N`` 435 436 Set the number of reads to be done in noisy neighbor simulation memory buffer to N. 437 Only available with the noisy forwarding mode. The default value is 0. 438 439* ``--noisy-lkup-num-writes=N`` 440 441 Set the number of writes to be done in noisy neighbor simulation memory buffer to N. 442 Only available with the noisy forwarding mode. The default value is 0. 443 444* ``--noisy-lkup-num-reads-writes=N`` 445 446 Set the number of r/w accesses to be done in noisy neighbor simulation memory buffer to N. 447 Only available with the noisy forwarding mode. The default value is 0. 448 449* ``--no-iova-contig`` 450 451 Enable to create mempool which is not IOVA contiguous. Valid only with --mp-alloc=anon. 452 The default value is 0. 453