42 #define CC_REC_QUEUE_SIZE 10
43 #define CC_SEND_TASK_NUM 1024
59 const char *dev_pci_addr = (
char *)param;
65 DOCA_LOG_ERR(
"Entered device PCI address exceeding the maximum size of %d",
71 strncpy(
cfg->comch_dev_pci_addr, dev_pci_addr,
len + 1);
86 const char *rep_pci_addr = (
char *)param;
92 DOCA_LOG_ERR(
"Entered device representor PCI address exceeding the maximum size of %d",
98 strncpy(
cfg->comch_dev_rep_pci_addr, rep_pci_addr,
len + 1);
113 const char *txt = (
char *)param;
123 strncpy(conf->
text, txt, txt_len + 1);
133 struct doca_argp_param *dev_pci_addr_param, *text_param, *rep_pci_addr_param;
161 "DOCA Comm Channel device representor PCI address (needed only on DPU)");
194 if (client !=
NULL) {
208 struct doca_dev *hw_dev,
210 struct doca_comch_client **client,
214 struct doca_ctx *
ctx;
216 uint32_t max_msg_size;
319 if (server !=
NULL) {
333 struct doca_dev *hw_dev,
334 struct doca_dev_rep *rep_dev,
336 struct doca_comch_server **server,
341 struct doca_ctx *
ctx;
342 uint32_t max_msg_size;
#define CC_REC_QUEUE_SIZE
doca_error_t register_comch_params(void)
static doca_error_t pci_addr_callback(void *param, void *config)
static doca_error_t text_callback(void *param, void *config)
DOCA_LOG_REGISTER(COMCH_CTRL_PATH_COMMON)
static doca_error_t rep_pci_addr_callback(void *param, void *config)
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
DOCA_EXPERIMENTAL void doca_argp_param_set_description(struct doca_argp_param *param, const char *description)
Set the description of the program param, used during program usage.
DOCA_EXPERIMENTAL void doca_argp_param_set_long_name(struct doca_argp_param *param, const char *name)
Set the long name of the program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_callback(struct doca_argp_param *param, doca_argp_param_cb_t callback)
Set the callback function of the program param.
DOCA_EXPERIMENTAL doca_error_t doca_argp_param_create(struct doca_argp_param **param)
Create new program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_type(struct doca_argp_param *param, enum doca_argp_type type)
Set the type of the param arguments.
DOCA_EXPERIMENTAL void doca_argp_param_set_short_name(struct doca_argp_param *param, const char *name)
Set the short name of the program param.
DOCA_EXPERIMENTAL doca_error_t doca_argp_register_param(struct doca_argp_param *input_param)
Register a program flag.
DOCA_STABLE doca_error_t doca_comch_client_set_max_msg_size(struct doca_comch_client *comch_client, uint32_t size)
DOCA_STABLE doca_error_t doca_comch_server_event_msg_recv_register(struct doca_comch_server *comch_server, doca_comch_event_msg_recv_cb_t recv_event_cb)
Configure the doca_comch recv event callback for server context.
DOCA_STABLE doca_error_t doca_comch_server_event_connection_status_changed_register(struct doca_comch_server *comch_server, doca_comch_event_connection_status_changed_cb_t connect_event_cb, doca_comch_event_connection_status_changed_cb_t disconnect_event_cb)
Configure the doca_comch recv event callback for server context.
DOCA_STABLE doca_error_t doca_comch_client_event_consumer_register(struct doca_comch_client *comch_client, doca_comch_event_consumer_cb_t new_consumer_event_cb, doca_comch_event_consumer_cb_t expired_consumer_event_cb)
Configure the doca_comch callback for for receiving consumer events on client context.
DOCA_STABLE doca_error_t doca_comch_client_set_recv_queue_size(struct doca_comch_client *comch_client, uint32_t size)
DOCA_STABLE struct doca_ctx * doca_comch_client_as_ctx(struct doca_comch_client *comch_client)
DOCA_STABLE doca_error_t doca_comch_server_event_consumer_register(struct doca_comch_server *comch_server, doca_comch_event_consumer_cb_t new_consumer_event_cb, doca_comch_event_consumer_cb_t expired_consumer_event_cb)
Configure the doca_comch callback for for receiving consumer events on server context.
DOCA_STABLE doca_error_t doca_comch_cap_get_max_msg_size(const struct doca_devinfo *devinfo, uint32_t *size)
DOCA_STABLE doca_error_t doca_comch_server_destroy(struct doca_comch_server *comch_server)
DOCA_STABLE doca_error_t doca_comch_server_task_send_set_conf(struct doca_comch_server *comch_server, doca_comch_task_send_completion_cb_t task_completion_cb, doca_comch_task_send_completion_cb_t task_error_cb, uint32_t num_send_tasks)
DOCA_STABLE doca_error_t doca_comch_client_task_send_set_conf(struct doca_comch_client *comch_client, doca_comch_task_send_completion_cb_t task_completion_cb, doca_comch_task_send_completion_cb_t task_error_cb, uint32_t num_send_tasks)
DOCA_STABLE doca_error_t doca_comch_server_set_recv_queue_size(struct doca_comch_server *comch_server, uint32_t size)
DOCA_STABLE doca_error_t doca_comch_client_event_msg_recv_register(struct doca_comch_client *comch_client, doca_comch_event_msg_recv_cb_t recv_event_cb)
Configure the doca_comch recv event callback for client context.
DOCA_STABLE doca_error_t doca_comch_client_destroy(struct doca_comch_client *comch_client)
DOCA_STABLE doca_error_t doca_comch_server_create(struct doca_dev *dev, struct doca_dev_rep *repr, const char *name, struct doca_comch_server **comch_server)
DOCA_STABLE doca_error_t doca_comch_server_set_max_msg_size(struct doca_comch_server *comch_server, uint32_t size)
DOCA_STABLE doca_error_t doca_comch_client_create(struct doca_dev *dev, const char *name, struct doca_comch_client **comch_client)
DOCA_STABLE struct doca_ctx * doca_comch_server_as_ctx(struct doca_comch_server *comch_server)
DOCA_STABLE doca_error_t doca_ctx_start(struct doca_ctx *ctx)
Finalizes all configurations, and starts the DOCA CTX.
DOCA_STABLE doca_error_t doca_ctx_set_state_changed_cb(struct doca_ctx *ctx, doca_ctx_state_changed_callback_t cb)
Set state changed callback.
DOCA_STABLE doca_error_t doca_ctx_set_user_data(struct doca_ctx *ctx, union doca_data user_data)
set user data to context
#define DOCA_DEVINFO_PCI_ADDR_SIZE
Buffer size to hold PCI BDF format: "XXXX:XX:XX.X". Including a null terminator.
DOCA_STABLE struct doca_devinfo * doca_dev_as_devinfo(const struct doca_dev *dev)
Get local device info from device. This should be useful when wanting to query information about devi...
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE const char * doca_error_get_name(doca_error_t error)
Returns the string representation of an error code name.
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
@ DOCA_ERROR_INVALID_VALUE
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
DOCA_STABLE doca_error_t doca_pe_destroy(struct doca_pe *pe)
Destroy doca progress engine.
DOCA_STABLE doca_error_t doca_pe_connect_ctx(struct doca_pe *pe, struct doca_ctx *ctx)
This method connects a context to a progress engine.
DOCA_STABLE doca_error_t doca_pe_create(struct doca_pe **pe)
Creates DOCA progress engine.
const struct ip_frag_config * cfg
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
Convenience type for representing opaque data.
struct upf_accel_ctx * ctx