#include "tf_core.h"
#include "tf_session.h"
-
/**
* Function to search for table scope control block structure
* with specified table scope ID.
*/
struct tf_tbl_scope_cb *tbl_scope_cb_find(uint32_t tbl_scope_id);
+/**
+ * Table Scope Allocate
+ *
+ * Allocate a table scope
+ *
+ * [in/out] pointer to tbl_scope_id
+ *
+ * Returns:
+ * 0 - success
+ * -EINVAL - error
+ */
+int tf_tbl_scope_alloc(uint32_t *tbl_scope_id);
+
+/**
+ * Table Scope Free
+ *
+ * Free a table scope
+ *
+ * [in] tbl_scope_id to free
+ *
+ * Returns:
+ * 0 - success
+ * -EINVAL - error
+ */
+int tf_tbl_scope_free(uint32_t tbl_scope_id);
+
/**
* Create and initialize a stack to use for action entries
*
uint32_t offset,
enum hcapi_cfa_em_table_type table_type);
+/**
+ * Validates EM number of entries requested
+ *
+ * [in] tbl_scope_cb
+ * Pointer to table scope control block to be populated
+ *
+ * [in] parms
+ * Pointer to input parameters
+ *
+ * Returns:
+ * 0 - Success
+ * -EINVAL - Parameter error
+ */
+int tf_em_validate_num_entries(struct tf_tbl_scope_cb *tbl_scope_cb,
+ struct tf_alloc_tbl_scope_parms *parms);
+
+/**
+ * Size the EM table based on capabilities
+ *
+ * [in] tbl
+ * EM table to size
+ *
+ * Returns:
+ * 0 - Success
+ * - EINVAL - Parameter error
+ * - ENOMEM - Out of memory
+ */
+int tf_em_size_table(struct hcapi_cfa_em_table *tbl,
+ uint32_t page_size);
+
#endif /* _TF_EM_COMMON_H_ */