DPDK  18.11.11
Data Fields
rte_flow_attr Struct Reference

#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
 

Detailed Description

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.

Flow rules can apply to inbound and/or outbound traffic (ingress/egress).

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 (e.g. shared counter).

Examples:
examples/flow_classify/flow_classify.c, and examples/flow_filtering/flow_blocks.c.

Definition at line 73 of file rte_flow.h.

Field Documentation

uint32_t group

Priority group.

Definition at line 74 of file rte_flow.h.

uint32_t priority

Rule priority level within group.

Definition at line 75 of file rte_flow.h.

uint32_t ingress

Rule applies to ingress traffic.

Definition at line 76 of file rte_flow.h.

uint32_t egress

Rule applies to egress traffic.

Definition at line 77 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.

It complements the behavior of some pattern items such as RTE_FLOW_ITEM_TYPE_PHY_PORT and is meaningless without them.

When transferring flow rules, ingress and egress attributes keep their original meaning, as if processing traffic emitted or received by the application.

Definition at line 96 of file rte_flow.h.

uint32_t reserved

Reserved, must be zero.

Definition at line 97 of file rte_flow.h.


The documentation for this struct was generated from the following file: