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 Guide for more information on these options.
43 Set the hexadecimal bitmask of the cores to run on.
47 Set the number of memory channels to use.
49 * -b, --pci-blacklist domain:bus:devid.func
51 Blacklist a PCI devise to prevent EAL from using it. Multiple -b options are allowed.
55 Load an external driver. Multiple -d options are allowed.
57 * -w, --pci-whitelist domain:bus:devid:func
59 Add a PCI device in white list.
63 Memory to allocate. See also --socket-mem.
67 Set the number of memory ranks (auto-detected by default).
71 Display the version information on startup.
75 Support application running on Xen Domain0 without hugetlbfs.
79 Set the syslog facility.
83 Set the memory to allocate on specific sockets (use comma separated values).
87 Specify the directory where the hugetlbfs is mounted.
91 Set the type of the current process.
95 Prefix for hugepage filenames.
99 Use VMware TSC map instead of native RDTSC.
103 Add a virtual device, with format "<driver><id>[,key=val, ...]", e.g. --vdev=eth_pcap0,iface=eth2.
107 Specify base virtual address.
111 Create /dev/uioX (usually done by hotplug).
115 No shared config (mmap'd files).
127 Use malloc instead of hugetlbfs.
130 Testpmd Command-line Options
131 ----------------------------
133 The following are the command-line options for the testpmd applications.
134 They must be separated from the EAL options, shown in the previous section, with a -- separator:
136 .. code-block:: console
138 sudo ./testpmd -c 0xF -n 4 -- -i --portmask=0x1 --nb-cores=2
142 Run testpmd in interactive mode.
143 In this mode, the testpmd starts with a prompt that can be used to start and stop forwarding,
144 configure the application and display stats on the current packet processing session.
145 See the Section 5.0, "Test Runtime Functions" section for more details.
147 In non-interactive mode,
148 the application starts with the configuration specified on the command-line and
149 immediately enters forwarding mode.
153 Display a help message and quit.
157 Start forwarding on init.
161 Set the number of forwarding cores,
162 where 1 <= N <= number of cores or RTE_MAX_LCORE from the configuration file.
163 The default value is 1.
167 Set the number of forwarding ports,
168 where 1 <= N <= number of ports on the board or RTE_MAX_ETHPORTS from the configuration file.
169 The default value is the number of ports on the board.
173 Set the hexadecimal bitmask of the cores running the packet forwarding test.
174 The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
178 Set the hexadecimal bitmask of the ports used by the packet forwarding test.
182 Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs).
184 * --port-numa-config=(port,socket)[,(port,socket)]
186 Specify the socket on which the memory pool to be used by the port will be allocated.
188 * --ring-numa-config=(port,flag,socket)[,(port,flag,socket)]
190 Specify the socket on which the TX/RX rings for the port will be allocated.
191 Where flag is 1 for RX, 2 for TX, and 3 for RX and TX.
195 Set the socket from which all memory is allocated in NUMA mode,
196 where 0 <= N < number of sockets on the board.
200 Set the data size of the mbufs used to N bytes, where N < 65536. The default value is 2048.
202 * --total-num-mbufs=N
204 Set the number of mbufs to be allocated in the mbuf pools, where N > 1024.
208 Set the maximum packet size to N bytes, where N >= 64. The default value is 1518.
210 * --eth-peers-configfile=name
212 Use a configuration file containing the Ethernet addresses of the peer ports.
213 The configuration file should contain the Ethernet addresses on separate lines:
221 * --eth-peer=N,XX:XX:XX:XX:XX:XX
223 Set the MAC address XX:XX:XX:XX:XX:XX of the peer port N,
224 where 0 <= N < RTE_MAX_ETHPORTS from the configuration file.
226 * --pkt-filter-mode=mode
228 Set Flow Director mode where mode is either none (the default), signature or perfect.
229 See the Section 5.6, "Flow Director Functions" for more detail.
231 * --pkt-filter-report-hash=mode
233 Set Flow Director hash match reporting mode where mode is none, match (the default) or always.
235 * --pkt-filter-size=N
237 Set Flow Director allocated memory size, where N is 64K, 128K or 256K.
238 Sizes are in kilobytes. The default is 64.
240 * --pkt-filter-flexbytes-offset=N
242 Set the flexbytes offset.
243 The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address,
244 where N is 0 <= N <= 32.
245 The default value is 0x6.
247 * --pkt-filter-drop-queue=N
250 In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue.
251 If the drop-queue does not exist, the packet is dropped. The default value is N=127.
255 Enable hardware CRC stripping.
259 Enable hardware RX checksum offload.
263 Disable hardware VLAN.
265 * --disable-hw-vlan-filter
267 Disable hardware VLAN filter.
269 * --disable-hw-vlan-strip
271 Disable hardware VLAN strip.
273 * --disable-hw-vlan-extend
275 Disable hardware VLAN extend.
279 Enable per-queue packet drop for packets with no descriptors.
283 Disable RSS (Receive Side Scaling).
285 * --port-topology=mode
287 Set port topology, where mode is paired(the default) or chained.
288 In paired mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5).
289 In chained mode, the forwarding is to the next available port in the port mask, for example: (0,1), (1,2), (2,0).
290 The ordering of the ports can be changed using the portlist testpmd runtime function.
294 Set forwarding mode. (N: io|mac|mac_retry|mac_swap|flowgen|rxonly|txonly|csum|icmpecho)
298 Set RSS functions for IPv4/IPv6 only.
302 Set RSS functions for IPv4/IPv6 and UDP.
306 Set the number of RX queues per port to N, where 1 <= N <= 65535.
307 The default value is 1.
311 Set the number of descriptors in the RX rings to N, where N > 0.
312 The default value is 128.
316 Set the number of TX queues per port to N, where 1 <= N <= 65535.
317 The default value is 1.
321 Set the number of descriptors in the TX rings to N, where N > 0.
322 The default value is 512.
326 Set the number of packets per burst to N, where 1 <= N <= 512.
327 The default value is 16.
331 Set the cache of mbuf memory pools to N, where 0 <= N <= 512.
332 The default value is 16.
336 Set the prefetch threshold register of RX rings to N, where N >= 0.
337 The default value is 8.
341 Set the host threshold register of RX rings to N, where N >= 0.
342 The default value is 8.
346 Set the free threshold of RX descriptors to N, where 0 <= N < value of --rxd.
347 The default value is 0.
351 Set the write-back threshold register of RX rings to N, where N >= 0.
352 The default value is 4.
356 Set the prefetch threshold register of TX rings to N, where N >= 0.
357 The default value is 36.
361 Set the host threshold register of TX rings to N, where N >= 0.
362 The default value is 0.
366 Set the write-back threshold register of TX rings to N, where N >= 0.
367 The default value is 0.
371 Set the transmit free threshold of TX rings to N, where 0 <= N <= value of --txd.
372 The default value is 0.
376 Set the transmit RS bit threshold of TX rings to N, where 0 <= N <= value of --txd.
377 The default value is 0.
379 * --txqflags=0xXXXXXXXX
381 Set the hexadecimal bitmask of TX queue flags, where 0 <= N <= 0x7FFFFFFF.
382 The default value is 0.
384 * --rx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]
386 Set the RX queues statistics counters mapping 0 <= mapping <= 15.
388 * --tx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]
390 Set the TX queues statistics counters mapping 0 <= mapping <= 15.
394 Don't flush the RX streams before starting forwarding. Used mainly with PCAP drivers.
398 Set TX segment sizes.
400 * --disable-link-check
402 Disable check on link status when starting/stopping ports.