efff768b8889749c246706c409bc3d70c86438f5
[dpdk.git] / doc / guides / testpmd_app_ug / testpmd_funcs.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 Testpmd Runtime Functions
32 =========================
33
34 Where the testpmd application is started in interactive mode, (-i|--interactive),
35 it displays a prompt that can be used to start and stop forwarding,
36 configure the application, display statistics, set the Flow Director and other tasks.
37
38 .. code-block:: console
39
40     testpmd>
41
42 The testpmd prompt has some, limited, readline support.
43 Common bash command- line functions such as Ctrl+a and Ctrl+e to go to the start and end of the prompt line are supported
44 as well as access to the command history via the up-arrow.
45
46 There is also support for tab completion.
47 If you type a partial command and hit <TAB> you get a list of the available completions:
48
49 .. code-block:: console
50
51     testpmd> show port <TAB>
52
53         info [Mul-choice STRING]: show|clear port info|stats|fdir|stat_qmap X
54         info [Mul-choice STRING]: show|clear port info|stats|fdir|stat_qmap all
55         stats [Mul-choice STRING]: show|clear port info|stats|fdir|stat_qmap X
56         stats [Mul-choice STRING]: show|clear port info|stats|fdir|stat_qmap all
57         ...
58
59 Help Functions
60 --------------
61
62 The testpmd has on-line help for the functions that are available at runtime.
63 These are divided into sections and can be accessed using help, help section or help all:
64
65 .. code-block:: console
66
67     testpmd> help
68
69         Help is available for the following sections:
70         help control    : Start and stop forwarding.
71         help display    : Displaying port, stats and config information.
72         help config     : Configuration information.
73         help ports      : Configuring ports.
74         help registers  : Reading and setting port registers.
75         help filters    : Filters configuration help.
76         help all        : All of the above sections.
77
78 Control Functions
79 -----------------
80
81 start
82 ~~~~~
83
84 Start packet forwarding with current configuration:
85
86 start
87
88 start tx_first
89 ~~~~~~~~~~~~~~
90
91 Start packet forwarding with current configuration after sending one burst of packets:
92
93 start tx_first
94
95 stop
96 ~~~~
97
98 Stop packet forwarding, and display accumulated statistics:
99
100 stop
101
102 quit
103 ~~~~
104
105 Quit to prompt:
106
107 quit
108
109 Display Functions
110 -----------------
111
112 The functions in the following sections are used to display information about the
113 testpmd configuration or the NIC status.
114
115 show port
116 ~~~~~~~~~
117
118 Display information for a given port or all ports:
119
120 show port (info|stats|fdir|stat_qmap) (port_id|all)
121
122 The available information categories are:
123
124 info    : General port information such as MAC address.
125
126 stats   : RX/TX statistics.
127
128 fdir    : Flow Director information and statistics.
129
130 stat_qmap : Queue statistics mapping.
131
132 For example:
133
134 .. code-block:: console
135
136     testpmd> show port info 0
137
138     ********************* Infos for port 0 *********************
139
140     MAC address: XX:XX:XX:XX:XX:XX
141     Link status: up
142     Link speed: 10000 Mbps
143     Link duplex: full-duplex
144     Promiscuous mode: enabled
145     Allmulticast mode: disabled
146     Maximum number of MAC addresses: 127
147     VLAN offload:
148         strip on
149         filter on
150         qinq(extend) off
151
152 show port rss reta
153 ~~~~~~~~~~~~~~~~~~
154
155 Display the rss redirection table entry indicated by masks on port X:
156
157 show port (port_id) rss reta (size) (mask0, mask1...)
158
159 size is used to indicate the hardware supported reta size
160
161 show port rss-hash
162 ~~~~~~~~~~~~~~~~~~
163
164 Display the RSS hash functions and RSS hash key of a port:
165
166 show port (port_id) rss-hash [key]
167
168 clear port
169 ~~~~~~~~~~
170
171 Clear the port statistics for a given port or for all ports:
172
173 clear port (info|stats|fdir|stat_qmap) (port_id|all)
174
175 For example:
176
177 .. code-block:: console
178
179     testpmd> clear port stats all
180
181 show config
182 ~~~~~~~~~~~
183
184 Displays the configuration of the application.
185 The configuration comes from the command-line, the runtime or the application defaults:
186
187 show config (rxtx|cores|fwd)
188
189 The available information categories are:
190
191 rxtx  : RX/TX configuration items.
192
193 cores : List of forwarding cores.
194
195 fwd   : Packet forwarding configuration.
196
197 For example:
198
199 .. code-block:: console
200
201     testpmd> show config rxtx
202
203     io packet forwarding - CRC stripping disabled - packets/burst=16
204     nb forwarding cores=2 - nb forwarding ports=1
205     RX queues=1 - RX desc=128 - RX free threshold=0
206     RX threshold registers: pthresh=8 hthresh=8 wthresh=4
207     TX queues=1 - TX desc=512 - TX free threshold=0
208     TX threshold registers: pthresh=36 hthresh=0 wthresh=0
209     TX RS bit threshold=0 - TXQ flags=0x0
210
211 read rxd
212 ~~~~~~~~
213
214 Display an RX descriptor for a port RX queue:
215
216 read rxd (port_id) (queue_id) (rxd_id)
217
218 For example:
219
220 .. code-block:: console
221
222     testpmd> read rxd 0 0 4
223         0x0000000B - 0x001D0180 / 0x0000000B - 0x001D0180
224
225 read txd
226 ~~~~~~~~
227
228 Display a TX descriptor for a port TX queue:
229
230 read txd (port_id) (queue_id) (txd_id)
231
232 For example:
233
234 .. code-block:: console
235
236     testpmd> read txd 0 0 4
237         0x00000001 - 0x24C3C440 / 0x000F0000 - 0x2330003C
238
239 Configuration Functions
240 -----------------------
241
242 The testpmd application can be configured from the runtime as well as from the command-line.
243
244 This section details the available configuration functions that are available.
245
246 .. note::
247
248     Configuration changes only become active when forwarding is started/restarted.
249
250 set default
251 ~~~~~~~~~~~
252
253 Reset forwarding to the default configuration:
254
255 set default
256
257 set verbose
258 ~~~~~~~~~~~
259
260 Set the debug verbosity level:
261
262 set verbose (level)
263
264 Currently the only available levels are 0 (silent except for error) and 1 (fully verbose).
265
266 set nbport
267 ~~~~~~~~~~
268
269 Set the number of ports used by the application:
270
271 set nbport (num)
272
273 This is equivalent to the --nb-ports command-line option.
274
275 set nbcore
276 ~~~~~~~~~~
277
278 Set the number of cores used by the application:
279
280 set nbcore (num)
281
282 This is equivalent to the --nb-cores command-line option.
283
284 .. note::
285
286     The number of cores used must not be greater than number of ports used multiplied by the number of queues per port.
287
288 set coremask
289 ~~~~~~~~~~~~
290
291 Set the forwarding cores hexadecimal mask:
292
293 set coremask (mask)
294
295 This is equivalent to the --coremask command-line option.
296
297 .. note::
298
299     The master lcore is reserved for command line parsing only and cannot be masked on for packet forwarding.
300
301 set portmask
302 ~~~~~~~~~~~~
303
304 Set the forwarding ports hexadecimal mask:
305
306 set portmask (mask)
307
308 This is equivalent to the --portmask command-line option.
309
310 set burst
311 ~~~~~~~~~
312
313 Set number of packets per burst:
314
315 set burst (num)
316
317 This is equivalent to the --burst command-line option.
318
319 In mac_retry forwarding mode, the transmit delay time and number of retries can also be set.
320
321 set burst tx delay (micrseconds) retry (num)
322
323 set txpkts
324 ~~~~~~~~~~
325
326 Set the length of each segment of the TX-ONLY packets:
327
328 set txpkts (x[,y]*)
329
330 Where x[,y]* represents a CSV list of values, without white space.
331
332 set corelist
333 ~~~~~~~~~~~~
334
335 Set the list of forwarding cores:
336
337 set corelist (x[,y]*)
338
339 For example, to change the forwarding cores:
340
341 .. code-block:: console
342
343     testpmd> set corelist 3,1
344     testpmd> show config fwd
345
346     io packet forwarding - ports=2 - cores=2 - streams=2 - NUMA support disabled
347     Logical Core 3 (socket 0) forwards packets on 1 streams:
348     RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01
349     Logical Core 1 (socket 0) forwards packets on 1 streams:
350     RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
351
352 .. note::
353
354     The cores are used in the same order as specified on the command line.
355
356 set portlist
357 ~~~~~~~~~~~~
358
359 Set the list of forwarding ports:
360
361 set portlist (x[,y]*)
362
363 For example, to change the port forwarding:
364
365 .. code-block:: console
366
367     testpmd> set portlist 0,2,1,3
368     testpmd> show config fwd
369
370     io packet forwarding - ports=4 - cores=1 - streams=4
371     Logical Core 3 (socket 0) forwards packets on 4 streams:
372     RX P=0/Q=0 (socket 0) -> TX P=2/Q=0 (socket 0) peer=02:00:00:00:00:01
373     RX P=2/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
374     RX P=1/Q=0 (socket 0) -> TX P=3/Q=0 (socket 0) peer=02:00:00:00:00:03
375     RX P=3/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:02
376
377 vlan set strip
378 ~~~~~~~~~~~~~~
379
380 Set the VLAN strip on a port:
381
382 vlan set strip (on|off) (port_id)
383
384 vlan set stripq
385 ~~~~~~~~~~~~~~~
386
387 Set the VLAN strip for a queue on a port:
388
389 vlan set stripq (on|off) (port_id,queue_id)
390
391 vlan set filter
392 ~~~~~~~~~~~~~~~
393
394 Set the VLAN filter on a port:
395
396 vlan set filter (on|off) (port_id)
397
398 vlan set qinq
399 ~~~~~~~~~~~~~
400
401 Set the VLAN QinQ (extended queue in queue) on for a port:
402
403 vlan set qinq (on|off) (port_id)
404
405 vlan set tpid
406 ~~~~~~~~~~~~~
407
408 Set the outer VLAN TPID for packet filtering on a port:
409
410 vlan set tpid (value) (port_id)
411
412 .. note::
413
414     TPID value must be a 16-bit number (value <= 65536).
415
416 rx_vlan add
417 ~~~~~~~~~~~
418
419 Add a VLAN ID, or all identifiers, to the set of VLAN identifiers filtered by port ID:
420
421 rx_vlan add (vlan_id|all) (port_id)
422
423 .. note::
424
425     VLAN filter must be set on that port. VLAN ID < 4096.
426
427 rx_vlan rm
428 ~~~~~~~~~~
429
430 Remove a VLAN ID, or all identifiers, from the set of VLAN identifiers filtered by port ID:
431
432 rx_vlan rm (vlan_id|all) (port_id)
433
434 rx_vlan add(for VF)
435 ~~~~~~~~~~~~~~~~~~~
436
437 Add a VLAN ID, to the set of VLAN identifiers filtered for VF(s) for port ID:
438
439 rx_vlan add (vlan_id) port (port_id) vf (vf_mask)
440
441 rx_vlan rm(for VF)
442 ~~~~~~~~~~~~~~~~~~
443
444 Remove a VLAN ID, from the set of VLAN identifiers filtered for VF(s) for port ID:
445
446 rx_vlan rm (vlan_id) port (port_id) vf (vf_mask)
447
448 rx_vlan set tpid
449 ~~~~~~~~~~~~~~~~
450
451 Set the outer VLAN TPID for packet filtering on a port:
452
453 rx_vlan set tpid (value) (port_id)
454
455 tunnel_filter add
456 ~~~~~~~~~~~~~~~~~
457
458 Add a tunnel filter on a port:
459
460 tunnel_filter add (port_id) (outer_mac) (inner_mac) (ip_addr) (inner_vlan)
461  (tunnel_type) (filter_type) (tenant_id) (queue_id)
462
463 tunnel_filter remove
464 ~~~~~~~~~~~~~~~~~~~~
465
466 Remove a tunnel filter on a port:
467
468 tunnel_filter rm (port_id) (outer_mac) (inner_mac) (ip_addr) (inner_vlan)
469  (tunnel_type) (filter_type) (tenant_id) (queue_id)
470
471 rx_vxlan_port add
472 ~~~~~~~~~~~~~~~~~
473
474 Add an UDP port for VXLAN packet filter on a port:
475
476 rx_vxlan_port add (udp_port) (port_id)
477
478 rx_vxlan_port remove
479 ~~~~~~~~~~~~~~~~~~~~
480
481 Remove an UDP port for VXLAN packet filter on a port:
482
483 rx_vxlan_port rm (udp_port) (port_id)
484
485 tx_vlan set
486 ~~~~~~~~~~~
487
488 Set hardware insertion of VLAN ID in packets sent on a port:
489
490 tx_vlan set (vlan_id) (port_id)
491
492 tx_vlan set pvid
493 ~~~~~~~~~~~~~~~~
494
495 Set port based hardware insertion of VLAN ID in pacekts sent on a port:
496
497 tx_vlan set pvid (port_id) (vlan_id) (on|off)
498
499 tx_vlan reset
500 ~~~~~~~~~~~~~
501
502 Disable hardware insertion of a VLAN header in packets sent on a port:
503
504 tx_vlan reset (port_id)
505
506 tx_checksum set
507 ~~~~~~~~~~~~~~~
508
509 Select hardware or software calculation of the checksum when
510 transmitting a packet using the csum forward engine:
511
512 tx_cksum set (ip|udp|tcp|sctp|vxlan)
513
514 ip|udp|tcp|sctp always concern the inner layer.
515 vxlan concerns the outer IP and UDP layer (in case the packet
516 is recognized as a vxlan packet by the forward engine)
517
518 .. note::
519
520     Check the NIC Datasheet for hardware limits.
521
522 tx_checksum show
523 ~~~~~~~~~~~~~~~~
524
525 Display tx checksum offload configuration:
526
527 tx_checksum show (port_id)
528
529 tso set
530 ~~~~~~~
531
532 Enable TCP Segmentation Offload in csum forward engine:
533
534 tso set (segsize) (port_id)
535
536 .. note::
537    Please check the NIC datasheet for HW limits
538
539 tso show
540 ~~~~~~~~
541
542 Display the status of TCP Segmentation Offload:
543
544 tso show (port_id)
545
546 set fwd
547 ~~~~~~~
548
549 Set the packet forwarding mode:
550
551 set fwd (io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho)
552
553 The available information categories are:
554
555 *   io: forwards packets "as-is" in I/O mode.
556     This is the fastest possible forwarding operation as it does not access packets data.
557     This is the default mode.
558
559 *   mac: changes the source and the destination Ethernet addresses of packets before forwarding them.
560
561 *   mac_retry: same as "mac" forwarding mode, but includes retries if the destination queue is full.
562
563 *   macswap: MAC swap forwarding mode.
564     Swaps the source and the destination Ethernet addresses of packets before forwarding them.
565
566 *   flowgen: multi-flow generation mode.
567     Originates a bunch of flows (varying destination IP addresses), and terminate receive traffic.
568
569 *   rxonly: receives packets but doesn't transmit them.
570
571 *   txonly: generates and transmits packets without receiving any.
572
573 *   csum: changes the checksum field with HW or SW methods depending on the offload flags on the packet.
574
575 *   icmpecho: receives a burst of packets, lookup for IMCP echo requests and, if any, send back ICMP echo replies.
576
577
578 Example:
579
580 .. code-block:: console
581
582     testpmd> set fwd rxonly
583
584     Set rxonly packet forwarding mode
585
586 mac_addr add
587 ~~~~~~~~~~~~
588
589 Add an alternative MAC address to a port:
590
591 mac_addr add (port_id) (XX:XX:XX:XX:XX:XX)
592
593 mac_addr remove
594 ~~~~~~~~~~~~~~~
595
596 Remove a MAC address from a port:
597
598 mac_addr remove (port_id) (XX:XX:XX:XX:XX:XX)
599
600 mac_addr add(for VF)
601 ~~~~~~~~~~~~~~~~~~~~
602
603 Add an alternative MAC address for a VF to a port:
604
605 mac_add add port (port_id) vf (vf_id) (XX:XX:XX:XX:XX:XX)
606
607 set port-uta
608 ~~~~~~~~~~~~
609
610 Set the unicast hash filter(s) on/off for a port X:
611
612 set port (port_id) uta (XX:XX:XX:XX:XX:XX|all) (on|off)
613
614 set promisc
615 ~~~~~~~~~~~
616
617 Set the promiscuous mode on for a port or for all ports.
618 In promiscuous mode packets are not dropped if they aren't for the specified MAC address:
619
620 set promisc (port_id|all) (on|off)
621
622 set allmulti
623 ~~~~~~~~~~~~
624
625 Set the allmulti mode for a port or for all ports:
626
627 set allmulti (port_id|all) (on|off)
628
629 Same as the ifconfig (8) option. Controls how multicast packets are handled.
630
631 set flow_ctrl rx
632 ~~~~~~~~~~~~~~~~
633
634 Set the link flow control parameter on a port:
635
636 set flow_ctrl rx (on|off) tx (on|off) (high_water) (low_water) \
637 (pause_time) (send_xon) (port_id)
638
639 Where:
640
641 high_water (integer): High threshold value to trigger XOFF.
642
643 low_water (integer) : Low threshold value to trigger XON.
644
645 pause_time (integer): Pause quota in the Pause frame.
646
647 send_xon (0/1) : Send XON frame.
648
649 mac_ctrl_frame_fwd : Enable receiving MAC control frames
650
651 set pfc_ctrl rx
652 ~~~~~~~~~~~~~~~
653
654 Set the priority flow control parameter on a port:
655
656 set pfc_ctrl rx (on|off) tx (on|off) (high_water) (low_water) \ (pause_time) (priority) (port_id)
657
658 Where:
659
660 priority (0-7): VLAN User Priority.
661
662 set stat_qmap
663 ~~~~~~~~~~~~~
664
665 Set statistics mapping (qmapping 0..15) for RX/TX queue on port:
666
667 set stat_qmap (tx|rx) (port_id) (queue_id) (qmapping)
668
669 For example, to set rx queue 2 on port 0 to mapping 5:
670
671 .. code-block:: console
672
673      testpmd>set stat_qmap rx 0 2 5
674
675 set port - rx/tx(for VF)
676 ~~~~~~~~~~~~~~~~~~~~~~~~
677
678 Set VF receive/transmit from a port:
679
680 set port (port_id) vf (vf_id) (rx|tx) (on|off)
681
682 set port - mac address filter (for VF)
683 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
684
685 Add/Remove unicast or multicast MAC addr filter for a VF:
686
687 set port (port_id) vf (vf_id) (mac_addr)
688  (exact-mac|exact-mac-vlan|hashmac|hashmac-vlan) (on|off)
689
690 set port - rx mode(for VF)
691 ~~~~~~~~~~~~~~~~~~~~~~~~~~
692
693 Set the VF receive mode of a port:
694
695 set port (port_id) vf (vf_id) rxmode (AUPE|ROPE|BAM|MPE) (on|off)
696
697 The available receive modes are:
698
699 *  AUPE: accepts untagged VLAN.
700
701 *  ROPE: accepts unicast hash.
702
703 *  BAM: accepts broadcast packets
704
705 *  MPE: accepts all multicast packets
706
707 set port - tx_rate (for Queue)
708 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
709
710 Set TX rate limitation for queue of a port ID:
711
712 set port (port_id) queue (queue_id) rate (rate_value)
713
714 set port - tx_rate (for VF)
715 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
716
717 Set TX rate limitation for queues in VF of a port ID:
718
719 set port (port_id) vf (vf_id) rate (rate_value) queue_mask (queue_mask)
720
721 set port - mirror rule
722 ~~~~~~~~~~~~~~~~~~~~~~
723
724 Set port or vlan type mirror rule for a port.
725
726 set port (port_id) mirror-rule (rule_id) (pool-mirror|vlan-mirror) (poolmask|vlanid[,vlanid]*) dst-pool (pool_id) (on|off)
727
728 For example to enable mirror traffic with vlan 0,1 to pool 0:
729
730 .. code-block:: console
731
732     set port 0 mirror-rule 0 vlan-mirror 0,1 dst-pool 0 on
733
734 reset port - mirror rule
735 ~~~~~~~~~~~~~~~~~~~~~~~~
736
737 Reset a mirror rule for a port.
738
739 reset port (port_id) mirror-rule (rule_id)
740
741 set flush_rx
742 ~~~~~~~~~~~~
743
744 Flush (default) or don't flush RX streams before forwarding.
745 Mainly used with PCAP drivers to avoid the default behavior of flushing the first 512 packets on RX streams.
746
747 set flush_rx off
748
749 set bypass mode
750 ~~~~~~~~~~~~~~~
751
752 Set the bypass mode for the lowest port on bypass enabled NIC.
753
754 set bypass mode (normal|bypass|isolate) (port_id)
755
756 set bypass event
757 ~~~~~~~~~~~~~~~~
758
759 Set the event required to initiate specified bypass mode for the lowest port on a bypass enabled NIC where:
760
761 *   timeout: enable bypass after watchdog timeout.
762
763 *   os_on: enable bypass when OS/board is powered on.
764
765 *   os_off: enable bypass when OS/board is powered off.
766
767 *   power_on: enable bypass when power supply is turned on.
768
769 *   power_off: enable bypass when power supply is turned off.
770
771 set bypass event (timeout|os_on|os_off|power_on|power_off) mode (normal|bypass|isolate) (port_id)
772
773 set bypass timeout
774 ~~~~~~~~~~~~~~~~~~
775
776 Set the bypass watchdog timeout to 'n' seconds where 0 = instant.
777
778 set bypass timeout (0|1.5|2|3|4|8|16|32)
779
780 show bypass config
781 ~~~~~~~~~~~~~~~~~~
782
783 Show the bypass configuration for a bypass enabled NIC using the lowest port on the NIC.
784
785 show bypass config (port_id)
786
787 set link up
788 ~~~~~~~~~~~
789
790 Set link up for a port.
791
792 set link-up port (port id)
793
794 set link down
795 ~~~~~~~~~~~~~
796
797 Set link down for a port.
798
799 set link-down port (port id)
800
801 Port Functions
802 --------------
803
804 The following sections show functions for configuring ports.
805
806 .. note::
807
808     Port configuration changes only become active when forwarding is started/restarted.
809
810 port start
811 ~~~~~~~~~~
812
813 Start all ports or a specific port:
814
815 port start (port_id|all)
816
817 port stop
818 ~~~~~~~~~
819
820 Stop all ports or a specific port:
821
822 port stop (port_id|all)
823
824 port close
825 ~~~~~~~~~~
826
827 Close all ports or a specific port:
828
829 port close (port_id|all)
830
831 port start/stop queue
832 ~~~~~~~~~~~~~~~~~~~~~
833
834 Start/stop a rx/tx queue on a specific port:
835
836 port (port_id) (rxq|txq) (queue_id) (start|stop)
837
838 Only take effect when port is started.
839
840 port config - speed
841 ~~~~~~~~~~~~~~~~~~~
842
843 Set the speed and duplex mode for all ports or a specific port:
844
845 port config (port_id|all) speed (10|100|1000|10000|auto) duplex (half|full|auto)
846
847 port config - queues/descriptors
848 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
849
850 Set number of queues/descriptors for rxq, txq, rxd and txd:
851
852 port config all (rxq|txq|rxd|txd) (value)
853
854 This is equivalent to the --rxq, --txq, --rxd and --txd command-line options.
855
856 port config - max-pkt-len
857 ~~~~~~~~~~~~~~~~~~~~~~~~~
858
859 Set the maximum packet length:
860
861 port config all max-pkt-len (value)
862
863 This is equivalent to the --max-pkt-len command-line option.
864
865 port config - CRC Strip
866 ~~~~~~~~~~~~~~~~~~~~~~~
867
868 Set hardware CRC stripping on or off for all ports:
869
870 port config all crc-strip (on|off)
871
872 CRC stripping is off by default.
873
874 The on option is equivalent to the --crc-strip command-line option.
875
876 port config - RX Checksum
877 ~~~~~~~~~~~~~~~~~~~~~~~~~
878
879 Set hardware RX checksum offload to on or off for all ports:
880
881 port config all rx-cksum (on|off)
882
883 Checksum offload is off by default.
884
885 The on option is equivalent to the --enable-rx-cksum command-line option.
886
887 port config - VLAN
888 ~~~~~~~~~~~~~~~~~~
889
890 Set hardware VLAN on or off for all ports:
891
892 port config all hw-vlan (on|off)
893
894 Hardware VLAN is on by default.
895
896 The off option is equivalent to the --disable-hw-vlan command-line option.
897
898 port config - Drop Packets
899 ~~~~~~~~~~~~~~~~~~~~~~~~~~
900
901 Set packet drop for packets with no descriptors on or off for all ports:
902
903 port config all drop-en (on|off)
904
905 Packet dropping for packets with no descriptors is off by default.
906
907 The on option is equivalent to the --enable-drop-en command-line option.
908
909 port config - RSS
910 ~~~~~~~~~~~~~~~~~
911
912 Set the RSS (Receive Side Scaling) mode on or off:
913
914 port config all rss (ip|udp|none)
915
916 RSS is on by default.
917
918 The off option is equivalent to the --disable-rss command-line option.
919
920 port config - RSS Reta
921 ~~~~~~~~~~~~~~~~~~~~~~
922
923 Set the RSS (Receive Side Scaling) redirection table:
924
925 port config all rss reta (hash,queue)[,(hash,queue)]
926
927 port config - DCB
928 ~~~~~~~~~~~~~~~~~
929
930 Set the DCB mode for an individual port:
931
932 port config (port_id) dcb vt (on|off) (traffic_class) pfc (on|off)
933
934 The traffic class should be 4 or 8.
935
936 port config - Burst
937 ~~~~~~~~~~~~~~~~~~~
938
939 Set the number of packets per burst:
940
941 port config all burst (value)
942
943 This is equivalent to the --burst command-line option.
944
945 port config - Threshold
946 ~~~~~~~~~~~~~~~~~~~~~~~
947
948 Set thresholds for TX/RX queues:
949
950 port config all (threshold) (value)
951
952 Where the threshold type can be:
953
954 *   txpt: Set the prefetch threshold register of the TX rings, 0 <= value <= 255.
955
956 *   txht: Set the host threshold register of the TX rings, 0 <= value <= 255.
957
958 *   txwt: Set the write-back threshold register of the TX rings, 0 <= value <= 255.
959
960 *   rxpt: Set the prefetch threshold register of the RX rings, 0 <= value <= 255.
961
962 *   rxht: Set the host threshold register of the RX rings, 0 <= value <= 255.
963
964 *   rxwt: Set the write-back threshold register of the RX rings, 0 <= value <= 255.
965
966 *   txfreet: Set the transmit free threshold of the TX rings, 0 <= value <= txd.
967
968 *   rxfreet: Set the transmit free threshold of the RX rings, 0 <= value <= rxd.
969
970 *   txrst: Set the transmit RS bit threshold of TX rings, 0 <= value <= txd.
971     These threshold options are also available from the command-line.
972
973 Link Bonding Functions
974 ----------------------
975
976 The Link Bonding functions make it possible to dynamically create and
977 manage link bonding devices from within testpmd interactive prompt.
978
979 create bonded device
980 ~~~~~~~~~~~~~~~~~~~~
981
982 Create a new bonding device:
983
984 create bonded device (mode) (socket)
985
986 For example, to create a bonded device in mode 1 on socket 0.
987
988 .. code-block:: console
989
990     testpmd> create bonded 1 0
991     created new bonded device (port X)
992
993 add bonding slave
994 ~~~~~~~~~~~~~~~~~
995
996 Adds Ethernet device to a Link Bonding device:
997
998 add bonding slave (slave id) (port id)
999
1000 For example, to add Ethernet device (port 6) to a Link Bonding device (port 10).
1001
1002 .. code-block:: console
1003
1004     testpmd> add bonding slave 6 10
1005
1006
1007 remove bonding slave
1008 ~~~~~~~~~~~~~~~~~~~~
1009
1010 Removes an Ethernet slave device from a Link Bonding device:
1011
1012 remove bonding slave (slave id) (port id)
1013
1014 For example, to remove Ethernet slave device (port 6) to a Link Bonding device (port 10).
1015
1016 .. code-block:: console
1017
1018     testpmd> remove bonding slave 6 10
1019
1020 set bonding mode
1021 ~~~~~~~~~~~~~~~~
1022
1023 Set the Link Bonding mode of a Link Bonding device:
1024
1025 set bonding mode (value) (port id)
1026
1027 For example, to set the bonding mode of a Link Bonding device (port 10) to broadcast (mode 3).
1028
1029 .. code-block:: console
1030
1031     testpmd> set bonding mode 3 10
1032
1033 set bonding primary
1034 ~~~~~~~~~~~~~~~~~~~
1035
1036 Set an Ethernet slave device as the primary device on a Link Bonding device:
1037
1038 set bonding primary (slave id) (port id)
1039
1040 For example, to set the Ethernet slave device (port 6) as the primary port of a Link Bonding device (port 10).
1041
1042 .. code-block:: console
1043
1044     testpmd> set bonding primary 6 10
1045
1046 set bonding mac
1047 ~~~~~~~~~~~~~~~
1048
1049 Set the MAC address of a Link Bonding device:
1050
1051 set bonding mac (port id) (mac)
1052
1053 For example, to set the MAC address of a Link Bonding device (port 10) to 00:00:00:00:00:01
1054
1055 .. code-block:: console
1056
1057     testpmd> set bonding mac 10 00:00:00:00:00:01
1058
1059 set bonding xmit_balance_policy
1060 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1061
1062 Set the transmission policy for a Link Bonding device when it is in Balance XOR mode:
1063
1064 set bonding xmit_balance_policy (port_id) (l2|l23|l34)
1065
1066 For example, set a Link Bonding device (port 10) to use a balance policy of layer 3+4 (IP addresses & UDP ports )
1067
1068 .. code-block:: console
1069
1070     testpmd> set bonding xmit_balance_policy 10 l34
1071
1072
1073 set bonding mon_period
1074 ~~~~~~~~~~~~~~~~~~~~~~
1075
1076 Set the link status monitoring polling period in milliseconds for a bonding devicie.
1077
1078 This adds support for PMD slave devices which do not support link status interrupts.
1079 When the mon_period is set to a value greater than 0 then all PMD's which do not support
1080 link status ISR will be queried every polling interval to check if their link status has changed.
1081
1082 set bonding mon_period (port_id) (value)
1083
1084 For example, to set the link status monitoring polling period of bonded device (port 5) to 150ms
1085
1086 .. code-block:: console
1087
1088     testpmd> set bonding mon_period 5 150
1089
1090
1091 show bonding config
1092 ~~~~~~~~~~~~~~~~~~~
1093
1094 Show the current configuration of a Link Bonding device:
1095
1096 show bonding config (port id)
1097
1098 For example,
1099 to show the configuration a Link Bonding device (port 9) with 3 slave devices (1, 3, 4)
1100 in balance mode with a transmission policy of layer 2+3.
1101
1102 .. code-block:: console
1103
1104     testpmd> show bonding config 9
1105         Bonding mode: 2
1106         Balance Xmit Policy: BALANCE_XMIT_POLICY_LAYER23
1107         Slaves (3): [1 3 4]
1108         Active Slaves (3): [1 3 4]
1109         Primary: [3]
1110
1111 Register Functions
1112 ------------------
1113
1114 The Register functions can be used to read from and write to registers on the network card referenced by a port number.
1115 This is mainly useful for debugging purposes.
1116 Reference should be made to the appropriate datasheet for the network card for details on the register addresses
1117 and fields that can be accessed.
1118
1119 read reg
1120 ~~~~~~~~
1121
1122 Display the value of a port register:
1123
1124 read reg (port_id) (address)
1125
1126 For example, to examine the Flow Director control register (FDIRCTL, 0x0000EE000) on an Intel® 82599 10 GbE Controller:
1127
1128 .. code-block:: console
1129
1130     testpmd> read reg 0 0xEE00
1131     port 0 PCI register at offset 0xEE00: 0x4A060029 (1241907241)
1132
1133 read regfield
1134 ~~~~~~~~~~~~~
1135
1136 Display a port register bit field:
1137
1138 read regfield (port_id) (address) (bit_x) (bit_y)
1139
1140 For example, reading the lowest two bits from the register in the example above:
1141
1142 .. code-block:: console
1143
1144     testpmd> read regfield 0 0xEE00 0 1
1145     port 0 PCI register at offset 0xEE00: bits[0, 1]=0x1 (1)
1146
1147 read regbit
1148 ~~~~~~~~~~~
1149
1150 Display a single port register bit:
1151
1152 read regbit (port_id) (address) (bit_x)
1153
1154 For example, reading the lowest bit from the register in the example above:
1155
1156 .. code-block:: console
1157
1158     testpmd> read regbit 0 0xEE00 0
1159     port 0 PCI register at offset 0xEE00: bit 0=1
1160
1161 write reg
1162 ~~~~~~~~~
1163
1164 Set the value of a port register:
1165
1166 write reg (port_id) (address) (value)
1167
1168 For example, to clear a register:
1169
1170 .. code-block:: console
1171
1172     testpmd> write reg 0 0xEE00 0x0
1173     port 0 PCI register at offset 0xEE00: 0x00000000 (0)
1174
1175 write regfield
1176 ~~~~~~~~~~~~~~
1177
1178 Set bit field of a port register:
1179
1180 write regfield (port_id) (address) (bit_x) (bit_y) (value)
1181
1182 For example, writing to the register cleared in the example above:
1183
1184 .. code-block:: console
1185
1186     testpmd> write regfield 0 0xEE00 0 1 2
1187     port 0 PCI register at offset 0xEE00: 0x00000002 (2)
1188
1189 write regbit
1190 ~~~~~~~~~~~~
1191
1192 Set single bit value of a port register:
1193
1194 write regbit (port_id) (address) (bit_x) (value)
1195
1196 For example, to set the high bit in the register from the example above:
1197
1198 .. code-block:: console
1199
1200     testpmd> write regbit 0 0xEE00 31 1
1201     port 0 PCI register at offset 0xEE00: 0x8000000A (2147483658)
1202
1203 Filter Functions
1204 ----------------
1205
1206 This section details the available filter functions that are available.
1207
1208 ethertype_filter
1209 ~~~~~~~~~~~~~~~~~~~~
1210
1211 Add or delete a L2 Ethertype filter, which identify packets by their L2 Ethertype mainly assign them to a receive queue.
1212
1213 ethertype_filter (port_id) (add|del) (mac_addr|mac_ignr) (mac_address) ethertype (ether_type) (drop|fwd) queue (queue_id)
1214
1215 The available information parameters are:
1216
1217 *   port_id:  the port which the Ethertype filter assigned on.
1218
1219 *   mac_addr: compare destination mac address.
1220
1221 *   mac_ignr: ignore destination mac address match.
1222
1223 *   mac_address: destination mac address to match.
1224
1225 *   ether_type: the EtherType value want to match,
1226     for example 0x0806 for ARP packet. 0x0800 (IPv4) and 0x86DD (IPv6) are invalid.
1227
1228 *   queue_id : The receive queue associated with this EtherType filter. It is meaningless when deleting or dropping.
1229
1230 Example, to add/remove an ethertype filter rule:
1231
1232 .. code-block:: console
1233
1234     testpmd> ethertype_filter 0 add mac_ignr ethertype 0x0806 fwd queue 3
1235     testpmd> ethertype_filter 0 del mac_ignr ethertype 0x0806 fwd queue 3
1236
1237 add_2tuple_filter
1238 ~~~~~~~~~~~~~~~~~
1239
1240 Add a 2-tuple filter,
1241 which identify packets by specific protocol and destination TCP/UDP port
1242 and forwards packets into one of the receive queues.
1243
1244 add_2tuple_filter (port_id) protocol (pro_value) (pro_mask) dst_port (port_value) (port_mask)
1245 flags (flg_value) priority (prio_value) queue (queue_id) index (idx)
1246
1247 The available information parameters are:
1248
1249 *   port_id: the port which the 2-tuple filter assigned on.
1250
1251 *   pro_value: IP L4 protocol
1252
1253 *   pro_mask: protocol participates in the match or not, 1 means participate
1254
1255 *   port_value: destination port in L4.
1256
1257 *   port_mask: destination port participates in the match or not, 1 means participate.
1258
1259 *   flg_value: TCP control bits. The non-zero value is invalid, when the pro_value is not set to 0x06 (TCP).
1260
1261 *   prio_value: the priority of this filter.
1262
1263 *   queue_id: The receive queue associated with this 2-tuple filter
1264
1265 *   index: the index of this 2-tuple filter
1266
1267 Example:
1268
1269 .. code-block:: console
1270
1271     testpmd> add_2tuple_filter 0 protocol 0x06 1 dst_port 32 1 flags 0x02 priority 3 queue 3 index 0
1272
1273 remove_2tuple_filter
1274 ~~~~~~~~~~~~~~~~~~~~
1275
1276 Remove a 2-tuple filter
1277
1278 remove_2tuple_filter (port_id) index (idx)
1279
1280 get_2tuple_filter
1281 ~~~~~~~~~~~~~~~~~
1282
1283 Get and display a 2-tuple filter
1284
1285 get_2tuple_filter (port_id) index (idx)
1286
1287 Example:
1288
1289 .. code-block:: console
1290
1291     testpmd> get_2tuple_filter 0 index 0
1292
1293     filter[0]:
1294         Destination Port: 0x0020 mask: 1
1295         protocol: 0x06 mask:1 tcp_flags: 0x02
1296         priority: 3   queue: 3
1297
1298 add_5tuple_filter
1299 ~~~~~~~~~~~~~~~~~
1300
1301 Add a 5-tuple filter,
1302 which consists of a 5-tuple (protocol, source and destination IP addresses, source and destination TCP/UDP/SCTP port)
1303 and routes packets into one of the receive queues.
1304
1305 add_5tuple_filter (port_id) dst_ip (dst_address) src_ip (src_address) dst_port (dst_port_value) src_port (src_port_value)
1306 protocol (protocol_value) mask (mask_value) flags (flags_value) priority (prio_value) queue (queue_id) index (idx)
1307
1308 The available information parameters are:
1309
1310 *   port_id: the port which the 5-tuple filter assigned on.
1311
1312 *   dst_address: destination IP address.
1313
1314 *   src_address: source IP address.
1315
1316 *   dst_port_value: TCP/UDP destination port.
1317
1318 *   src_port_value: TCP/UDP source port.
1319
1320 *   protocol_value: L4 protocol.
1321
1322 *   mask_value: participates in the match or not by bit for field above, 1b means participate
1323
1324 *   flags_value: TCP control bits. The non-zero value is invalid, when the protocol_value is not set to 0x06 (TCP).
1325
1326 *   prio_value: the priority of this filter.
1327
1328 *   queue_id: The receive queue associated with this 5-tuple filter.
1329
1330 *   index: the index of this 5-tuple filter
1331
1332 Example:
1333
1334 .. code-block:: console
1335
1336     testpmd> add_5tuple_filter 1 dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 64 src_port 32 protocol 0x06 mask 0x1F flags 0x0 priority 3 queue 3 index 0
1337
1338 remove_5tuple_filter
1339 ~~~~~~~~~~~~~~~~~~~~
1340
1341 Remove a 5-tuple filter
1342
1343 remove_5tuple_filter (port_id) index (idx)
1344
1345 get_5tuple_filter
1346 ~~~~~~~~~~~~~~~~~
1347
1348 Get and display a 5-tuple filter
1349
1350 get_5tuple_filter (port_id) index (idx)
1351
1352 Example:
1353
1354 .. code-block:: console
1355
1356     testpmd> get_5tuple_filter 1 index 0
1357
1358     filter[0]:
1359         Destination IP: 0x02020205 mask: 1
1360         Source IP: 0x02020204 mask: 1
1361         Destination Port: 0x0040 mask: 1
1362         Source Port: 0x0020 mask: 1
1363         protocol: 0x06 mask: 1
1364         priority: 3 flags: 0x00 queue: 3
1365
1366 add_syn_filter
1367 ~~~~~~~~~~~~~~
1368
1369 Add SYN filter, which can forward TCP packets whose *SYN* flag is set into a separate queue.
1370
1371 add_syn_filter (port_id) priority (high|low) queue (queue_id)
1372
1373 The available information parameters are:
1374
1375 *   port_id: the port which the SYN filter assigned on.
1376
1377 *   high: this SYN filter has higher priority than other filters.
1378
1379 *   low: this SYN filter has lower priority than other filters.
1380
1381 *   queue_id: The receive queue associated with this SYN filter
1382
1383 Example:
1384
1385 .. code-block:: console
1386
1387     testpmd> add_syn_filter 0 priority high queue 3,
1388
1389 remove_syn_filter
1390 ~~~~~~~~~~~~~~~~~
1391
1392 Remove SYN filter
1393
1394 remove_syn_filter (port_id)
1395
1396 get_syn_filter
1397 ~~~~~~~~~~~~~~
1398
1399 Get and display SYN filter
1400
1401 get_syn_filter (port_id)
1402
1403 Example:
1404
1405 .. code-block:: console
1406
1407     testpmd> get_syn_filter 0
1408
1409     syn filter: on, priority: high, queue: 3
1410
1411 flex_filter
1412 ~~~~~~~~~~~
1413
1414 With flex filter, packets can be recognized by any arbitrary pattern within the first 128 bytes of the packet
1415 and routes packets into one of the receive queues.
1416
1417 flex_filter (port_id) (add|del) len (len_value) bytes (bytes_value)
1418 mask (mask_value) priority (prio_value) queue (queue_id)
1419
1420 The available information parameters are:
1421
1422 *   port_id: the port which the Flex filter is assigned on.
1423
1424 *   len_value: filter length in bytes, no greater than 128.
1425
1426 *   bytes_value: a string in hexadecimal, means the value the flex filter needs to match.
1427
1428 *   mask_value: a string in hexadecimal, bit 1 means corresponding byte participates in the match.
1429
1430 *   prio_value: the priority of this filter.
1431
1432 *   queue_id: the receive queue associated with this Flex filter.
1433
1434 Example:
1435
1436 .. code-block:: console
1437
1438    testpmd> flex_filter 0 add len 16 bytes 0x00000000000000000000000008060000
1439         mask 000C priority 3 queue 3
1440
1441    testpmd> flex_filter 0 del len 16 bytes 0x00000000000000000000000008060000
1442         mask 000C priority 3 queue 3
1443
1444 flow_director_filter
1445 ~~~~~~~~~~~~~~~~~~~~
1446
1447 The Flow Director works in receive mode to identify specific flows or sets of flows and route them to specific queues.
1448
1449 Two types of filtering are supported which are referred to as Perfect Match and Signature filters, the match mode
1450 is set by the --pkt-filter-mode command-line parameter:
1451
1452 *   Perfect match filters.
1453     The hardware checks a match between the masked fields of the received packets and the programmed filters.
1454
1455 *   Signature filters.
1456     The hardware checks a match between a hash-based signature of the masked fields of the received packet.
1457
1458 The Flow Director filters can match the different fields for different type of packet: flow type, specific input set
1459 per flow type and the flexible payload. The Flow Director can also mask out parts of all of these fields so that filters
1460 are only applied to certain fields or parts of the fields.
1461
1462 Different NICs may have different capabilities, command show port fdir (port_id) can be used to acquire the information.
1463
1464 # Commands to add flow director filters of different flow types.
1465
1466 flow_director_filter (port_id) (add|del|update) flow (ip4|ip4-frag|ip6|ip6-frag)
1467 src (src_ip_address) dst (dst_ip_address) vlan (vlan_value) flexbytes (flexbytes_value)
1468 (drop|fwd) queue (queue_id) fd_id (fd_id_value)
1469
1470 flow_director_filter (port_id) (add|del|update) flow (udp4|tcp4|udp6|tcp6)
1471 src (src_ip_address) (src_port) dst (dst_ip_address) (dst_port) vlan (vlan_value)
1472 flexbytes (flexbytes_value) (drop|fwd) queue (queue_id) fd_id (fd_id_value)
1473
1474 flow_director_filter (port_id) (add|del|update) flow (sctp4|sctp6)
1475 src (src_ip_address) (src_port) dst (dst_ip_address) (dst_port) tag (verification_tag)
1476 vlan (vlan_value) flexbytes (flexbytes_value) (drop|fwd) queue (queue_id) fd_id (fd_id_value)
1477
1478 For example, to add an udp flow type filter:
1479
1480 .. code-block:: console
1481
1482     testpmd> flow_director_filter 0 add flow udp4 src 2.2.2.3 32 dst 2.2.2.5 33 vlan 0x1 flexbytes (0x88,0x48) fwd queue 1 fd_id 1
1483
1484 For example, add an ip4 flow type filter:
1485
1486 .. code-block:: console
1487
1488     testpmd> flow_director_filter 0 add flow ip4 src 2.2.2.3 dst 2.2.2.5 vlan 0x1 flexbytes (0x88,0x48) fwd queue 1 fd_id 1
1489
1490 flush_flow_director
1491 ~~~~~~~~~~~~~~~~~~~
1492
1493 flush all flow director filters on a device:
1494
1495 flush_flow_director (port_id)
1496
1497 Example, to flush all flow director filter on port 0:
1498
1499 .. code-block:: console
1500
1501    testpmd> flush_flow_director 0
1502
1503 flow_director_mask
1504 ~~~~~~~~~~~~~~~~~~
1505
1506 set flow director's masks on match input set
1507
1508 flow_director_mask (port_id) vlan (vlan_value) src_mask (ipv4_src) (ipv6_src) (src_port) dst_mask (ipv4_dst) (ipv6_dst) (dst_port)
1509
1510 Example, to set flow director mask on port 0:
1511
1512 .. code-block:: console
1513
1514    testpmd> flow_director_mask 0 vlan 0xefff src_mask 255.255.255.255 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 0xFFFF dst_mask 255.255.255.255 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF 0xFFFF
1515
1516
1517 flow_director_flex_mask
1518 ~~~~~~~~~~~~~~~~~~~~~~~
1519
1520 set masks of flow director's flexible payload based on certain flow type:
1521
1522 flow_director_flex_mask (port_id) flow (raw|ip4|ip4-frag|tcp4|udp4|sctp4|ip6|ip6-frag|tcp6|udp6|sctp6|all) (mask)
1523
1524 Example, to set flow director's udpv4 flex mask on port 0:
1525
1526 .. code-block:: console
1527
1528    testpmd> flow_director_flex_mask 0 flow all (0xff,0xff,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
1529
1530
1531 flow_director_flex_payload
1532 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1533
1534 Configure flexible payload selection.
1535
1536 flow_director_flex_payload (port_id) (raw|l2|l3|l4) (config)
1537
1538 For example, to select the first 16 bytes from the offset 4 (bytes) of packet’s payload as flexible payload.
1539
1540 .. code-block:: console
1541
1542    testpmd> flow_director_flex_payload 0 l4 (4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19)