1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2019 Broadcom
12 #include <rte_flow_driver.h>
13 #include "ulp_template_db.h"
14 #include "ulp_template_struct.h"
16 #include "ulp_utils.h"
18 #define ULP_SZ_BITS2BYTES(x) (((x) + 7) / 8)
20 /* Internal Structure for passing the arguments around */
21 struct bnxt_ulp_mapper_parms {
23 enum bnxt_ulp_byte_order order;
25 struct bnxt_ulp_mapper_act_tbl_info *atbls;
28 struct bnxt_ulp_mapper_class_tbl_info *ctbls;
30 struct ulp_rte_act_prop *act_prop;
31 struct ulp_rte_act_bitmap *act_bitmap;
32 struct ulp_rte_hdr_field *hdr_field;
33 struct ulp_regfile *regfile;
35 struct bnxt_ulp_context *ulp_ctx;
36 uint8_t encap_byte_swap;
38 enum bnxt_ulp_flow_db_tables tbl_idx;
42 * Function to handle the mapping of the Flow to be compatible
43 * with the underlying hardware.
46 ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
47 uint32_t app_priority,
48 struct ulp_rte_hdr_bitmap *hdr_bitmap,
49 struct ulp_rte_hdr_field *hdr_field,
50 struct ulp_rte_act_bitmap *act,
51 struct ulp_rte_act_prop *act_prop,
56 /* Function that frees all resources associated with the flow. */
58 ulp_mapper_flow_destroy(struct bnxt_ulp_context *ulp_ctx, uint32_t fid);
61 * Function that frees all resources and can be called on default or regular
65 ulp_mapper_resources_free(struct bnxt_ulp_context *ulp_ctx,
67 enum bnxt_ulp_flow_db_tables tbl_type);
69 #endif /* _ULP_MAPPER_H_ */