X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Ftestpmd_app_ug%2Ftestpmd_funcs.rst;h=dcee5de455fa48d09ff481f9580721da69946343;hb=770fabcd36ec11d64544e86ed7d2dda9f5c64daf;hp=1da60faffe9bf068e8fcb6a8d5ee2446fa237336;hpb=5e913bdb4f4d05f90ca99467444f11633c78749a;p=dpdk.git diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 1da60faffe..dcee5de455 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -33,7 +33,7 @@ If you type a partial command and hit ```` you get a list of the available .. note:: - Some examples in this document are too long to fit on one line are are shown wrapped at `"\\"` for display purposes:: + Some examples in this document are too long to fit on one line are shown wrapped at `"\\"` for display purposes:: testpmd> set flow_ctrl rx (on|off) tx (on|off) (high_water) (low_water) \ (pause_time) (send_xon) (port_id) @@ -252,6 +252,14 @@ Display information for a given port's RX/TX queue:: testpmd> show (rxq|txq) info (port_id) (queue_id) +show desc status(rxq|txq) +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Display information for a given port's RX/TX descriptor status:: + + testpmd> show port (port_id) (rxq|txq) (queue_id) desc (desc_id) status + + show config ~~~~~~~~~~~ @@ -472,6 +480,28 @@ Show ptypes supported for a specific port:: testpmd> show port (port_id) ptypes +set port supported ptypes +~~~~~~~~~~~~~~~~~~~~~~~~~ + +set packet types classification for a specific port:: + + testpmd> set port (port_id) ptypes_mask (mask) + +show port mac addresses info +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Show mac addresses added for a specific port:: + + testpmd> show port (port_id) macs + + +show port multicast mac addresses info +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Show multicast mac addresses added for a specific port:: + + testpmd> show port (port_id) mcast_macs + show device info ~~~~~~~~~~~~~~~~ @@ -509,6 +539,12 @@ Dumps the layout of all memory zones:: testpmd> dump_memzone +dump socket memory +~~~~~~~~~~~~~~~~~~ + +Dumps the memory usage of all sockets:: + + testpmd> dump_socket_mem dump struct size ~~~~~~~~~~~~~~~~ @@ -545,6 +581,25 @@ Dumps the log level for all the dpdk modules:: testpmd> dump_log_types +show (raw_encap|raw_decap) +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Display content of raw_encap/raw_decap buffers in hex:: + + testpmd> show + testpmd> show all + +For example:: + + testpmd> show raw_encap 6 + + index: 6 at [0x1c565b0], len=50 + 00000000: 00 00 00 00 00 00 16 26 36 46 56 66 08 00 45 00 | .......&6FVf..E. + 00000010: 00 00 00 00 00 00 00 11 00 00 C0 A8 01 06 C0 A8 | ................ + 00000020: 03 06 00 00 00 FA 00 00 00 00 08 00 00 00 00 00 | ................ + 00000030: 06 00 | .. + + Configuration Functions ----------------------- @@ -1653,7 +1708,7 @@ Enable or disable a per port Rx offloading on all Rx queues of a port:: vlan_strip, ipv4_cksum, udp_cksum, tcp_cksum, tcp_lro, qinq_strip, outer_ipv4_cksum, macsec_strip, header_split, vlan_filter, vlan_extend, jumbo_frame, - scatter, timestamp, security, keep_crc + scatter, timestamp, security, keep_crc, rss_hash This command should be run when the port is stopped, or else it will fail. @@ -1684,8 +1739,7 @@ Enable or disable a per port Tx offloading on all Tx queues of a port:: sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum, qinq_insert, vxlan_tnl_tso, gre_tnl_tso, ipip_tnl_tso, geneve_tnl_tso, macsec_insert, - mt_lockfree, multi_segs, mbuf_fast_free, security, - match_metadata + mt_lockfree, multi_segs, mbuf_fast_free, security This command should be run when the port is stopped, or else it will fail. @@ -1834,12 +1888,22 @@ Config Raw Encapsulation Configure the raw data to be used when encapsulating a packet by rte_flow_action_raw_encap:: + set raw_encap {index} {item} [/ {item} [...]] / end_set + +There are multiple global buffers for ``raw_encap``, this command will set one +internal buffer index by ``{index}``. +If there is no ``{index}`` specified:: + set raw_encap {item} [/ {item} [...]] / end_set -This command will set an internal buffer inside testpmd, any following flow rule -using the action raw_encap will use the last configuration set. -To have a different encapsulation header, this command must be called before the -flow rule creation. +the default index ``0`` is used. +In order to use different encapsulating header, ``index`` must be specified +during the flow rule creation:: + + testpmd> flow create 0 egress pattern eth / ipv4 / end actions + raw_encap index 2 / end + +Otherwise the default index ``0`` is used. Config Raw Decapsulation ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1847,10 +1911,22 @@ Config Raw Decapsulation Configure the raw data to be used when decapsulating a packet by rte_flow_action_raw_decap:: + set raw_decap {index} {item} [/ {item} [...]] / end_set + +There are multiple global buffers for ``raw_decap``, this command will set +one internal buffer index by ``{index}``. +If there is no ``{index}`` specified:: + set raw_decap {item} [/ {item} [...]] / end_set -This command will set an internal buffer inside testpmd, any following flow rule -using the action raw_decap will use the last configuration set. +the default index ``0`` is used. +In order to use different decapsulating header, ``index`` must be specified +during the flow rule creation:: + + testpmd> flow create 0 egress pattern eth / ipv4 / end actions + raw_encap index 3 / end + +Otherwise the default index ``0`` is used. Port Functions -------------- @@ -2098,6 +2174,15 @@ Set the maximum packet length:: This is equivalent to the ``--max-pkt-len`` command-line option. +port config - max-lro-pkt-size +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Set the maximum LRO aggregated packet size:: + + testpmd> port config all max-lro-pkt-size (value) + +This is equivalent to the ``--max-lro-pkt-size`` command-line option. + port config - Drop Packets ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -2238,6 +2323,16 @@ testpmd will add this value to any Tx packet sent from this port:: testpmd> port config (port_id) tx_metadata (value) +port config dynf +~~~~~~~~~~~~~~~~ + +Set/clear dynamic flag per port. +testpmd will register this flag in the mbuf (same registration +for both Tx and Rx). Then set/clear this flag for each Tx +packet sent from this port. The set bit only works for Tx packet:: + + testpmd> port config (port_id) dynf (name) (set|clear) + port config mtu ~~~~~~~~~~~~~~~ @@ -2695,7 +2790,7 @@ Traffic Management ------------------ The following section shows functions for configuring traffic management on -on the ethernet device through the use of generic TM API. +the ethernet device through the use of generic TM API. show port traffic management capability ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -3515,6 +3610,10 @@ following sections. flow isolate {port_id} {boolean} +- Dump internal representation information of all flows in hardware:: + + flow dump {port_id} {output_file} + Validating flow rules ~~~~~~~~~~~~~~~~~~~~~ @@ -3890,6 +3989,19 @@ This section lists supported pattern items and their attributes, if any. - ``proto_id {unsigned}``: PPP protocol identifier. +- ``l2tpv3oip``: match L2TPv3 over IP header. + + - ``session_id {unsigned}``: L2TPv3 over IP session identifier. + +- ``ah``: match AH header. + + - ``spi {unsigned}``: security parameters index. + +- ``pfcp``: match PFCP header. + + - ``s_field {unsigned}``: S field. + - ``seid {unsigned}``: session endpoint identifier. + Actions list ^^^^^^^^^^^^ @@ -4149,6 +4261,14 @@ This section lists supported actions and their attributes, if any. - ``value {unsigned}``: Value to decrease TCP acknowledgment number by. +- ``set_ipv4_dscp``: Set IPv4 DSCP value with specified value + + - ``dscp_value {unsigned}``: The new DSCP value to be set + +- ``set_ipv6_dscp``: Set IPv6 DSCP value with specified value + + - ``dscp_value {unsigned}``: The new DSCP value to be set + Destroying flow rules ~~~~~~~~~~~~~~~~~~~~~ @@ -4365,6 +4485,22 @@ Disabling isolated mode:: Ingress traffic on port 0 is not restricted anymore to the defined flow rules testpmd> +Dumping HW internal information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``flow dump`` dumps the hardware's internal representation information of +all flows. It is bound to ``rte_flow_dev_dump()``:: + + flow dump {port_id} {output_file} + +If successful, it will show:: + + Flow dump finished + +Otherwise, it will complain error occurred:: + + Caught error type [...] ([...]): [...] + Sample QinQ flow rules ~~~~~~~~~~~~~~~~~~~~~~ @@ -4670,11 +4806,11 @@ Raw encapsulation configuration can be set by the following commands Eecapsulating VxLAN:: - testpmd> set raw_encap eth src is 10:11:22:33:44:55 / vlan tci is 1 + testpmd> set raw_encap 4 eth src is 10:11:22:33:44:55 / vlan tci is 1 inner_type is 0x0800 / ipv4 / udp dst is 4789 / vxlan vni is 2 / end_set testpmd> flow create 0 egress pattern eth / ipv4 / end actions - raw_encap / end + raw_encap index 4 / end Sample Raw decapsulation rule ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -4687,6 +4823,49 @@ Decapsulating VxLAN:: testpmd> flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 / end actions raw_decap / queue index 0 / end +Sample ESP rules +~~~~~~~~~~~~~~~~ + +ESP rules can be created by the following commands:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / esp spi is 1 / end actions + queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / esp spi is 1 / end + actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv6 / esp spi is 1 / end actions + queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv6 / udp / esp spi is 1 / end + actions queue index 3 / end + +Sample AH rules +~~~~~~~~~~~~~~~~ + +AH rules can be created by the following commands:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / ah spi is 1 / end actions + queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / ah spi is 1 / end + actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv6 / ah spi is 1 / end actions + queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv6 / udp / ah spi is 1 / end + actions queue index 3 / end + +Sample PFCP rules +~~~~~~~~~~~~~~~~~ + +PFCP rules can be created by the following commands(s_field need to be 1 +if seid is set):: + + testpmd> flow create 0 ingress pattern eth / ipv4 / pfcp s_field is 0 / end + actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv4 / pfcp s_field is 1 + seid is 1 / end actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv6 / pfcp s_field is 0 / end + actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / ipv6 / pfcp s_field is 1 + seid is 1 / end actions queue index 3 / end + BPF Functions --------------