net/bnxt: add conditional processing of templates
[dpdk.git] / drivers / net / bnxt / tf_core / tf_em.h
index 2de1862..9d168c3 100644 (file)
 
 #include "hcapi_cfa_defs.h"
 
+/**
+ * TF_EM_ALLOC
+ *
+ * 0: Use stack allocator with fixed sized entries
+ *    (default).
+ * 1: Use dpool allocator with variable size
+ *    entries.
+ */
+#define TF_EM_ALLOC 0
+
 #define TF_EM_MIN_ENTRIES     (1 << 15) /* 32K */
 #define TF_EM_MAX_ENTRIES     (1 << 27) /* 128M */
 
@@ -133,6 +143,16 @@ struct tf_em_cfg_parms {
        enum tf_mem_type mem_type;
 };
 
+/**
+ * EM database
+ *
+ * EM rm database
+ *
+ */
+struct em_rm_db {
+       struct rm_db *em_db[TF_DIR_MAX];
+};
+
 /**
  * @page em EM
  *
@@ -233,6 +253,22 @@ int tf_em_hash_insert_int_entry(struct tf *tfp,
 int tf_em_hash_delete_int_entry(struct tf *tfp,
                                struct tf_delete_em_entry_parms *parms);
 
+/**
+ * Move record from internal EM table
+ *
+ * [in] tfp
+ *   Pointer to TruFlow handle
+ *
+ * [in] parms
+ *   Pointer to input parameters
+ *
+ * Returns:
+ *   0       - Success
+ *   -EINVAL - Parameter error
+ */
+int tf_em_move_int_entry(struct tf *tfp,
+                        struct tf_move_em_entry_parms *parms);
+
 /**
  * Insert record in to external EEM table
  *
@@ -520,4 +556,21 @@ tf_em_ext_system_bind(struct tf *tfp,
                      struct tf_em_cfg_parms *parms);
 
 int offload_system_mmap(struct tf_tbl_scope_cb *tbl_scope_cb);
+
+/**
+ * Retrieves the allocated resource info
+ *
+ * [in] tfp
+ *   Pointer to TF handle, used for HCAPI communication
+ *
+ * [in] parms
+ *   Pointer to parameters
+ *
+ * Returns
+ *   - (0) if successful.
+ *   - (-EINVAL) on failure.
+ */
+int
+tf_em_get_resc_info(struct tf *tfp,
+                   struct tf_em_resource_info *em);
 #endif /* _TF_EM_H_ */