* ``priority`` (0-7): VLAN User Priority.
+set pfc_queue_ctrl
+~~~~~~~~~~~~~~~~~~
+
+Set the priority flow control parameter on a given Rx and Tx queue of a port::
+
+ testpmd> set pfc_queue_ctrl <port_id> rx (on|off) <tx_qid> <tx_tc> \
+ tx (on|off) <rx_qid> <rx_tc> <pause_time>
+
+Where:
+
+* ``tx_qid`` (integer): Tx qid for which ``tx_tc`` will be applied and traffic
+ will be paused when PFC frame is received with ``tx_tc`` enabled.
+
+* ``tx_tc`` (0-15): TC for which traffic is to be paused for xmit.
+
+* ``rx_qid`` (integer): Rx qid for which threshold will be applied and PFC
+ frame will be generated with ``tx_tc`` when exceeds the threshold.
+
+* ``rx_tc`` (0-15): TC filled in PFC frame for which remote Tx is to be paused.
+
+* ``pause_time`` (integer): Pause quanta filled in the PFC frame for which
+ interval, remote Tx will be paused. Valid only if Tx pause is on.
+
set stat_qmap
~~~~~~~~~~~~~
Set the RSS (Receive Side Scaling) mode on or off::
- testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|mpls|none)
+ testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|mpls|l2tpv2|none)
RSS is on by default.
-The ``all`` option is equivalent to eth|vlan|ip|tcp|udp|sctp|ether|l2tpv3|esp|ah|pfcp.
+The ``all`` option is equivalent to eth|vlan|ip|tcp|udp|sctp|ether|l2tpv3|esp|ah|pfcp|l2tpv2.
The ``default`` option enables all supported RSS types reported by device info.
Indicate tunnel offload rule type
- ``tunnel_set {tunnel_id}``: mark rule as tunnel offload decap_set type.
-- ``tunnel_match {tunnel_id}``: mark rule as tunel offload match type.
+- ``tunnel_match {tunnel_id}``: mark rule as tunnel offload match type.
Matching pattern
^^^^^^^^^^^^^^^^
- ``offset {integer}``: absolute or relative offset for pattern.
- ``limit {unsigned}``: search area limit for start of pattern.
- ``pattern {string}``: byte string to look for.
+ - ``pattern_hex {string}``: byte string (provided in hexadecimal) to look for.
- ``eth``: match Ethernet header.
- ``value {unsigned}``: key value.
+- ``gre_option``: match GRE optional fields(checksum/key/sequence).
+
+ - ``checksum {unsigned}``: checksum value.
+ - ``key {unsigned}``: key value.
+ - ``sequence {unsigned}``: sequence number value.
+
- ``fuzzy``: fuzzy pattern match, expect faster than default.
- ``thresh {unsigned}``: accuracy threshold.
- ``session_id {unsigned}``: L2TPv2 session identifier.
- ``ns {unsigned}``: L2TPv2 option ns.
- ``nr {unsigned}``: L2TPv2 option nr.
+ - ``offset_size {unsigned}``: L2TPv2 option offset.
- ``ppp``: match PPP header.
testpmd> create port meter 0 1 13 1 yes 0xffff 0 0
testpmd> flow create 0 priority 0 ingress group 1 pattern eth / end actions meter mtr_id 1 / end
-Sample PPPoL2TPv2oUDP RSS rules
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Sample L2TPv2 RSS rules
+~~~~~~~~~~~~~~~~~~~~~~~
+
+L2TPv2 RSS rules can be created by the following commands::
+
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 type control
+ / end actions rss types l2tpv2 end queues end / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / end
+ actions rss types eth l2-src-only end queues end / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / end
+ actions rss types l2tpv2 end queues end / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / ipv4
+ / end actions rss types ipv4 end queues end / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / ipv6
+ / udp / end actions rss types ipv6-udp end queues end / end
+ testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv4
+ / tcp / end actions rss types ipv4-tcp end queues end / end
+ testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv6
+ / end actions rss types ipv6 end queues end / end
+
+Sample L2TPv2 FDIR rules
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+L2TPv2 FDIR rules can be created by the following commands::
+
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 type control
+ session_id is 0x1111 / end actions queue index 3 / end
+ testpmd> flow create 0 ingress pattern eth src is 00:00:00:00:00:01 / ipv4
+ / udp / l2tpv2 type data / end actions queue index 3 / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 type data
+ session_id is 0x1111 / ppp / end actions queue index 3 / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / ipv4
+ src is 10.0.0.1 / end actions queue index 3 / end
+ testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv6
+ dst is ABAB:910B:6666:3457:8295:3333:1800:2929 / end actions queue index 3 / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / ipv4
+ / udp src is 22 / end actions queue index 3 / end
+ testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / ipv4
+ / tcp dst is 23 / end actions queue index 3 / end
+
+Sample RAW rule
+~~~~~~~~~~~~~~~
-PPPoL2TPv2oUDP RSS rules can be created by the following commands::
+A RAW rule can be created as following using ``pattern_hex`` key and mask.
+
+::
- testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / ipv4
- / end actions rss types ipv4 end queues end / end
- testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 / ppp / ipv6
- / udp / end actions rss types ipv6-udp end queues end / end
- testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv4
- / tcp / end actions rss types ipv4-tcp end queues end / end
- testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv6
- / end actions rss types ipv6 end queues end / end
+ testpmd> flow create 0 group 0 priority 1 ingress pattern raw relative is 0 search is 0 offset
+ is 0 limit is 0 pattern_hex spec 00000000000000000000000000000000000000000000000000000a0a0a0a
+ pattern_hex mask 0000000000000000000000000000000000000000000000000000ffffffff / end actions
+ queue index 4 / end
BPF Functions
--------------