2 Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
9 * Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 * Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in
13 the documentation and/or other materials provided with the
15 * Neither the name of Intel Corporation nor the names of its
16 contributors may be used to endorse or promote products derived
17 from this software without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 Running the Application
32 =======================
34 EAL Command-line Options
35 ------------------------
37 The following are the EAL command-line options that can be used in conjunction with the testpmd,
38 or any other DPDK application.
39 See the DPDK Getting Started Guides for more information on these options.
43 Set the hexadecimal bitmask of the cores to run on.
47 List of cores to run on
49 The argument format is ``<c1>[-c2][,c3[-c4],...]``
50 where ``c1``, ``c2``, etc are core indexes between 0 and 128.
52 * ``--lcores COREMAP``
54 Map lcore set to physical cpu set
56 The argument format is::
58 <lcores[@cpus]>[<,lcores[@cpus]>...]
60 Lcore and CPU lists are grouped by ``(`` and ``)`` Within the group.
61 The ``-`` character is used as a range separator and ``,`` is used as a single number separator.
62 The grouping ``()`` can be omitted for single element group.
63 The ``@`` can be omitted if cpus and lcores have the same value.
65 * ``--master-lcore ID``
67 Core ID that is used as master.
71 Set the number of memory channels to use.
73 * ``-b, --pci-blacklist domain:bus:devid.func``
75 Blacklist a PCI device to prevent EAL from using it. Multiple -b options are allowed.
79 Load an external driver. Multiple -d options are allowed.
81 * ``-w, --pci-whitelist domain:bus:devid:func``
83 Add a PCI device in white list.
87 Memory to allocate. See also ``--socket-mem``.
91 Set the number of memory ranks (auto-detected by default).
95 Display the version information on startup.
99 Support application running on Xen Domain0 without hugetlbfs.
103 Set the syslog facility.
107 Set the memory to allocate on specific sockets (use comma separated values).
111 Specify the directory where the hugetlbfs is mounted.
115 Set the type of the current process.
119 Prefix for hugepage filenames.
121 * ``-vmware-tsc-map``
123 Use VMware TSC map instead of native RDTSC.
127 Add a virtual device using the format::
129 <driver><id>[,key=val, ...]
133 --vdev 'net_pcap0,rx_pcap=input.pcap,tx_pcap=output.pcap'
135 * ``--base-virtaddr``
137 Specify base virtual address.
139 * ``--create-uio-dev``
141 Create ``/dev/uioX`` (usually done by hotplug).
145 No shared config (mmap-ed files).
157 Use malloc instead of hugetlbfs.
160 Testpmd Command-line Options
161 ----------------------------
163 The following are the command-line options for the testpmd applications.
164 They must be separated from the EAL options, shown in the previous section, with a ``--`` separator:
166 .. code-block:: console
168 sudo ./testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2
170 The commandline options are:
172 * ``-i, --interactive``
174 Run testpmd in interactive mode.
175 In this mode, the testpmd starts with a prompt that can be used to start and stop forwarding,
176 configure the application and display stats on the current packet processing session.
177 See :ref:`testpmd_runtime` for more details.
179 In non-interactive mode,
180 the application starts with the configuration specified on the command-line and
181 immediately enters forwarding mode.
185 Display a help message and quit.
187 * ``-a, --auto-start``
189 Start forwarding on initialization.
193 Start forwarding, after sending a burst of packets first.
197 This flag should be only used in non-interactive mode.
201 Set the number of forwarding cores,
202 where 1 <= N <= "number of cores" or ``CONFIG_RTE_MAX_LCORE`` from the configuration file.
203 The default value is 1.
207 Set the number of forwarding ports,
208 where 1 <= N <= "number of ports" on the board or ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file.
209 The default value is the number of ports on the board.
211 * ``--coremask=0xXX``
213 Set the hexadecimal bitmask of the cores running the packet forwarding test.
214 The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
216 * ``--portmask=0xXX``
218 Set the hexadecimal bitmask of the ports used by the packet forwarding test.
222 Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers
223 (mbufs). [Default setting]
227 Disable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs).
229 * ``--port-numa-config=(port,socket)[,(port,socket)]``
231 Specify the socket on which the memory pool to be used by the port will be allocated.
233 * ``--ring-numa-config=(port,flag,socket)[,(port,flag,socket)]``
235 Specify the socket on which the TX/RX rings for the port will be allocated.
236 Where flag is 1 for RX, 2 for TX, and 3 for RX and TX.
240 Set the socket from which all memory is allocated in NUMA mode,
241 where 0 <= N < number of sockets on the board.
245 Set the data size of the mbufs used to N bytes, where N < 65536. The default value is 2048.
247 * ``--total-num-mbufs=N``
249 Set the number of mbufs to be allocated in the mbuf pools, where N > 1024.
251 * ``--max-pkt-len=N``
253 Set the maximum packet size to N bytes, where N >= 64. The default value is 1518.
255 * ``--eth-peers-configfile=name``
257 Use a configuration file containing the Ethernet addresses of the peer ports.
258 The configuration file should contain the Ethernet addresses on separate lines::
265 * ``--eth-peer=N,XX:XX:XX:XX:XX:XX``
267 Set the MAC address ``XX:XX:XX:XX:XX:XX`` of the peer port N,
268 where 0 <= N < ``CONFIG_RTE_MAX_ETHPORTS`` from the configuration file.
270 * ``--pkt-filter-mode=mode``
272 Set Flow Director mode where mode is either ``none`` (the default), ``signature`` or ``perfect``.
273 See :ref:`testpmd_flow_director` for more details.
275 * ``--pkt-filter-report-hash=mode``
277 Set Flow Director hash match reporting mode where mode is ``none``, ``match`` (the default) or ``always``.
279 * ``--pkt-filter-size=N``
281 Set Flow Director allocated memory size, where N is 64K, 128K or 256K.
282 Sizes are in kilobytes. The default is 64.
284 * ``--pkt-filter-flexbytes-offset=N``
286 Set the flexbytes offset.
287 The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address,
288 where N is 0 <= N <= 32.
289 The default value is 0x6.
291 * ``--pkt-filter-drop-queue=N``
294 In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue.
295 If the drop-queue does not exist, the packet is dropped. The default value is N=127.
297 * ``--disable-crc-strip``
299 Disable hardware CRC stripping.
303 Enable large receive offload.
305 * ``--enable-rx-cksum``
307 Enable hardware RX checksum offload.
309 * ``--enable-scatter``
311 Enable scatter (multi-segment) RX.
313 * ``--disable-hw-vlan``
315 Disable hardware VLAN.
317 * ``--disable-hw-vlan-filter``
319 Disable hardware VLAN filter.
321 * ``--disable-hw-vlan-strip``
323 Disable hardware VLAN strip.
325 * ``--disable-hw-vlan-extend``
327 Disable hardware VLAN extend.
329 * ``--enable-drop-en``
331 Enable per-queue packet drop for packets with no descriptors.
335 Disable RSS (Receive Side Scaling).
337 * ``--port-topology=mode``
339 Set port topology, where mode is ``paired`` (the default) or ``chained``.
341 In ``paired`` mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5).
343 In ``chained`` mode, the forwarding is to the next available port in the port mask, for example: (0,1), (1,2), (2,0).
345 The ordering of the ports can be changed using the portlist testpmd runtime function.
347 * ``--forward-mode=mode``
349 Set the forwarding mode where ``mode`` is one of the following::
363 Set RSS functions for IPv4/IPv6 only.
367 Set RSS functions for IPv4/IPv6 and UDP.
371 Set the number of RX queues per port to N, where 1 <= N <= 65535.
372 The default value is 1.
376 Set the number of descriptors in the RX rings to N, where N > 0.
377 The default value is 128.
381 Set the number of TX queues per port to N, where 1 <= N <= 65535.
382 The default value is 1.
386 Set the number of descriptors in the TX rings to N, where N > 0.
387 The default value is 512.
391 Set the number of packets per burst to N, where 1 <= N <= 512.
392 The default value is 16.
396 Set the cache of mbuf memory pools to N, where 0 <= N <= 512.
397 The default value is 16.
401 Set the prefetch threshold register of RX rings to N, where N >= 0.
402 The default value is 8.
406 Set the host threshold register of RX rings to N, where N >= 0.
407 The default value is 8.
411 Set the free threshold of RX descriptors to N, where 0 <= N < value of --rxd.
412 The default value is 0.
416 Set the write-back threshold register of RX rings to N, where N >= 0.
417 The default value is 4.
421 Set the prefetch threshold register of TX rings to N, where N >= 0.
422 The default value is 36.
426 Set the host threshold register of TX rings to N, where N >= 0.
427 The default value is 0.
431 Set the write-back threshold register of TX rings to N, where N >= 0.
432 The default value is 0.
436 Set the transmit free threshold of TX rings to N, where 0 <= N <= value of ``--txd``.
437 The default value is 0.
441 Set the transmit RS bit threshold of TX rings to N, where 0 <= N <= value of ``--txd``.
442 The default value is 0.
444 * ``--txqflags=0xXXXXXXXX``
446 Set the hexadecimal bitmask of TX queue flags, where 0 <= N <= 0x7FFFFFFF.
447 The default value is 0.
451 When using hardware offload functions such as vlan or checksum
452 add ``txqflags=0`` to force the full-featured TX code path.
453 In some PMDs this may already be the default.
456 * ``--rx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]``
458 Set the RX queues statistics counters mapping 0 <= mapping <= 15.
460 * ``--tx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]``
462 Set the TX queues statistics counters mapping 0 <= mapping <= 15.
466 Don't flush the RX streams before starting forwarding. Used mainly with the PCAP PMD.
470 Set TX segment sizes or total packet length. Valid for ``tx-only``
471 and ``flowgen`` forwarding modes.
473 * ``--disable-link-check``
475 Disable check on link status when starting/stopping ports.
477 * ``--no-lsc-interrupt``
479 Disable LSC interrupts for all ports, even those supporting it.
481 * ``--no-rmv-interrupt``
483 Disable RMV interrupts for all ports, even those supporting it.
485 * ``--bitrate-stats=N``
487 Set the logical core N to perform bitrate calculation.
489 * ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|all>``
491 Enable printing the occurrence of the designated event. Using all will
494 * ``--mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|all>``
496 Disable printing the occurrence of the designated event. Using all will