doc: add note for --txqflags in testpmd
[dpdk.git] / doc / guides / testpmd_app_ug / run_app.rst
1 ..  BSD LICENSE
2     Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
3     All rights reserved.
4
5     Redistribution and use in source and binary forms, with or without
6     modification, are permitted provided that the following conditions
7     are met:
8
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
14     distribution.
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.
18
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.
30
31 Running the Application
32 =======================
33
34 EAL Command-line Options
35 ------------------------
36
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.
40
41 *   -c COREMASK
42
43     Set the hexadecimal bitmask of the cores to run on.
44
45 *   -l CORELIST
46
47     List of cores to run on
48
49     The argument format is <c1>[-c2][,c3[-c4],...]
50     where c1, c2, etc are core indexes between 0 and 128
51
52 *   --lcores COREMAP
53
54     Map lcore set to physical cpu set
55
56     The argument format is
57         '<lcores[@cpus]>[<,lcores[@cpus]>...]'
58
59     lcores and cpus list are grouped by '(' and ')'
60     Within the group, '-' is used for range separator,
61     ',' is used for single number separator.
62     '( )' can be omitted for single element group,
63     '@' can be omitted if cpus and lcores have the same value
64
65 *   --master-lcore ID
66
67     Core ID that is used as master
68
69 *   -n NUM
70
71     Set the number of memory channels to use.
72
73 *   -b, --pci-blacklist domain:bus:devid.func
74
75     Blacklist a PCI devise to prevent EAL from using it. Multiple -b options are allowed.
76
77 *   -d LIB.so
78
79     Load an external driver. Multiple -d options are allowed.
80
81 *   -w, --pci-whitelist domain:bus:devid:func
82
83     Add a PCI device in white list.
84
85 *   -m MB
86
87     Memory to allocate. See also --socket-mem.
88
89 *   -r NUM
90
91     Set the number of memory ranks (auto-detected by default).
92
93 *   -v
94
95     Display the version information on startup.
96
97 *   --xen-dom0
98
99     Support application running on Xen Domain0 without hugetlbfs.
100
101 *   --syslog
102
103     Set the syslog facility.
104
105 *   --socket-mem
106
107     Set the memory to allocate on specific sockets (use comma separated values).
108
109 *   --huge-dir
110
111     Specify the directory where the hugetlbfs is mounted.
112
113 *   --proc-type
114
115     Set the type of the current process.
116
117 *   --file-prefix
118
119     Prefix for hugepage filenames.
120
121 *   -vmware-tsc-map
122
123     Use VMware TSC map instead of native RDTSC.
124
125 *   --vdev
126
127     Add a virtual device, with format "<driver><id>[,key=val, ...]", e.g. --vdev=eth_pcap0,iface=eth2.
128
129 *   --base-virtaddr
130
131     Specify base virtual address.
132
133 *   --create-uio-dev
134
135     Create /dev/uioX (usually done by hotplug).
136
137 *   --no-shconf
138
139     No shared config (mmap'd files).
140
141 *   --no-pci
142
143     Disable pci.
144
145 *   --no-hpet
146
147     Disable hpet.
148
149 *   --no-huge
150
151     Use malloc instead of hugetlbfs.
152
153
154 Testpmd Command-line Options
155 ----------------------------
156
157 The following are the command-line options for the testpmd applications.
158 They must be separated from the EAL options, shown in the previous section, with a -- separator:
159
160 .. code-block:: console
161
162     sudo ./testpmd -c 0xF -n 4 -- -i --portmask=0x1 --nb-cores=2
163
164 *   -i, --interactive
165
166     Run testpmd in interactive mode.
167     In this mode, the testpmd starts with a prompt that can be used to start and stop forwarding,
168     configure the application and display stats on the current packet processing session.
169     See the Section 5.0, "Test Runtime Functions" section for more details.
170
171     In non-interactive mode,
172     the application starts with the configuration specified on the command-line and
173     immediately enters forwarding mode.
174
175 *   -h, --help
176
177     Display a help message and quit.
178
179 *   -a, --auto-start
180
181     Start forwarding on init.
182
183 *   --nb-cores=N
184
185     Set the number of forwarding cores,
186     where 1 <= N <= number of cores or RTE_MAX_LCORE from the configuration file.
187     The default value is 1.
188
189 *   --nb-ports=N
190
191     Set the number of forwarding ports,
192     where 1 <= N <= number of ports on the board or RTE_MAX_ETHPORTS from the configuration file.
193     The default value is the number of ports on the board.
194
195 *   --coremask=0xXX
196
197     Set the hexadecimal bitmask of the cores running the packet forwarding test.
198     The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
199
200 *   --portmask=0xXX
201
202     Set the hexadecimal bitmask of the ports used by the packet forwarding test.
203
204 *   --numa
205
206     Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs).
207
208 *   --port-numa-config=(port,socket)[,(port,socket)]
209
210     Specify the socket on which the memory pool to be used by the port will be allocated.
211
212 *   --ring-numa-config=(port,flag,socket)[,(port,flag,socket)]
213
214     Specify the socket on which the TX/RX rings for the port will be allocated.
215     Where flag is 1 for RX, 2 for TX, and 3 for RX and TX.
216
217 *   --socket-num=N
218
219     Set the socket from which all memory is allocated in NUMA mode,
220     where 0 <= N < number of sockets on the board.
221
222 *   --mbuf-size=N
223
224     Set the data size of the mbufs used to N bytes, where N < 65536. The default value is 2048.
225
226 *   --total-num-mbufs=N
227
228     Set the number of mbufs to be allocated in the mbuf pools, where N > 1024.
229
230 *   --max-pkt-len=N
231
232     Set the maximum packet size to N bytes, where N >= 64. The default value is 1518.
233
234 *   --eth-peers-configfile=name
235
236     Use a configuration file containing the Ethernet addresses of the peer ports.
237     The configuration file should contain the Ethernet addresses on separate lines:
238
239     XX:XX:XX:XX:XX:01
240
241     XX:XX:XX:XX:XX:02
242
243     ...
244
245 *   --eth-peer=N,XX:XX:XX:XX:XX:XX
246
247     Set the MAC address XX:XX:XX:XX:XX:XX of the peer port N,
248     where 0 <= N < RTE_MAX_ETHPORTS from the configuration file.
249
250 *   --pkt-filter-mode=mode
251
252     Set Flow Director mode where mode is either none (the default), signature or perfect.
253     See the Section 5.6, "Flow Director Functions" for more detail.
254
255 *   --pkt-filter-report-hash=mode
256
257     Set Flow Director hash match reporting mode where mode is none, match (the default) or always.
258
259 *   --pkt-filter-size=N
260
261     Set Flow Director allocated memory size, where N is 64K, 128K or 256K.
262     Sizes are in kilobytes. The default is 64.
263
264 *   --pkt-filter-flexbytes-offset=N
265
266     Set the flexbytes offset.
267     The offset is defined in words (not bytes) counted from the first byte of the destination Ethernet MAC address,
268     where N is 0 <= N <= 32.
269     The default value is 0x6.
270
271 *   --pkt-filter-drop-queue=N
272
273     Set the drop-queue.
274     In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue.
275     If the drop-queue does not exist, the packet is dropped. The default value is N=127.
276
277 *   --crc-strip
278
279     Enable hardware CRC stripping.
280
281 *   --enable-rx-cksum
282
283     Enable hardware RX checksum offload.
284
285 *   --disable-hw-vlan
286
287     Disable hardware VLAN.
288
289 *   --disable-hw-vlan-filter
290
291     Disable hardware VLAN filter.
292
293 *   --disable-hw-vlan-strip
294
295     Disable hardware VLAN strip.
296
297 *   --disable-hw-vlan-extend
298
299     Disable hardware VLAN extend.
300
301 *   --enable-drop-en
302
303     Enable per-queue packet drop for packets with no descriptors.
304
305 *   --disable-rss
306
307     Disable RSS (Receive Side Scaling).
308
309 *   --port-topology=mode
310
311     Set port topology, where mode is paired(the default) or chained.
312     In paired mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5).
313     In chained mode, the forwarding is to the next available port in the port mask, for example: (0,1), (1,2), (2,0).
314     The ordering of the ports can be changed using the portlist testpmd runtime function.
315
316 *   --forward-mode=N
317
318     Set forwarding mode. (N: io|mac|mac_retry|mac_swap|flowgen|rxonly|txonly|csum|icmpecho)
319
320 *   --rss-ip
321
322     Set RSS functions for IPv4/IPv6 only.
323
324 *   --rss-udp
325
326     Set RSS functions for IPv4/IPv6 and UDP.
327
328 *   --rxq=N
329
330     Set the number of RX queues per port to N, where 1 <= N <= 65535.
331     The default value is 1.
332
333 *   --rxd=N
334
335     Set the number of descriptors in the RX rings to N, where N > 0.
336     The default value is 128.
337
338 *   --txq=N
339
340     Set the number of TX queues per port to N, where 1 <= N <= 65535.
341     The default value is 1.
342
343 *   --txd=N
344
345     Set the number of descriptors in the TX rings to N, where N > 0.
346     The default value is 512.
347
348 *   --burst=N
349
350     Set the number of packets per burst to N, where 1 <= N <= 512.
351     The default value is 16.
352
353 *   --mbcache=N
354
355     Set the cache of mbuf memory pools to N, where 0 <= N <= 512.
356     The default value is 16.
357
358 *   --rxpt=N
359
360     Set the prefetch threshold register of RX rings to N, where N >= 0.
361     The default value is 8.
362
363 *   --rxht=N
364
365     Set the host threshold register of RX rings to N, where N >= 0.
366     The default value is 8.
367
368 *   --rxfreet=N
369
370     Set the free threshold of RX descriptors to N, where 0 <= N < value of --rxd.
371     The default value is 0.
372
373 *   --rxwt=N
374
375     Set the write-back threshold register of RX rings to N, where N >= 0.
376     The default value is 4.
377
378 *   --txpt=N
379
380     Set the prefetch threshold register of TX rings to N, where N >= 0.
381     The default value is 36.
382
383 *   --txht=N
384
385     Set the host threshold register of TX rings to N, where N >= 0.
386     The default value is 0.
387
388 *   --txwt=N
389
390     Set the write-back threshold register of TX rings to N, where N >= 0.
391     The default value is 0.
392
393 *   --txfreet=N
394
395     Set the transmit free threshold of TX rings to N, where 0 <= N <= value of --txd.
396     The default value is 0.
397
398 *   --txrst=N
399
400     Set the transmit RS bit threshold of TX rings to N, where 0 <= N <= value of --txd.
401     The default value is 0.
402
403 *   --txqflags=0xXXXXXXXX
404
405     Set the hexadecimal bitmask of TX queue flags, where 0 <= N <= 0x7FFFFFFF.
406     The default value is 0.
407
408     Note::
409
410         When using hardware offload functions such as vlan, checksum...,
411         add txqflags=0, since depending on the PMD,
412         txqflags might be set to a non-zero value.
413
414 *   --rx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]
415
416     Set the RX queues statistics counters mapping 0 <= mapping <= 15.
417
418 *   --tx-queue-stats-mapping=(port,queue,mapping)[,(port,queue,mapping)]
419
420     Set the TX queues statistics counters mapping 0 <= mapping <= 15.
421
422 *   --no-flush-rx
423
424     Don't flush the RX streams before starting forwarding. Used mainly with PCAP drivers.
425
426 *   --txpkts=X[,Y]
427
428     Set TX segment sizes.
429
430 *   --disable-link-check
431
432     Disable check on link status when starting/stopping ports.