net/bnxt: add conditional processing of templates
[dpdk.git] / drivers / net / bnxt / tf_core / tf_tcam.h
index 280f138..bed17af 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-2020 Broadcom
+ * Copyright(c) 2019-2021 Broadcom
  * All rights reserved.
  */
 
@@ -207,6 +207,10 @@ struct tf_tcam_get_parms {
         * [in] Type of object to get
         */
        enum tf_tcam_tbl_type type;
+       /**
+        * [in] Type of HCAPI
+        */
+       uint16_t hcapi_type;
        /**
         * [in] Entry index to read
         */
@@ -233,6 +237,16 @@ struct tf_tcam_get_parms {
        uint16_t result_size;
 };
 
+/**
+ * TCAM database
+ *
+ * Tcam rm database
+ *
+ */
+struct tcam_rm_db {
+       struct rm_db *tcam_db[TF_DIR_MAX];
+};
+
 /**
  * @page tcam TCAM
  *
@@ -372,4 +386,20 @@ int tf_tcam_set(struct tf *tfp,
 int tf_tcam_get(struct tf *tfp,
                struct tf_tcam_get_parms *parms);
 
+/**
+ * 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_tcam_get_resc_info(struct tf *tfp,
+                         struct tf_tcam_resource_info *parms);
+
 #endif /* _TF_TCAM_H */