net/ixgbe: check driver type in MACsec API
[dpdk.git] / drivers / net / bnxt / tf_ulp / bnxt_ulp.h
index d88225f..eecc09c 100644 (file)
@@ -18,6 +18,8 @@ struct bnxt_ulp_data {
        uint32_t                        dev_id; /* Hardware device id */
        uint32_t                        ref_cnt;
        struct bnxt_ulp_flow_db         *flow_db;
+       void                            *mapper_data;
+       struct bnxt_ulp_port_db         *port_db;
 };
 
 struct bnxt_ulp_context {
@@ -47,6 +49,16 @@ struct rte_tf_flow {
        uint32_t        flow_id;
 };
 
+/*
+ * Allow the deletion of context only for the bnxt device that
+ * created the session
+ * TBD - The implementation of the function should change to
+ * using the reference count once tf_session_attach functionality
+ * is fixed.
+ */
+bool
+ulp_ctx_deinit_allowed(void *bp);
+
 /* Function to set the device id of the hardware. */
 int32_t
 bnxt_ulp_cntxt_dev_id_set(struct bnxt_ulp_context *ulp_ctx, uint32_t dev_id);
@@ -97,4 +109,22 @@ bnxt_ulp_cntxt_ptr2_flow_db_get(struct bnxt_ulp_context     *ulp_ctx);
 struct bnxt_ulp_context        *
 bnxt_ulp_eth_dev_ptr2_cntxt_get(struct rte_eth_dev *dev);
 
+/* Function to add the ulp mapper data to the ulp context */
+int32_t
+bnxt_ulp_cntxt_ptr2_mapper_data_set(struct bnxt_ulp_context *ulp_ctx,
+                                   void *mapper_data);
+
+/* Function to get the ulp mapper data from the ulp context */
+void *
+bnxt_ulp_cntxt_ptr2_mapper_data_get(struct bnxt_ulp_context *ulp_ctx);
+
+/* Function to set the port database to the ulp context. */
+int32_t
+bnxt_ulp_cntxt_ptr2_port_db_set(struct bnxt_ulp_context        *ulp_ctx,
+                               struct bnxt_ulp_port_db *port_db);
+
+/* Function to get the port database from the ulp context. */
+struct bnxt_ulp_port_db *
+bnxt_ulp_cntxt_ptr2_port_db_get(struct bnxt_ulp_context        *ulp_ctx);
+
 #endif /* _BNXT_ULP_H_ */