net/bnxt: add conditional processing of templates
[dpdk.git] / drivers / net / bnxt / tf_core / tf_rm.h
index 407c7d5..8b98411 100644 (file)
@@ -138,6 +138,7 @@ struct tf_rm_element_cfg {
         * resource pool chunk size.
         */
        uint8_t slices;
+
        /**
         * Pool element divider count
         * If 0 or 1, there is 1:1 correspondence between the RM
@@ -146,7 +147,6 @@ struct tf_rm_element_cfg {
         * correspondence to the HCAPI RM firmware resource.
         */
        uint8_t divider;
-
 };
 
 /**
@@ -425,6 +425,24 @@ struct tf_rm_check_indexes_in_range_parms {
 int tf_rm_create_db(struct tf *tfp,
                    struct tf_rm_create_db_parms *parms);
 
+/**
+ * Creates and fills a Resource Manager (RM) DB with requested
+ * elements. The DB is indexed per the parms structure. It only retrieve
+ * allocated resource information for a exist session.
+ *
+ * [in] tfp
+ *   Pointer to TF handle, used for HCAPI communication
+ *
+ * [in] parms
+ *   Pointer to create parameters
+ *
+ * Returns
+ *   - (0) if successful.
+ *   - (-EINVAL) on failure.
+ */
+int tf_rm_create_db_no_reservation(struct tf *tfp,
+                   struct tf_rm_create_db_parms *parms);
+
 /**
  * Closes the Resource Manager (RM) DB and frees all allocated
  * resources per the associated database.
@@ -498,6 +516,22 @@ int tf_rm_is_allocated(struct tf_rm_is_allocated_parms *parms);
  */
 int tf_rm_get_info(struct tf_rm_get_alloc_info_parms *parms);
 
+/**
+ * Retrieves all elements allocation information from the Resource
+ * Manager (RM) DB.
+ *
+ * [in] parms
+ *   Pointer to get info parameters
+ *
+ * [in] size
+ *   number of the elements for the specific module
+ *
+ * Returns
+ *   - (0) if successful.
+ *   - (-EINVAL) on failure.
+ */
+int tf_rm_get_all_info(struct tf_rm_get_alloc_info_parms *parms, int size);
+
 /**
  * Performs a lookup in the Resource Manager DB and retrieves the
  * requested HCAPI RM type.