DPDK
19.02.0
|
#include <rte_compat.h>
#include <rte_common.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
#include <rte_flow.h>
#include <rte_acl.h>
#include <rte_table_acl.h>
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 | |
struct rte_flow_classifier *__rte_experimental | rte_flow_classifier_create (struct rte_flow_classifier_params *params) |
int __rte_experimental | rte_flow_classifier_free (struct rte_flow_classifier *cls) |
int __rte_experimental | rte_flow_classify_table_create (struct rte_flow_classifier *cls, struct rte_flow_classify_table_params *params) |
int __rte_experimental | 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) |
struct rte_flow_classify_rule *__rte_experimental | 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) |
int __rte_experimental | rte_flow_classify_table_entry_delete (struct rte_flow_classifier *cls, struct rte_flow_classify_rule *rule) |
int __rte_experimental | 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
EXPERIMENTAL: this API may change without prior notice
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
RTE_FLOW_CLASSIFY_RULE_TYPE_NONE |
no type |
RTE_FLOW_CLASSIFY_RULE_TYPE_IPV4_5TUPLE |
IPv4 5tuple type |
Definition at line 76 of file rte_flow_classify.h.
Flow classify table type
Definition at line 84 of file rte_flow_classify.h.
|
read |
Flow classifier create
params | Parameters for flow classifier creation |
int __rte_experimental rte_flow_classifier_free | ( | struct rte_flow_classifier * | cls | ) |
Flow classifier free
cls | Handle to flow classifier instance |
int __rte_experimental 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 |
int __rte_experimental 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. |
|
read |
Add a flow classify rule to the flow_classifer 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. |
int __rte_experimental 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_classifer table.
[in] | cls | Flow classifier handle |
[in] | rule | Flow classify rule |
int __rte_experimental 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 |