DPDK 21.11.9
rte_flow_classify_parse.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
3 */
4
5#ifndef _RTE_FLOW_CLASSIFY_PARSE_H_
6#define _RTE_FLOW_CLASSIFY_PARSE_H_
7
8#include <rte_ethdev.h>
9#include <rte_ether.h>
10#include <rte_flow.h>
11#include <stdbool.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17extern enum rte_flow_classify_table_type table_type;
18
19struct classify_action {
20 /* Flow action mask */
21 uint64_t action_mask;
22
23 struct action {
25 struct rte_flow_action_mark mark;
27 struct rte_flow_query_count counter;
28 } act;
29};
30
31typedef int (*parse_filter_t)(const struct rte_flow_attr *attr,
32 const struct rte_flow_item pattern[],
33 const struct rte_flow_action actions[],
34 struct rte_eth_ntuple_filter *filter,
35 struct rte_flow_error *error);
36
37/* Skip all VOID items of the pattern */
38void
39classify_pattern_skip_void_item(struct rte_flow_item *items,
40 const struct rte_flow_item *pattern);
41
42/* Find the first VOID or non-VOID item pointer */
43const struct rte_flow_item *
44classify_find_first_item(const struct rte_flow_item *item, bool is_void);
45
46
47/* Find if there's parse filter function matched */
48parse_filter_t
49classify_find_parse_filter_func(struct rte_flow_item *pattern);
50
51/* get action data */
52struct classify_action *
53classify_get_flow_action(void);
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif /* _RTE_FLOW_CLASSIFY_PARSE_H_ */
rte_flow_classify_table_type