1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2010-2014 Intel Corporation.
4 Running the Application
5 =======================
7 EAL Command-line Options
8 ------------------------
10 Please refer to :doc:`../linux_gsg/linux_eal_parameters` or
11 :doc:`../freebsd_gsg/freebsd_eal_parameters` for a list of available EAL
15 Testpmd Command-line Options
16 ----------------------------
18 The following are the command-line options for the testpmd applications.
19 They must be separated from the EAL options, shown in the previous section, with a ``--`` separator:
21 .. code-block:: console
23 sudo ./testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2
25 The commandline options are:
27 * ``-i, --interactive``
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.
34 In non-interactive mode,
35 the application starts with the configuration specified on the command-line and
36 immediately enters forwarding mode.
40 Display a help message and quit.
42 * ``-a, --auto-start``
44 Start forwarding on initialization.
48 Start forwarding, after sending a burst of packets first.
52 This flag should be only used in non-interactive mode.
54 * ``--stats-period PERIOD``
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.
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.
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.
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.
78 Set the hexadecimal bitmask of the ports used by the packet forwarding test.
82 Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers
83 (mbufs). [Default setting]
87 Disable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs).
89 * ``--port-numa-config=(port,socket)[,(port,socket)]``
91 Specify the socket on which the memory pool to be used by the port will be allocated.
93 * ``--ring-numa-config=(port,flag,socket)[,(port,flag,socket)]``
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.
100 Set the socket from which all memory is allocated in NUMA mode,
101 where 0 <= N < number of sockets on the board.
105 Set the data size of the mbufs used to N bytes, where N < 65536. The default value is 2048.
107 * ``--total-num-mbufs=N``
109 Set the number of mbufs to be allocated in the mbuf pools, where N > 1024.
111 * ``--max-pkt-len=N``
113 Set the maximum packet size to N bytes, where N >= 64. The default value is 1518.
115 * ``--eth-peers-configfile=name``
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::
125 * ``--eth-peer=N,XX:XX:XX:XX:XX:XX``
127 Set the MAC address ``XX:XX:XX:XX:XX:XX`` of the peer port N,
128 where 0 <= N < ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file.
130 * ``--pkt-filter-mode=mode``
132 Set Flow Director mode where mode is either ``none`` (the default), ``signature`` or ``perfect``.
133 See :ref:`testpmd_flow_director` for more details.
135 * ``--pkt-filter-report-hash=mode``
137 Set Flow Director hash match reporting mode where mode is ``none``, ``match`` (the default) or ``always``.
139 * ``--pkt-filter-size=N``
141 Set Flow Director allocated memory size, where N is 64K, 128K or 256K.
142 Sizes are in kilobytes. The default is 64.
144 * ``--pkt-filter-flexbytes-offset=N``
146 Set the flexbytes offset.
147 The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address,
148 where N is 0 <= N <= 32.
149 The default value is 0x6.
151 * ``--pkt-filter-drop-queue=N``
154 In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue.
155 If the drop-queue does not exist, the packet is dropped. The default value is N=127.
157 * ``--disable-crc-strip``
159 Disable hardware CRC stripping.
163 Enable large receive offload.
165 * ``--enable-rx-cksum``
167 Enable hardware RX checksum offload.
169 * ``--enable-scatter``
171 Enable scatter (multi-segment) RX.
173 * ``--enable-hw-vlan``
175 Enable hardware VLAN.
177 * ``--enable-hw-vlan-filter``
179 Enable hardware VLAN filter.
181 * ``--enable-hw-vlan-strip``
183 Enable hardware VLAN strip.
185 * ``--enable-hw-vlan-extend``
187 Enable hardware VLAN extend.
189 * ``--enable-drop-en``
191 Enable per-queue packet drop for packets with no descriptors.
195 Disable RSS (Receive Side Scaling).
197 * ``--port-topology=mode``
199 Set port topology, where mode is ``paired`` (the default), ``chained`` or ``loop``.
201 In ``paired`` mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5).
203 In ``chained`` mode, the forwarding is to the next available port in the port mask, for example: (0,1), (1,2), (2,0).
205 The ordering of the ports can be changed using the portlist testpmd runtime function.
207 In ``loop`` mode, ingress traffic is simply transmitted back on the same interface.
209 * ``--forward-mode=mode``
211 Set the forwarding mode where ``mode`` is one of the following::
227 Set RSS functions for IPv4/IPv6 only.
231 Set RSS functions for IPv4/IPv6 and UDP.
235 Set the number of RX queues per port to N, where 1 <= N <= 65535.
236 The default value is 1.
240 Set the number of descriptors in the RX rings to N, where N > 0.
241 The default value is 128.
245 Set the number of TX queues per port to N, where 1 <= N <= 65535.
246 The default value is 1.
250 Set the number of descriptors in the TX rings to N, where N > 0.
251 The default value is 512.
255 Set the number of packets per burst to N, where 1 <= N <= 512.
256 The default value is 32.
257 If set to 0, driver default is used if defined. Else, if driver
258 default is not defined, default of 32 is used.
262 Set the cache of mbuf memory pools to N, where 0 <= N <= 512.
263 The default value is 16.
267 Set the prefetch threshold register of RX rings to N, where N >= 0.
268 The default value is 8.
272 Set the host threshold register of RX rings to N, where N >= 0.
273 The default value is 8.
277 Set the free threshold of RX descriptors to N, where 0 <= N < value of --rxd.
278 The default value is 0.
282 Set the write-back threshold register of RX rings to N, where N >= 0.
283 The default value is 4.
287 Set the prefetch threshold register of TX rings to N, where N >= 0.
288 The default value is 36.
292 Set the host threshold register of TX rings to N, where N >= 0.
293 The default value is 0.
297 Set the write-back threshold register of TX rings to N, where N >= 0.
298 The default value is 0.
302 Set the transmit free threshold of TX rings to N, where 0 <= N <= value of ``--txd``.
303 The default value is 0.
307 Set the transmit RS bit threshold of TX rings to N, where 0 <= N <= value of ``--txd``.
308 The default value is 0.
310 * ``--rx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]``
312 Set the RX queues statistics counters mapping 0 <= mapping <= 15.
314 * ``--tx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]``
316 Set the TX queues statistics counters mapping 0 <= mapping <= 15.
320 Don't flush the RX streams before starting forwarding. Used mainly with the PCAP PMD.
324 Set TX segment sizes or total packet length. Valid for ``tx-only``
325 and ``flowgen`` forwarding modes.
327 * ``--disable-link-check``
329 Disable check on link status when starting/stopping ports.
331 * ``--no-lsc-interrupt``
333 Disable LSC interrupts for all ports, even those supporting it.
335 * ``--no-rmv-interrupt``
337 Disable RMV interrupts for all ports, even those supporting it.
339 * ``--bitrate-stats=N``
341 Set the logical core N to perform bitrate calculation.
343 * ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|all>``
345 Enable printing the occurrence of the designated event. Using all will
348 * ``--mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|dev_probed|dev_released|all>``
350 Disable printing the occurrence of the designated event. Using all will
353 * ``--flow-isolate-all``
355 Providing this parameter requests flow API isolated mode on all ports at
356 initialization time. It ensures all traffic is received through the
357 configured flow rules only (see flow command).
359 Ports that do not support this mode are automatically discarded.
361 * ``--tx-offloads=0xXXXXXXXX``
363 Set the hexadecimal bitmask of TX queue offloads.
364 The default value is 0.
368 Enable device event monitor machenism for hotplug.
370 * ``--vxlan-gpe-port=N``
372 Set the UDP port number of tunnel VXLAN-GPE to N.
373 The default value is 4790.
377 Enable locking all memory.
381 Disable locking all memory.
383 * ``--mp-alloc <native|anon|xmem|xmemhuge>``
385 Select mempool allocation mode:
387 * native: create and populate mempool using native DPDK memory
388 * anon: create mempool using native DPDK memory, but populate using
390 * xmem: create and populate mempool using externally and anonymously
392 * xmemhuge: create and populate mempool using externally and anonymously
393 allocated hugepage area
395 * ``--noisy-tx-sw-buffer-size``
397 Set the number of maximum elements of the FIFO queue to be created
398 for buffering packets. Only available with the noisy forwarding mode.
399 The default value is 0.
401 * ``--noisy-tx-sw-buffer-flushtime=N``
403 Set the time before packets in the FIFO queue is flushed.
404 Only available with the noisy forwarding mode. The default value is 0.
406 * ``--noisy-lkup-memory=N``
408 Set the size of the noisy neighbour simulation memory buffer in MB to N.
409 Only available with the noisy forwarding mode. The default value is 0.
412 * ``--noisy-lkup-num-reads=N``
414 Set the number of reads to be done in noisy neighbour simulation memory buffer to N.
415 Only available with the noisy forwarding mode. The default value is 0.
417 * ``--noisy-lkup-num-writes=N``
419 Set the number of writes to be done in noisy neighbour simulation memory buffer to N.
420 Only available with the noisy forwarding mode. The default value is 0.
422 * ``--noisy-lkup-num-reads-writes=N``
424 Set the number of r/w accesses to be done in noisy neighbour simulation memory buffer to N.
425 Only available with the noisy forwarding mode. The default value is 0.