1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2020 Broadcom
15 * Sends session open request to Firmware
18 * Pointer to session handle
21 * PCI name of the control channel
23 * [in/out] fw_session_id
24 * Pointer to the fw_session_id that is allocated on firmware side
29 int tf_msg_session_open(struct tf *tfp,
31 uint8_t *fw_session_id);
34 * Sends session close request to Firmware
37 * Pointer to session handle
40 * Pointer to the fw_session_id that is assigned to the session at
41 * time of session open
46 int tf_msg_session_attach(struct tf *tfp,
47 char *ctrl_channel_name,
48 uint8_t tf_fw_session_id);
51 * Sends session close request to Firmware
54 * Pointer to session handle
59 int tf_msg_session_close(struct tf *tfp);
62 * Sends session query config request to TF Firmware
64 int tf_msg_session_qcfg(struct tf *tfp);
67 * Sends session HW resource query capability request to TF Firmware
69 int tf_msg_session_hw_resc_qcaps(struct tf *tfp,
71 struct tf_rm_hw_query *hw_query);
74 * Sends session HW resource allocation request to TF Firmware
76 int tf_msg_session_hw_resc_alloc(struct tf *tfp,
78 struct tf_rm_hw_alloc *hw_alloc,
79 struct tf_rm_entry *hw_entry);
82 * Sends session HW resource free request to TF Firmware
84 int tf_msg_session_hw_resc_free(struct tf *tfp,
86 struct tf_rm_entry *hw_entry);
89 * Sends session HW resource flush request to TF Firmware
91 int tf_msg_session_hw_resc_flush(struct tf *tfp,
93 struct tf_rm_entry *hw_entry);
96 * Sends session SRAM resource query capability request to TF Firmware
98 int tf_msg_session_sram_resc_qcaps(struct tf *tfp,
100 struct tf_rm_sram_query *sram_query);
103 * Sends session SRAM resource allocation request to TF Firmware
105 int tf_msg_session_sram_resc_alloc(struct tf *tfp,
107 struct tf_rm_sram_alloc *sram_alloc,
108 struct tf_rm_entry *sram_entry);
111 * Sends session SRAM resource free request to TF Firmware
113 int tf_msg_session_sram_resc_free(struct tf *tfp,
115 struct tf_rm_entry *sram_entry);
118 * Sends session SRAM resource flush request to TF Firmware
120 int tf_msg_session_sram_resc_flush(struct tf *tfp,
122 struct tf_rm_entry *sram_entry);
125 * Sends EM internal insert request to Firmware
127 int tf_msg_insert_em_internal_entry(struct tf *tfp,
128 struct tf_insert_em_entry_parms *params,
129 uint16_t *rptr_index,
131 uint8_t *num_of_entries);
133 * Sends EM internal delete request to Firmware
135 int tf_msg_delete_em_entry(struct tf *tfp,
136 struct tf_delete_em_entry_parms *em_parms);
138 * Sends EM mem register request to Firmware
140 int tf_msg_em_mem_rgtr(struct tf *tfp,
147 * Sends EM mem unregister request to Firmware
149 int tf_msg_em_mem_unrgtr(struct tf *tfp,
153 * Sends EM qcaps request to Firmware
155 int tf_msg_em_qcaps(struct tf *tfp,
157 struct tf_em_caps *em_caps);
160 * Sends EM config request to Firmware
162 int tf_msg_em_cfg(struct tf *tfp,
163 uint32_t num_entries,
164 uint16_t key0_ctx_id,
165 uint16_t key1_ctx_id,
166 uint16_t record_ctx_id,
168 uint8_t flush_interval,
172 * Sends EM operation request to Firmware
174 int tf_msg_em_op(struct tf *tfp,
179 * Sends tcam entry 'set' to the Firmware.
182 * Pointer to session handle
185 * Pointer to set parameters
188 * 0 on Success else internal Truflow error
190 int tf_msg_tcam_entry_set(struct tf *tfp,
191 struct tf_set_tcam_entry_parms *parms);
194 * Sends tcam entry 'free' to the Firmware.
197 * Pointer to session handle
200 * Pointer to free parameters
203 * 0 on Success else internal Truflow error
205 int tf_msg_tcam_entry_free(struct tf *tfp,
206 struct tf_free_tcam_entry_parms *parms);
209 * Sends Set message of a Table Type element to the firmware.
212 * Pointer to session handle
215 * Direction location of the element to set
218 * Type of the object to set
221 * Size of the data to set
232 int tf_msg_set_tbl_entry(struct tf *tfp,
234 enum tf_tbl_type type,
240 * Sends get message of a Table Type element to the firmware.
243 * Pointer to session handle
246 * Direction location of the element to get
249 * Type of the object to get
252 * Size of the data read
263 int tf_msg_get_tbl_entry(struct tf *tfp,
265 enum tf_tbl_type type,
270 #endif /* _TF_MSG_H_ */