DPDK 22.11.6
|
#include <rte_flow.h>
Data Fields | |
enum rte_flow_item_type | type |
const void * | spec |
const void * | last |
const void * | mask |
Matching pattern item definition.
A pattern is formed by stacking items starting from the lowest protocol layer to match. This stacking restriction does not apply to meta items which can be placed anywhere in the stack without affecting the meaning of the resulting pattern.
Patterns are terminated by END items.
The spec field should be a valid pointer to a structure of the related item type. It may remain unspecified (NULL) in many cases to request broad (nonspecific) matching. In such cases, last and mask must also be set to NULL.
Optionally, last can point to a structure of the same type to define an inclusive range. This is mostly supported by integer and address fields, may cause errors otherwise. Fields that do not support ranges must be set to 0 or to the same value as the corresponding fields in spec.
Only the fields defined to nonzero values in the default masks (see rte_flow_item_{name}_mask constants) are considered relevant by default. This can be overridden by providing a mask structure of the same type with applicable bits set to one. It can also be used to partially filter out specific fields (e.g. as an alternate mean to match ranges of IP addresses).
Mask is a simple bit-mask applied before interpreting the contents of spec and last, which may yield unexpected results if not used carefully. For example, if for an IPv4 address field, spec provides 10.1.2.3, last provides 10.3.4.5 and mask provides 255.255.0.0, the effective range becomes 10.1.0.0 to 10.3.255.255.
Definition at line 1912 of file rte_flow.h.
enum rte_flow_item_type type |
const void* spec |
Pointer to item specification structure.
Definition at line 1914 of file rte_flow.h.
const void* last |
Defines an inclusive range (spec to last).
Definition at line 1915 of file rte_flow.h.
const void* mask |
Bit-mask applied to spec and last.
Definition at line 1916 of file rte_flow.h.