Displays the configuration of the application.
The configuration comes from the command-line, the runtime or the application defaults::
- testpmd> show config (rxtx|cores|fwd|txpkts|txtimes)
+ testpmd> show config (rxtx|cores|fwd|rxoffs|rxpkts|txpkts|txtimes)
The available information categories are:
* ``fwd``: Packet forwarding configuration.
+* ``rxoffs``: Packet offsets for RX split.
+
+* ``rxpkts``: Packets to RX split configuration.
+
* ``txpkts``: Packets to TX configuration.
* ``txtimes``: Burst time pattern for Tx only mode.
testpmd> set burst tx delay (microseconds) retry (num)
+set rxoffs
+~~~~~~~~~~
+
+Set the offsets of segments relating to the data buffer beginning on receiving
+if split feature is engaged. Affects only the queues configured with split
+offloads (currently BUFFER_SPLIT is supported only).
+
+ testpmd> set rxoffs (x[,y]*)
+
+Where x[,y]* represents a CSV list of values, without white space. If the list
+of offsets is shorter than the list of segments the zero offsets will be used
+for the remaining segments.
+
+set rxpkts
+~~~~~~~~~~
+
+Set the length of segments to scatter packets on receiving if split
+feature is engaged. Affects only the queues configured with split offloads
+(currently BUFFER_SPLIT is supported only). Optionally the multiple memory
+pools can be specified with --mbuf-size command line parameter and the mbufs
+to receive will be allocated sequentially from these extra memory pools (the
+mbuf for the first segment is allocated from the first pool, the second one
+from the second pool, and so on, if segment number is greater then pool's the
+mbuf for remaining segments will be allocated from the last valid pool).
+
+ testpmd> set rxpkts (x[,y]*)
+
+Where x[,y]* represents a CSV list of values, without white space. Zero value
+means to use the corresponding memory pool data buffer size.
+
set txpkts
~~~~~~~~~~
flow aged {port_id} [destroy]
+- Tunnel offload - create a tunnel stub::
+
+ flow tunnel create {port_id} type {tunnel_type}
+
+- Tunnel offload - destroy a tunnel stub::
+
+ flow tunnel destroy {port_id} id {tunnel_id}
+
+- Tunnel offload - list port tunnel stubs::
+
+ flow tunnel list {port_id}
+
+Creating a tunnel stub for offload
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``flow tunnel create`` setup a tunnel stub for tunnel offload flow rules::
+
+ flow tunnel create {port_id} type {tunnel_type}
+
+If successful, it will return a tunnel stub ID usable with other commands::
+
+ port [...]: flow tunnel #[...] type [...]
+
+Tunnel stub ID is relative to a port.
+
+Destroying tunnel offload stub
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``flow tunnel destroy`` destroy port tunnel stub::
+
+ flow tunnel destroy {port_id} id {tunnel_id}
+
+Listing tunnel offload stubs
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``flow tunnel list`` list port tunnel offload stubs::
+
+ flow tunnel list {port_id}
+
Validating flow rules
~~~~~~~~~~~~~~~~~~~~~
flow create {port_id}
[group {group_id}] [priority {level}] [ingress] [egress] [transfer]
+ [tunnel_set {tunnel_id}] [tunnel_match {tunnel_id}]
pattern {item} [/ {item} [...]] / end
actions {action} [/ {action} [...]] / end
Parameters describe in the following order:
- Attributes (*group*, *priority*, *ingress*, *egress*, *transfer* tokens).
+- Tunnel offload specification (tunnel_set, tunnel_match)
- A matching pattern, starting with the *pattern* token and terminated by an
*end* pattern item.
- Actions, starting with the *actions* token and terminated by an *end*
testpmd> flow create 0 ingress pattern [...]
+Tunnel offload
+^^^^^^^^^^^^^^
+
+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.
+
Matching pattern
^^^^^^^^^^^^^^^^
- ``dscp_value {unsigned}``: The new DSCP value to be set
+- ``shared``: Use shared action created via
+ ``flow shared_action {port_id} create``
+
+ - ``shared_action_id {unsigned}``: Shared action ID to use
+
Destroying flow rules
~~~~~~~~~~~~~~~~~~~~~
testpmd> flow aged 0
Port 0 total aged flows: 0
+Creating shared actions
+~~~~~~~~~~~~~~~~~~~~~~~
+``flow shared_action {port_id} create`` creates shared action with optional
+shared action ID. It is bound to ``rte_flow_shared_action_create()``::
+
+ flow shared_action {port_id} create [action_id {shared_action_id}]
+ [ingress] [egress] action {action} / end
+
+If successful, it will show::
+
+ Shared action #[...] created
+
+Otherwise, it will complain either that shared action already exists or that
+some error occurred::
+
+ Shared action #[...] is already assigned, delete it first
+
+::
+
+ Caught error type [...] ([...]): [...]
+
+Create shared rss action with id 100 to queues 1 and 2 on port 0::
+
+ testpmd> flow shared_action 0 create action_id 100 \
+ ingress action rss queues 1 2 end / end
+
+Create shared rss action with id assigned by testpmd to queues 1 and 2 on
+port 0::
+
+ testpmd> flow shared_action 0 create action_id \
+ ingress action rss queues 0 1 end / end
+
+Updating shared actions
+~~~~~~~~~~~~~~~~~~~~~~~
+``flow shared_action {port_id} update`` updates configuration of the shared
+action from its shared action ID (as returned by
+``flow shared_action {port_id} create``). It is bound to
+``rte_flow_shared_action_update()``::
+
+ flow shared_action {port_id} update {shared_action_id}
+ action {action} / end
+
+If successful, it will show::
+
+ Shared action #[...] updated
+
+Otherwise, it will complain either that shared action not found or that some
+error occurred::
+
+ Failed to find shared action #[...] on port [...]
+
+::
+
+ Caught error type [...] ([...]): [...]
+
+Update shared rss action having id 100 on port 0 with rss to queues 0 and 3
+(in create example above rss queues were 1 and 2)::
+
+ testpmd> flow shared_action 0 update 100 action rss queues 0 3 end / end
+
+Destroying shared actions
+~~~~~~~~~~~~~~~~~~~~~~~~~
+``flow shared_action {port_id} update`` destroys one or more shared actions
+from their shared action IDs (as returned by
+``flow shared_action {port_id} create``). It is bound to
+``rte_flow_shared_action_destroy()``::
+
+ flow shared_action {port_id} destroy action_id {shared_action_id} [...]
+
+If successful, it will show::
+
+ Shared action #[...] destroyed
+
+It does not report anything for shared action IDs that do not exist.
+The usual error message is shown when a shared action cannot be destroyed::
+
+ Caught error type [...] ([...]): [...]
+
+Destroy shared actions having id 100 & 101::
+
+ testpmd> flow shared_action 0 destroy action_id 100 action_id 101
+
+Query shared actions
+~~~~~~~~~~~~~~~~~~~~
+``flow shared_action {port_id} query`` queries the shared action from its
+shared action ID (as returned by ``flow shared_action {port_id} create``).
+It is bound to ``rte_flow_shared_action_query()``::
+
+ flow shared_action {port_id} query {shared_action_id}
+
+Currently only rss shared action supported. If successful, it will show::
+
+ Shared RSS action:
+ refs:[...]
+
+Otherwise, it will complain either that shared action not found or that some
+error occurred::
+
+ Failed to find shared action #[...] on port [...]
+
+::
+
+ Caught error type [...] ([...]): [...]
+
+Query shared action having id 100::
+
+ testpmd> flow shared_action 0 query 100
Sample QinQ flow rules
~~~~~~~~~~~~~~~~~~~~~~