+/**
+ * General internal resource info
+ *
+ * TODO: remove tf_rm_new_entry structure and use this structure
+ * internally.
+ */
+struct tf_resource_info {
+ uint16_t start;
+ uint16_t stride;
+};
+
+/**
+ * Identifier resource definition
+ */
+struct tf_identifier_resource_info {
+ /**
+ * Array of TF Identifiers. The index used is tf_identifier_type.
+ */
+ struct tf_resource_info info[TF_IDENT_TYPE_MAX];
+};
+
+/**
+ * Table type resource info definition
+ */
+struct tf_tbl_resource_info {
+ /**
+ * Array of TF Table types. The index used is tf_tbl_type.
+ */
+ struct tf_resource_info info[TF_TBL_TYPE_MAX];
+};
+
+/**
+ * TCAM type resource definition
+ */
+struct tf_tcam_resource_info {
+ /**
+ * Array of TF TCAM types. The index used is tf_tcam_tbl_type.
+ */
+ struct tf_resource_info info[TF_TCAM_TBL_TYPE_MAX];
+};
+
+/**
+ * EM type resource definition
+ */
+struct tf_em_resource_info {
+ /**
+ * Array of TF EM table types. The index used is tf_em_tbl_type.
+ */
+ struct tf_resource_info info[TF_EM_TBL_TYPE_MAX];
+};
+
+/**
+ * tf_session_resources parameter definition.
+ */
+struct tf_session_resource_info {
+ /**
+ * [in] Requested Identifier Resources
+ *
+ * Number of identifier resources requested for the
+ * session.
+ */
+ struct tf_identifier_resource_info ident[TF_DIR_MAX];
+ /**
+ * [in] Requested Index Table resource counts
+ *
+ * The number of index table resources requested for the
+ * session.
+ */
+ struct tf_tbl_resource_info tbl[TF_DIR_MAX];
+ /**
+ * [in] Requested TCAM Table resource counts
+ *
+ * The number of TCAM table resources requested for the
+ * session.
+ */
+
+ struct tf_tcam_resource_info tcam[TF_DIR_MAX];
+ /**
+ * [in] Requested EM resource counts
+ *
+ * The number of internal EM table resources requested for the
+ * session.
+ */
+ struct tf_em_resource_info em[TF_DIR_MAX];
+};
+
+/**
+ * tf_get_session_resources parameter definition.
+ */
+struct tf_get_session_info_parms {
+ /**
+ * [out] the structure is used to return the information of
+ * allocated resources.
+ *
+ */
+ struct tf_session_resource_info session_info;
+};
+
+/** (experimental)
+ * Gets info about a TruFlow Session
+ *
+ * Get info about the session which has been created. Whether it exists and
+ * what resource start and stride offsets are in use. This API is primarily
+ * intended to be used by an application which has created a shared session
+ * This application needs to obtain the resources which have already been
+ * allocated for the shared session.
+ *
+ * [in] tfp
+ * Pointer to TF handle
+ *
+ * [in] parms
+ * Pointer to get parameters
+ *
+ * Returns
+ * - (0) if successful.
+ * - (-EINVAL) on failure.
+ */
+int tf_get_session_info(struct tf *tfp,
+ struct tf_get_session_info_parms *parms);