1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
5 #ifndef _RTE_FLOW_CLASSIFY_PARSE_H_
6 #define _RTE_FLOW_CLASSIFY_PARSE_H_
8 #include <rte_ethdev.h>
16 extern enum rte_flow_classify_table_type table_type;
18 struct classify_action {
19 /* Flow action mask */
23 /** Integer value to return with packets */
24 struct rte_flow_action_mark mark;
25 /** Flow rule counter */
26 struct rte_flow_query_count counter;
30 typedef int (*parse_filter_t)(const struct rte_flow_attr *attr,
31 const struct rte_flow_item pattern[],
32 const struct rte_flow_action actions[],
33 struct rte_eth_ntuple_filter *filter,
34 struct rte_flow_error *error);
36 /* Skip all VOID items of the pattern */
38 classify_pattern_skip_void_item(struct rte_flow_item *items,
39 const struct rte_flow_item *pattern);
41 /* Find the first VOID or non-VOID item pointer */
42 const struct rte_flow_item *
43 classify_find_first_item(const struct rte_flow_item *item, bool is_void);
46 /* Find if there's parse filter function matched */
48 classify_find_parse_filter_func(struct rte_flow_item *pattern);
51 struct classify_action *
52 classify_get_flow_action(void);
58 #endif /* _RTE_FLOW_CLASSIFY_PARSE_H_ */