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