lib: use SPDX tag for Intel copyright files
[dpdk.git] / lib / librte_flow_classify / 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
14 extern "C" {
15 #endif
16
17 typedef int (*parse_filter_t)(const struct rte_flow_attr *attr,
18                               const struct rte_flow_item pattern[],
19                               const struct rte_flow_action actions[],
20                               struct rte_eth_ntuple_filter *filter,
21                               struct rte_flow_error *error);
22
23 /* Skip all VOID items of the pattern */
24 void
25 classify_pattern_skip_void_item(struct rte_flow_item *items,
26                             const struct rte_flow_item *pattern);
27
28 /* Find the first VOID or non-VOID item pointer */
29 const struct rte_flow_item *
30 classify_find_first_item(const struct rte_flow_item *item, bool is_void);
31
32
33 /* Find if there's parse filter function matched */
34 parse_filter_t
35 classify_find_parse_filter_func(struct rte_flow_item *pattern);
36
37 /* get action data */
38 struct rte_flow_action *
39 classify_get_flow_action(void);
40
41 #ifdef __cplusplus
42 }
43 #endif
44
45 #endif /* _RTE_FLOW_CLASSIFY_PARSE_H_ */