26 #ifndef COMCH_COMMON_H_
27 #define COMCH_COMMON_H_
37 #define MAX_SAMPLE_TXT_SIZE 4080
38 #define MAX_TXT_SIZE (MAX_SAMPLE_TXT_SIZE + 1)
39 #define SLEEP_IN_NANOS (10 * 1000)
117 struct doca_dev *hw_dev,
119 struct doca_comch_client **client,
120 struct doca_pe **
pe);
142 struct doca_dev *hw_dev,
143 struct doca_dev_rep *rep_dev,
145 struct doca_comch_server **server,
146 struct doca_pe **
pe);
doca_error_t register_comch_params(void)
doca_error_t init_comch_ctrl_path_client(const char *server_name, struct doca_dev *hw_dev, struct comch_ctrl_path_client_cb_config *cb_cfg, struct doca_comch_client **client, struct doca_pe **pe)
void clean_comch_ctrl_path_client(struct doca_comch_client *client, struct doca_pe *pe)
void clean_comch_ctrl_path_server(struct doca_comch_server *server, struct doca_pe *pe)
doca_error_t init_comch_ctrl_path_server(const char *server_name, struct doca_dev *hw_dev, struct doca_dev_rep *rep_dev, struct comch_ctrl_path_server_cb_config *cb_cfg, struct doca_comch_server **server, struct doca_pe **pe)
static struct doca_pe * pe
void(* doca_comch_event_consumer_cb_t)(struct doca_comch_event_consumer *event, struct doca_comch_connection *comch_connection, uint32_t id)
void(* doca_comch_event_msg_recv_cb_t)(struct doca_comch_event_msg_recv *event, uint8_t *recv_buffer, uint32_t msg_len, struct doca_comch_connection *comch_connection)
void(* doca_comch_task_send_completion_cb_t)(struct doca_comch_task_send *task, union doca_data task_user_data, union doca_data ctx_user_data)
void(* doca_comch_event_connection_status_changed_cb_t)(struct doca_comch_event_connection_status_changed *event, struct doca_comch_connection *comch_connection, uint8_t change_successful)
void(* doca_ctx_state_changed_callback_t)(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
Function to execute on context state change.
#define DOCA_DEVINFO_REP_PCI_ADDR_SIZE
Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator.
#define DOCA_DEVINFO_PCI_ADDR_SIZE
Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator.
enum doca_error doca_error_t
DOCA API return codes.
char comch_dev_pci_addr[DOCA_DEVINFO_PCI_ADDR_SIZE]
char comch_dev_rep_pci_addr[DOCA_DEVINFO_REP_PCI_ADDR_SIZE]
doca_comch_task_send_completion_cb_t send_task_comp_cb
doca_comch_event_consumer_cb_t new_consumer_cb
doca_comch_event_msg_recv_cb_t msg_recv_cb
doca_ctx_state_changed_callback_t ctx_state_changed_cb
doca_comch_event_consumer_cb_t expired_consumer_cb
doca_comch_task_send_completion_cb_t send_task_comp_err_cb
doca_comch_event_connection_status_changed_cb_t server_connection_event_cb
doca_comch_task_send_completion_cb_t send_task_comp_err_cb
doca_comch_event_msg_recv_cb_t msg_recv_cb
doca_comch_task_send_completion_cb_t send_task_comp_cb
doca_comch_event_consumer_cb_t expired_consumer_cb
doca_ctx_state_changed_callback_t ctx_state_changed_cb
doca_comch_event_connection_status_changed_cb_t server_disconnection_event_cb
doca_comch_event_consumer_cb_t new_consumer_cb