net/bnxt: support freeing key and action tables
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_mapper.h
index adbcec2..8655728 100644 (file)
@@ -15,6 +15,8 @@
 #include "bnxt_ulp.h"
 #include "ulp_utils.h"
 
+#define ULP_SZ_BITS2BYTES(x) (((x) + 7) / 8)
+
 /* Internal Structure for passing the arguments around */
 struct bnxt_ulp_mapper_parms {
        uint32_t                                dev_id;
@@ -36,4 +38,17 @@ struct bnxt_ulp_mapper_parms {
        enum bnxt_ulp_flow_db_tables            tbl_idx;
 };
 
+/* Function that frees all resources associated with the flow. */
+int32_t
+ulp_mapper_flow_destroy(struct bnxt_ulp_context        *ulp_ctx, uint32_t fid);
+
+/*
+ * Function that frees all resources and can be called on default or regular
+ * flows
+ */
+int32_t
+ulp_mapper_resources_free(struct bnxt_ulp_context      *ulp_ctx,
+                         uint32_t fid,
+                         enum bnxt_ulp_flow_db_tables  tbl_type);
+
 #endif /* _ULP_MAPPER_H_ */