#ifndef _TF_MSG_H_
#define _TF_MSG_H_
+#include <rte_common.h>
+#include <hsi_struct_def_dpdk.h>
+
#include "tf_tbl.h"
#include "tf_rm.h"
+#include "tf_rm_new.h"
+#include "tf_tcam.h"
struct tf;
enum tf_dir dir,
struct tf_rm_entry *sram_entry);
+/**
+ * Sends session HW resource query capability request to TF Firmware
+ *
+ * [in] tfp
+ * Pointer to TF handle
+ *
+ * [in] dir
+ * Receive or Transmit direction
+ *
+ * [in] size
+ * Number of elements in the query. Should be set to the max
+ * elements for the device type
+ *
+ * [out] query
+ * Pointer to an array of query elements
+ *
+ * [out] resv_strategy
+ * Pointer to the reservation strategy
+ *
+ * Returns:
+ * 0 on Success else internal Truflow error
+ */
+int tf_msg_session_resc_qcaps(struct tf *tfp,
+ enum tf_dir dir,
+ uint16_t size,
+ struct tf_rm_resc_req_entry *query,
+ enum tf_rm_resc_resv_strategy *resv_strategy);
+
+/**
+ * Sends session HW resource allocation request to TF Firmware
+ *
+ * [in] tfp
+ * Pointer to TF handle
+ *
+ * [in] dir
+ * Receive or Transmit direction
+ *
+ * [in] size
+ * Number of elements in the req and resv arrays
+ *
+ * [in] req
+ * Pointer to an array of request elements
+ *
+ * [in] resv
+ * Pointer to an array of reserved elements
+ *
+ * Returns:
+ * 0 on Success else internal Truflow error
+ */
+int tf_msg_session_resc_alloc(struct tf *tfp,
+ enum tf_dir dir,
+ uint16_t size,
+ struct tf_rm_resc_req_entry *request,
+ struct tf_rm_resc_entry *resv);
+
+/**
+ * Sends EM internal insert request to Firmware
+ */
+int tf_msg_insert_em_internal_entry(struct tf *tfp,
+ struct tf_insert_em_entry_parms *params,
+ uint16_t *rptr_index,
+ uint8_t *rptr_entry,
+ uint8_t *num_of_entries);
+/**
+ * Sends EM internal delete request to Firmware
+ */
+int tf_msg_delete_em_entry(struct tf *tfp,
+ struct tf_delete_em_entry_parms *em_parms);
+/**
+ * Sends EM mem register request to Firmware
+ */
+int tf_msg_em_mem_rgtr(struct tf *tfp,
+ int page_lvl,
+ int page_size,
+ uint64_t dma_addr,
+ uint16_t *ctx_id);
+
+/**
+ * Sends EM mem unregister request to Firmware
+ */
+int tf_msg_em_mem_unrgtr(struct tf *tfp,
+ uint16_t *ctx_id);
+
+/**
+ * Sends EM qcaps request to Firmware
+ */
+int tf_msg_em_qcaps(struct tf *tfp,
+ int dir,
+ struct tf_em_caps *em_caps);
+
+/**
+ * Sends EM config request to Firmware
+ */
+int tf_msg_em_cfg(struct tf *tfp,
+ uint32_t num_entries,
+ uint16_t key0_ctx_id,
+ uint16_t key1_ctx_id,
+ uint16_t record_ctx_id,
+ uint16_t efc_ctx_id,
+ uint8_t flush_interval,
+ int dir);
+
+/**
+ * Sends EM operation request to Firmware
+ */
+int tf_msg_em_op(struct tf *tfp,
+ int dir,
+ uint16_t op);
+
/**
* Sends tcam entry 'set' to the Firmware.
*
* 0 on Success else internal Truflow error
*/
int tf_msg_tcam_entry_set(struct tf *tfp,
- struct tf_set_tcam_entry_parms *parms);
+ struct tf_tcam_set_parms *parms);
/**
* Sends tcam entry 'free' to the Firmware.
* 0 on Success else internal Truflow error
*/
int tf_msg_tcam_entry_free(struct tf *tfp,
- struct tf_free_tcam_entry_parms *parms);
+ struct tf_tcam_free_parms *parms);
/**
* Sends Set message of a Table Type element to the firmware.
uint8_t *data,
uint32_t index);
+/**
+ * Sends bulk get message of a Table Type element to the firmware.
+ *
+ * [in] tfp
+ * Pointer to session handle
+ *
+ * [in] parms
+ * Pointer to table get bulk parameters
+ *
+ * Returns:
+ * 0 on Success else internal Truflow error
+ */
+int tf_msg_bulk_get_tbl_entry(struct tf *tfp,
+ struct tf_bulk_get_tbl_entry_parms *parms);
+
#endif /* _TF_MSG_H_ */