net/bnxt: match flow API actions with flow template actions
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_matcher.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2014-2020 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef ULP_MATCHER_H_
7 #define ULP_MATCHER_H_
8
9 #include <rte_log.h>
10 #include "bnxt.h"
11 #include "ulp_template_db.h"
12 #include "ulp_template_struct.h"
13 #include "bnxt_tf_common.h"
14
15 /*
16  * Function to handle the matching of RTE Flows and validating
17  * the pattern masks against the flow templates.
18  */
19 int32_t
20 ulp_matcher_pattern_match(enum ulp_direction_type           dir,
21                           struct ulp_rte_hdr_bitmap        *hdr_bitmap,
22                           struct ulp_rte_hdr_field         *hdr_field,
23                           struct ulp_rte_act_bitmap        *act_bitmap,
24                           uint32_t                         *class_id);
25
26 /*
27  * Function to handle the matching of RTE Flows and validating
28  * the action against the flow templates.
29  */
30 int32_t
31 ulp_matcher_action_match(enum ulp_direction_type        dir,
32                          struct ulp_rte_act_bitmap      *act_bitmap,
33                          uint32_t                       *act_id);
34
35 #endif /* ULP_MATCHER_H_ */