*/
void *tcam_shared_db_handle;
#endif /* TF_TCAM_SHARED */
+ /**
+ * SRAM db reference for the session
+ */
+ void *sram_handle;
};
/**
*
* @ref tf_session_set_tcam_shared_db
* #endif
+ *
+ * @ref tf_session_get_sram_db
+ *
+ * @ref tf_session_set_sram_db
*/
/**
/**
* Looks up the device information from the TF Session.
*
- * [in] tfp
- * Pointer to TF handle
+ * [in] tfs
+ * Pointer to session handle
*
* [out] tfd
- * Pointer pointer to the device
+ * Pointer to the device
*
* Returns
* - (0) if successful.
int tf_session_get_device(struct tf_session *tfs,
struct tf_dev_info **tfd);
+/**
+ * Returns the session and the device from the tfp.
+ *
+ * [in] tfp
+ * Pointer to TF handle
+ *
+ * [out] tfs
+ * Pointer to the session
+ *
+ * [out] tfd
+ * Pointer to the device
+
+ * Returns
+ * - (0) if successful.
+ * - (-EINVAL) on failure.
+ */
+int tf_session_get(struct tf *tfp,
+ struct tf_session **tfs,
+ struct tf_dev_info **tfd);
+
/**
* Looks up the FW Session id the requested TF handle.
*
tf_session_get_tcam_shared_db(struct tf *tfp,
void **tcam_shared_db_handle);
+/**
+ * Set the pointer to the SRAM database
+ *
+ * [in] session, pointer to the session
+ *
+ * Returns:
+ * - the pointer to the parent bnxt struct
+ */
+int
+tf_session_set_sram_db(struct tf *tfp,
+ void *sram_handle);
+
+/**
+ * Get the pointer to the SRAM database
+ *
+ * [in] session, pointer to the session
+ *
+ * Returns:
+ * - the pointer to the parent bnxt struct
+ */
+int
+tf_session_get_sram_db(struct tf *tfp,
+ void **sram_handle);
+
#endif /* _TF_SESSION_H_ */