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:`EAL parameters (Linux) <../linux_gsg/linux_eal_parameters>` 11or :doc:`EAL parameters (FreeBSD) <../freebsd_gsg/freebsd_eal_parameters>` for 12a list of available EAL command-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* ``--portlist=X`` 81 82 Set the forwarding ports based on the user input used by the packet forwarding test. 83 '-' denotes a range of ports to set including the two specified port IDs 84 ',' separates multiple port values. 85 Possible examples like --portlist=0,1 or --portlist=0-2 or --portlist=0,1-2 etc 86 87* ``--numa`` 88 89 Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers 90 (mbufs). [Default setting] 91 92* ``--no-numa`` 93 94 Disable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs). 95 96* ``--port-numa-config=(port,socket)[,(port,socket)]`` 97 98 Specify the socket on which the memory pool to be used by the port will be allocated. 99 100* ``--ring-numa-config=(port,flag,socket)[,(port,flag,socket)]`` 101 102 Specify the socket on which the TX/RX rings for the port will be allocated. 103 Where flag is 1 for RX, 2 for TX, and 3 for RX and TX. 104 105* ``--socket-num=N`` 106 107 Set the socket from which all memory is allocated in NUMA mode, 108 where 0 <= N < number of sockets on the board. 109 110* ``--mbuf-size=N`` 111 112 Set the data size of the mbufs used to N bytes, where N < 65536. The default value is 2048. 113 114* ``--total-num-mbufs=N`` 115 116 Set the number of mbufs to be allocated in the mbuf pools, where N > 1024. 117 118* ``--max-pkt-len=N`` 119 120 Set the maximum packet size to N bytes, where N >= 64. The default value is 1518. 121 122* ``--max-lro-pkt-size=N`` 123 124 Set the maximum LRO aggregated packet size to N bytes, where N >= 64. 125 126* ``--eth-peers-configfile=name`` 127 128 Use a configuration file containing the Ethernet addresses of the peer ports. 129 The configuration file should contain the Ethernet addresses on separate lines:: 130 131 XX:XX:XX:XX:XX:01 132 XX:XX:XX:XX:XX:02 133 ... 134 135* ``--eth-peer=N,XX:XX:XX:XX:XX:XX`` 136 137 Set the MAC address ``XX:XX:XX:XX:XX:XX`` of the peer port N, 138 where 0 <= N < ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file. 139 140* ``--tx-ip=SRC,DST`` 141 142 Set the source and destination IP address used when doing transmit only test. 143 The defaults address values are source 198.18.0.1 and 144 destination 198.18.0.2. These are special purpose addresses 145 reserved for benchmarking (RFC 5735). 146 147* ``--tx-udp=SRC[,DST]`` 148 149 Set the source and destination UDP port number for transmit test only test. 150 The default port is the port 9 which is defined for the discard protocol 151 (RFC 863). 152 153* ``--pkt-filter-mode=mode`` 154 155 Set Flow Director mode where mode is either ``none`` (the default), ``signature`` or ``perfect``. 156 See :ref:`testpmd_flow_director` for more details. 157 158* ``--pkt-filter-report-hash=mode`` 159 160 Set Flow Director hash match reporting mode where mode is ``none``, ``match`` (the default) or ``always``. 161 162* ``--pkt-filter-size=N`` 163 164 Set Flow Director allocated memory size, where N is 64K, 128K or 256K. 165 Sizes are in kilobytes. The default is 64. 166 167* ``--pkt-filter-flexbytes-offset=N`` 168 169 Set the flexbytes offset. 170 The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address, 171 where N is 0 <= N <= 32. 172 The default value is 0x6. 173 174* ``--pkt-filter-drop-queue=N`` 175 176 Set the drop-queue. 177 In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue. 178 If the drop-queue does not exist, the packet is dropped. The default value is N=127. 179 180* ``--disable-crc-strip`` 181 182 Disable hardware CRC stripping. 183 184* ``--enable-lro`` 185 186 Enable large receive offload. 187 188* ``--enable-rx-cksum`` 189 190 Enable hardware RX checksum offload. 191 192* ``--enable-scatter`` 193 194 Enable scatter (multi-segment) RX. 195 196* ``--enable-hw-vlan`` 197 198 Enable hardware VLAN. 199 200* ``--enable-hw-vlan-filter`` 201 202 Enable hardware VLAN filter. 203 204* ``--enable-hw-vlan-strip`` 205 206 Enable hardware VLAN strip. 207 208* ``--enable-hw-vlan-extend`` 209 210 Enable hardware VLAN extend. 211 212* ``--enable-hw-qinq-strip`` 213 214 Enable hardware QINQ strip. 215 216* ``--enable-drop-en`` 217 218 Enable per-queue packet drop for packets with no descriptors. 219 220* ``--disable-rss`` 221 222 Disable RSS (Receive Side Scaling). 223 224* ``--port-topology=mode`` 225 226 Set port topology, where mode is ``paired`` (the default), ``chained`` or ``loop``. 227 228 In ``paired`` mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5). 229 230 In ``chained`` mode, the forwarding is to the next available port in the port mask, for example: (0,1), (1,2), (2,0). 231 232 The ordering of the ports can be changed using the portlist testpmd runtime function. 233 234 In ``loop`` mode, ingress traffic is simply transmitted back on the same interface. 235 236* ``--forward-mode=mode`` 237 238 Set the forwarding mode where ``mode`` is one of the following:: 239 240 io (the default) 241 mac 242 macswap 243 flowgen 244 rxonly 245 txonly 246 csum 247 icmpecho 248 ieee1588 249 tm 250 noisy 251 5tswap 252 253* ``--rss-ip`` 254 255 Set RSS functions for IPv4/IPv6 only. 256 257* ``--rss-udp`` 258 259 Set RSS functions for IPv4/IPv6 and UDP. 260 261* ``--rxq=N`` 262 263 Set the number of RX queues per port to N, where 1 <= N <= 65535. 264 The default value is 1. 265 266* ``--rxd=N`` 267 268 Set the number of descriptors in the RX rings to N, where N > 0. 269 The default value is 128. 270 271* ``--txq=N`` 272 273 Set the number of TX queues per port to N, where 1 <= N <= 65535. 274 The default value is 1. 275 276* ``--txd=N`` 277 278 Set the number of descriptors in the TX rings to N, where N > 0. 279 The default value is 512. 280 281* ``--hairpinq=N`` 282 283 Set the number of hairpin queues per port to N, where 1 <= N <= 65535. 284 The default value is 0. The number of hairpin queues are added to the 285 number of TX queues and to the number of RX queues. then the first 286 RX hairpin is binded to the first TX hairpin, the second RX hairpin is 287 binded to the second TX hairpin and so on. The index of the first 288 RX hairpin queue is the number of RX queues as configured using --rxq. 289 The index of the first TX hairpin queue is the number of TX queues 290 as configured using --txq. 291 292* ``--burst=N`` 293 294 Set the number of packets per burst to N, where 1 <= N <= 512. 295 The default value is 32. 296 If set to 0, driver default is used if defined. Else, if driver 297 default is not defined, default of 32 is used. 298 299* ``--mbcache=N`` 300 301 Set the cache of mbuf memory pools to N, where 0 <= N <= 512. 302 The default value is 16. 303 304* ``--rxpt=N`` 305 306 Set the prefetch threshold register of RX rings to N, where N >= 0. 307 The default value is 8. 308 309* ``--rxht=N`` 310 311 Set the host threshold register of RX rings to N, where N >= 0. 312 The default value is 8. 313 314* ``--rxfreet=N`` 315 316 Set the free threshold of RX descriptors to N, where 0 <= N < value of --rxd. 317 The default value is 0. 318 319* ``--rxwt=N`` 320 321 Set the write-back threshold register of RX rings to N, where N >= 0. 322 The default value is 4. 323 324* ``--txpt=N`` 325 326 Set the prefetch threshold register of TX rings to N, where N >= 0. 327 The default value is 36. 328 329* ``--txht=N`` 330 331 Set the host threshold register of TX rings to N, where N >= 0. 332 The default value is 0. 333 334* ``--txwt=N`` 335 336 Set the write-back threshold register of TX rings to N, where N >= 0. 337 The default value is 0. 338 339* ``--txfreet=N`` 340 341 Set the transmit free threshold of TX rings to N, where 0 <= N <= value of ``--txd``. 342 The default value is 0. 343 344* ``--txrst=N`` 345 346 Set the transmit RS bit threshold of TX rings to N, where 0 <= N <= value of ``--txd``. 347 The default value is 0. 348 349* ``--rx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]`` 350 351 Set the RX queues statistics counters mapping 0 <= mapping <= 15. 352 353* ``--tx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]`` 354 355 Set the TX queues statistics counters mapping 0 <= mapping <= 15. 356 357* ``--no-flush-rx`` 358 359 Don't flush the RX streams before starting forwarding. Used mainly with the PCAP PMD. 360 361* ``--txpkts=X[,Y]`` 362 363 Set TX segment sizes or total packet length. Valid for ``tx-only`` 364 and ``flowgen`` forwarding modes. 365 366* ``--txonly-multi-flow`` 367 368 Generate multiple flows in txonly mode. 369 370* ``--disable-link-check`` 371 372 Disable check on link status when starting/stopping ports. 373 374* ``--disable-device-start`` 375 376 Do not automatically start all ports. This allows testing 377 configuration of rx and tx queues before device is started 378 for the first time. 379 380* ``--no-lsc-interrupt`` 381 382 Disable LSC interrupts for all ports, even those supporting it. 383 384* ``--no-rmv-interrupt`` 385 386 Disable RMV interrupts for all ports, even those supporting it. 387 388* ``--bitrate-stats=N`` 389 390 Set the logical core N to perform bitrate calculation. 391 392* ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|flow_aged|all>`` 393 394 Enable printing the occurrence of the designated event. Using all will 395 enable all of them. 396 397* ``--mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|flow_aged|all>`` 398 399 Disable printing the occurrence of the designated event. Using all will 400 disable all of them. 401 402* ``--flow-isolate-all`` 403 404 Providing this parameter requests flow API isolated mode on all ports at 405 initialization time. It ensures all traffic is received through the 406 configured flow rules only (see flow command). 407 408 Ports that do not support this mode are automatically discarded. 409 410* ``--tx-offloads=0xXXXXXXXX`` 411 412 Set the hexadecimal bitmask of TX queue offloads. 413 The default value is 0. 414 415* ``--rx-offloads=0xXXXXXXXX`` 416 417 Set the hexadecimal bitmask of RX queue offloads. 418 The default value is 0. 419 420* ``--hot-plug`` 421 422 Enable device event monitor mechanism for hotplug. 423 424* ``--vxlan-gpe-port=N`` 425 426 Set the UDP port number of tunnel VXLAN-GPE to N. 427 The default value is 4790. 428 429* ``--mlockall`` 430 431 Enable locking all memory. 432 433* ``--no-mlockall`` 434 435 Disable locking all memory. 436 437* ``--mp-alloc <native|anon|xmem|xmemhuge>`` 438 439 Select mempool allocation mode: 440 441 * native: create and populate mempool using native DPDK memory 442 * anon: create mempool using native DPDK memory, but populate using 443 anonymous memory 444 * xmem: create and populate mempool using externally and anonymously 445 allocated area 446 * xmemhuge: create and populate mempool using externally and anonymously 447 allocated hugepage area 448 449* ``--noisy-tx-sw-buffer-size`` 450 451 Set the number of maximum elements of the FIFO queue to be created 452 for buffering packets. Only available with the noisy forwarding mode. 453 The default value is 0. 454 455* ``--noisy-tx-sw-buffer-flushtime=N`` 456 457 Set the time before packets in the FIFO queue is flushed. 458 Only available with the noisy forwarding mode. The default value is 0. 459 460* ``--noisy-lkup-memory=N`` 461 462 Set the size of the noisy neighbor simulation memory buffer in MB to N. 463 Only available with the noisy forwarding mode. The default value is 0. 464 465 466* ``--noisy-lkup-num-reads=N`` 467 468 Set the number of reads to be done in noisy neighbor simulation memory buffer to N. 469 Only available with the noisy forwarding mode. The default value is 0. 470 471* ``--noisy-lkup-num-writes=N`` 472 473 Set the number of writes to be done in noisy neighbor simulation memory buffer to N. 474 Only available with the noisy forwarding mode. The default value is 0. 475 476* ``--noisy-lkup-num-reads-writes=N`` 477 478 Set the number of r/w accesses to be done in noisy neighbor simulation memory buffer to N. 479 Only available with the noisy forwarding mode. The default value is 0. 480 481* ``--no-iova-contig`` 482 483 Enable to create mempool which is not IOVA contiguous. Valid only with --mp-alloc=anon. 484 The default value is 0. 485 486* ``--rx-mq-mode`` 487 488 Set the hexadecimal bitmask of RX multi queue mode which can be enabled. 489 The default value is 0x7:: 490 491 ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG | ETH_MQ_RX_VMDQ_FLAG 492 493* ``--record-core-cycles`` 494 495 Enable measurement of CPU cycles per packet. 496 497* ``--record-burst-stats`` 498 499 Enable display of RX and TX burst stats. 500