DPDK 22.11.6
|
Go to the source code of this file.
Data Structures | |
struct | rte_flow_classifier_params |
struct | rte_flow_classify_table_params |
struct | rte_flow_classify_ipv4_5tuple |
struct | rte_flow_classify_stats |
Enumerations | |
enum | rte_flow_classify_rule_type { RTE_FLOW_CLASSIFY_RULE_TYPE_NONE , RTE_FLOW_CLASSIFY_RULE_TYPE_IPV4_5TUPLE } |
enum | rte_flow_classify_table_type { RTE_FLOW_CLASSIFY_TABLE_TYPE_NONE = 1 << 0 , RTE_FLOW_CLASSIFY_TABLE_ACL_IP4_5TUPLE = 1 << 1 , RTE_FLOW_CLASSIFY_TABLE_ACL_VLAN_IP4_5TUPLE = 1 << 2 , RTE_FLOW_CLASSIFY_TABLE_ACL_QINQ_IP4_5TUPLE = 1 << 3 } |
Functions | |
__rte_experimental struct rte_flow_classifier * | rte_flow_classifier_create (struct rte_flow_classifier_params *params) |
__rte_experimental int | rte_flow_classifier_free (struct rte_flow_classifier *cls) |
__rte_experimental int | rte_flow_classify_table_create (struct rte_flow_classifier *cls, struct rte_flow_classify_table_params *params) |
__rte_experimental int | rte_flow_classify_validate (struct rte_flow_classifier *cls, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], struct rte_flow_error *error) |
__rte_experimental struct rte_flow_classify_rule * | rte_flow_classify_table_entry_add (struct rte_flow_classifier *cls, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], int *key_found, struct rte_flow_error *error) |
__rte_experimental int | rte_flow_classify_table_entry_delete (struct rte_flow_classifier *cls, struct rte_flow_classify_rule *rule) |
__rte_experimental int | rte_flow_classifier_query (struct rte_flow_classifier *cls, struct rte_mbuf **pkts, const uint16_t nb_pkts, struct rte_flow_classify_rule *rule, struct rte_flow_classify_stats *stats) |
RTE Flow Classify Library.
This library provides flow record information with some measured properties.
Application should define the flow and measurement criteria (action) for it.
The Library doesn't maintain any flow records itself, instead flow information is returned to upper layer only for given packets.
It is application's responsibility to call rte_flow_classifier_query() for a burst of packets, just after receiving them or before transmitting them. Application should provide the flow type interested in, measurement to apply to that flow in rte_flow_classify_table_entry_add() API, and should provide the rte_flow_classifier object and storage to put results in for the rte_flow_classifier_query() API.
Usage:
Definition in file rte_flow_classify.h.
Flow classify rule type
Enumerator | |
---|---|
RTE_FLOW_CLASSIFY_RULE_TYPE_NONE | no type |
RTE_FLOW_CLASSIFY_RULE_TYPE_IPV4_5TUPLE | IPv4 5tuple type |
Definition at line 74 of file rte_flow_classify.h.
Flow classify table type
Definition at line 82 of file rte_flow_classify.h.
__rte_experimental struct rte_flow_classifier * rte_flow_classifier_create | ( | struct rte_flow_classifier_params * | params | ) |
Flow classifier create
params | Parameters for flow classifier creation |
__rte_experimental int rte_flow_classifier_free | ( | struct rte_flow_classifier * | cls | ) |
Flow classifier free
cls | Handle to flow classifier instance |
__rte_experimental int rte_flow_classify_table_create | ( | struct rte_flow_classifier * | cls, |
struct rte_flow_classify_table_params * | params | ||
) |
Flow classify table create
cls | Handle to flow classifier instance |
params | Parameters for flow_classify table creation |
__rte_experimental int rte_flow_classify_validate | ( | struct rte_flow_classifier * | cls, |
const struct rte_flow_attr * | attr, | ||
const struct rte_flow_item | pattern[], | ||
const struct rte_flow_action | actions[], | ||
struct rte_flow_error * | error | ||
) |
Flow classify validate
cls | Handle to flow classifier instance | |
[in] | attr | Flow rule attributes |
[in] | pattern | Pattern specification (list terminated by the END pattern item). |
[in] | actions | Associated actions (list terminated by the END pattern item). |
[out] | error | Perform verbose error reporting if not NULL. Structure initialised in case of error only. |
__rte_experimental struct rte_flow_classify_rule * rte_flow_classify_table_entry_add | ( | struct rte_flow_classifier * | cls, |
const struct rte_flow_attr * | attr, | ||
const struct rte_flow_item | pattern[], | ||
const struct rte_flow_action | actions[], | ||
int * | key_found, | ||
struct rte_flow_error * | error | ||
) |
Add a flow classify rule to the flow_classifier table.
[in] | cls | Flow classifier handle |
[in] | attr | Flow rule attributes |
[in] | pattern | Pattern specification (list terminated by the END pattern item). |
[in] | actions | Associated actions (list terminated by the END pattern item). |
[out] | key_found | returns 1 if rule present already, 0 otherwise. |
[out] | error | Perform verbose error reporting if not NULL. Structure initialised in case of error only. |
__rte_experimental int rte_flow_classify_table_entry_delete | ( | struct rte_flow_classifier * | cls, |
struct rte_flow_classify_rule * | rule | ||
) |
Delete a flow classify rule from the flow_classifier table.
[in] | cls | Flow classifier handle |
[in] | rule | Flow classify rule |
__rte_experimental int rte_flow_classifier_query | ( | struct rte_flow_classifier * | cls, |
struct rte_mbuf ** | pkts, | ||
const uint16_t | nb_pkts, | ||
struct rte_flow_classify_rule * | rule, | ||
struct rte_flow_classify_stats * | stats | ||
) |
Query flow classifier for given rule.
[in] | cls | Flow classifier handle |
[in] | pkts | Pointer to packets to process |
[in] | nb_pkts | Number of packets to process |
[in] | rule | Flow classify rule |
[in] | stats | Flow classify stats |