DPDK 21.11.9
|
#include <rte_flow.h>
Data Fields | |
uint32_t | group |
uint32_t | priority |
uint32_t | ingress:1 |
uint32_t | egress:1 |
uint32_t | transfer:1 |
uint32_t | reserved:29 |
Flow rule attributes.
Priorities are set on a per rule based within groups.
Lower values denote higher priority, the highest priority for a flow rule is 0, so that a flow that matches for than one rule, the rule with the lowest priority value will always be matched.
Although optional, applications are encouraged to group similar rules as much as possible to fully take advantage of hardware capabilities (e.g. optimized matching) and work around limitations (e.g. a single pattern type possibly allowed in a given group). Applications should be aware that groups are not linked by default, and that they must be explicitly linked by the application using the JUMP action.
Priority levels are arbitrary and up to the application, they do not need to be contiguous nor start from 0, however the maximum number varies between devices and may be affected by existing flow rules.
If a packet is matched by several rules of a given group for a given priority level, the outcome is undefined. It can take any path, may be duplicated or even cause unrecoverable errors.
Note that support for more than a single group and priority level is not guaranteed.
At vNIC / ethdev level, flow rules can apply to inbound and / or outbound traffic (ingress / egress), with respect to the vNIC / ethdev in question. At embedded switch level, flow rules apply to all traffic seen by it unless fitting meta items are used to set concrete traffic source(s).
Several pattern items and actions are valid and can be used in both directions. Those valid for only one direction are described as such.
At least one direction must be specified.
Specifying both directions at once for a given rule is not recommended but may be valid in a few cases.
Definition at line 85 of file rte_flow.h.
uint32_t group |
Priority group.
Definition at line 86 of file rte_flow.h.
uint32_t priority |
Rule priority level within group.
Definition at line 87 of file rte_flow.h.
uint32_t ingress |
The rule in question applies to ingress traffic (non-"transfer").
Definition at line 100 of file rte_flow.h.
uint32_t egress |
The rule in question applies to egress traffic (non-"transfer").
Definition at line 113 of file rte_flow.h.
uint32_t transfer |
Instead of simply matching the properties of traffic as it would appear on a given DPDK port ID, enabling this attribute transfers a flow rule to the lowest possible level of any device endpoints found in the pattern.
When supported, this effectively enables an application to re-route traffic not necessarily intended for it (e.g. coming from or addressed to different physical ports, VFs or applications) at the device level.
The application should match traffic originating from precise locations. See items PORT_REPRESENTOR and REPRESENTED_PORT.
Managing "transfer" flows requires that the user communicate them through a suitable port.
Definition at line 131 of file rte_flow.h.
uint32_t reserved |
Reserved, must be zero.
Definition at line 132 of file rte_flow.h.