X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_core%2Ftf_msg.h;h=b26b15bfa33144bb73978d0fd3abe4509e81e599;hb=f1f6ebc0eaf68a825c6175f5e6a436f7d91660c3;hp=a14bcd3927a47556c06d8f2d10e738cf28007523;hpb=a9597be79f6624f9e4a171ec2b1048f4a2e96696;p=dpdk.git diff --git a/drivers/net/bnxt/tf_core/tf_msg.h b/drivers/net/bnxt/tf_core/tf_msg.h index a14bcd3927..b26b15bfa3 100644 --- a/drivers/net/bnxt/tf_core/tf_msg.h +++ b/drivers/net/bnxt/tf_core/tf_msg.h @@ -9,10 +9,12 @@ #include #include +#include "tf_em_common.h" #include "tf_tbl.h" #include "tf_rm.h" #include "tf_tcam.h" #include "tf_global_cfg.h" +#include "bnxt.h" struct tf; @@ -21,8 +23,8 @@ struct tf; /** * Sends session open request to Firmware * - * [in] session - * Pointer to session handle + * [in] bp + * Pointer to bnxt handle * * [in] ctrl_chan_name * PCI name of the control channel @@ -30,14 +32,24 @@ struct tf; * [in/out] fw_session_id * Pointer to the fw_session_id that is allocated on firmware side * + * [in/out] fw_session_client_id + * Pointer to the fw_session_client_id that is allocated on firmware side + * + * [in/out] dev + * Pointer to the associated device + * + * [out] shared_session_creator + * Pointer to the shared_session_creator + * * Returns: * 0 on Success else internal Truflow error */ -int tf_msg_session_open(struct tf *tfp, +int tf_msg_session_open(struct bnxt *bp, char *ctrl_chan_name, uint8_t *fw_session_id, uint8_t *fw_session_client_id, - struct tf_dev_info *dev); + struct tf_dev_info *dev, + bool *shared_session_creator); /** * Sends session close request to Firmware @@ -103,11 +115,18 @@ int tf_msg_session_client_unregister(struct tf *tfp, * [in] session * Pointer to session handle * + * [in] fw_session_id + * fw session id + * + * [in] mailbox + * mailbox + * * Returns: * 0 on Success else internal Truflow error */ int tf_msg_session_close(struct tf *tfp, - struct tf_session *tfs); + uint8_t fw_session_id, + int mailbox); /** * Sends session query config request to TF Firmware @@ -177,6 +196,34 @@ int tf_msg_session_resc_alloc(struct tf *tfp, struct tf_rm_resc_req_entry *request, struct tf_rm_resc_entry *resv); +/** + * 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_info(struct tf *tfp, + struct tf_dev_info *dev, + enum tf_dir dir, + uint16_t size, + struct tf_rm_resc_req_entry *request, + struct tf_rm_resc_entry *resv); + /** * Sends session resource flush request to TF Firmware * @@ -275,6 +322,75 @@ tf_msg_hash_insert_em_internal_entry(struct tf *tfp, int tf_msg_delete_em_entry(struct tf *tfp, struct tf_delete_em_entry_parms *em_parms); +/** + * Sends EM internal move request to Firmware + * + * [in] tfp + * Pointer to TF handle + * + * [in] em_parms + * Pointer to em move parameters + * + * Returns: + * 0 on Success else internal Truflow error + */ +int tf_msg_move_em_entry(struct tf *tfp, + struct tf_move_em_entry_parms *em_parms); + +/** + * Sends Ext EM mem allocation request to Firmware + * + * [in] tfp + * Pointer to TF handle + * + * [in] tbl + * memory allocation details + * + * [out] dma_addr + * memory address + * + * [out] page_lvl + * page level + * + * [out] page_size + * page size + * + * Returns: + * 0 on Success else internal Truflow error + */ +int tf_msg_ext_em_ctxt_mem_alloc(struct tf *tfp, + struct hcapi_cfa_em_table *tbl, + uint64_t *dma_addr, + uint32_t *page_lvl, + uint32_t *page_size); + +/** + * Sends Ext EM mem allocation request to Firmware + * + * [in] tfp + * Pointer to TF handle + * + * [in] mem_size_k + * memory size in KB + * + * [in] page_dir + * Pointer to the PBL or PDL depending on number of levels + * + * [in] page_level + * PBL indirect levels + * + * [in] page_size + * page size + * + * Returns: + * 0 on Success else internal Truflow error + */ +int tf_msg_ext_em_ctxt_mem_free(struct tf *tfp, + uint32_t mem_size_k, + uint64_t dma_addr, + uint8_t page_level, + uint8_t page_size); + /** * Sends EM mem register request to Firmware * @@ -377,6 +493,38 @@ int tf_msg_em_cfg(struct tf *tfp, uint8_t flush_interval, int dir); +/** + * Sends Ext EM config request to Firmware + * + * [in] tfp + * Pointer to TF handle + * + * [in] fw_se_id + * FW session id + * + * [in] tbl_scope_cb + * Table scope parameters + * + * [in] st_buckets + * static bucket size + * + * [in] flush_interval + * Flush pending HW cached flows every 1/10th of value set in + * seconds, both idle and active flows are flushed from the HW + * cache. If set to 0, this feature will be disabled. + * + * [in] dir + * Receive or Transmit direction + * + * Returns: + * 0 on Success else internal Truflow error + */ +int tf_msg_ext_em_cfg(struct tf *tfp, + struct tf_tbl_scope_cb *tbl_scope_cb, + uint32_t st_buckets, + uint8_t flush_interval, + enum tf_dir dir); + /** * Sends EM operation request to Firmware *