| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Modules | |
| DOCA Comch Consumer | |
| DOCA Comch MsgQ | |
| DOCA Comch Producer | |
Typedefs | |
| typedef 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) |
| typedef 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) |
| typedef 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) |
| typedef void(* | doca_comch_event_consumer_cb_t) (struct doca_comch_event_consumer *event, struct doca_comch_connection *comch_connection, uint32_t id) |
Enumerations | |
| enum | doca_comch_counter { DOCA_COMCH_COUNTER_SENT_MESSAGES = 1 , DOCA_COMCH_COUNTER_SENT_BYTES = 2 , DOCA_COMCH_COUNTER_RECV_MESSAGES = 3 , DOCA_COMCH_COUNTER_RECV_BYTES = 4 } |
Functions | |
| DOCA_STABLE doca_error_t | doca_comch_connection_set_user_data (struct doca_comch_connection *connection, union doca_data user_data) |
| DOCA_STABLE union doca_data | doca_comch_connection_get_user_data (const struct doca_comch_connection *connection) |
| DOCA_STABLE struct doca_comch_server * | doca_comch_server_get_server_ctx (const struct doca_comch_connection *connection) |
| DOCA_STABLE struct doca_comch_client * | doca_comch_client_get_client_ctx (const struct doca_comch_connection *connection) |
| DOCA_STABLE doca_error_t | doca_comch_cap_get_max_name_len (const struct doca_devinfo *devinfo, uint32_t *max_name_len) |
| 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_cap_get_max_recv_queue_size (const struct doca_devinfo *devinfo, uint32_t *size) |
| DOCA_STABLE doca_error_t | doca_comch_cap_get_max_clients (const struct doca_devinfo *devinfo, uint32_t *num_clients) |
| 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_destroy (struct doca_comch_server *comch_server) |
| DOCA_STABLE doca_error_t | doca_comch_cap_server_is_supported (const struct doca_devinfo *devinfo) |
| 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_server_get_max_msg_size (const struct doca_comch_server *comch_server, uint32_t *size) |
| 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_server_get_recv_queue_size (const struct doca_comch_server *comch_server, uint32_t *size) |
| DOCA_STABLE doca_error_t | doca_comch_server_get_device (const struct doca_comch_server *comch_server, struct doca_dev **dev) |
| DOCA_STABLE doca_error_t | doca_comch_server_get_device_rep (const struct doca_comch_server *comch_server, struct doca_dev_rep **rep) |
| DOCA_STABLE struct doca_ctx * | doca_comch_server_as_ctx (struct doca_comch_server *comch_server) |
| DOCA_STABLE doca_error_t | doca_comch_server_disconnect (struct doca_comch_server *comch_server, struct doca_comch_connection *connection) |
| DOCA_STABLE doca_error_t | doca_comch_client_create (struct doca_dev *dev, const char *name, struct doca_comch_client **comch_client) |
| DOCA_STABLE doca_error_t | doca_comch_client_destroy (struct doca_comch_client *comch_client) |
| DOCA_STABLE doca_error_t | doca_comch_cap_client_is_supported (const struct doca_devinfo *devinfo) |
| 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_client_get_max_msg_size (const struct doca_comch_client *comch_client, uint32_t *size) |
| DOCA_STABLE doca_error_t | doca_comch_client_set_recv_queue_size (struct doca_comch_client *comch_client, uint32_t size) |
| DOCA_STABLE doca_error_t | doca_comch_client_get_recv_queue_size (const struct doca_comch_client *comch_client, uint32_t *size) |
| DOCA_STABLE doca_error_t | doca_comch_client_get_device (const struct doca_comch_client *comch_client, struct doca_dev **dev) |
| DOCA_STABLE struct doca_ctx * | doca_comch_client_as_ctx (struct doca_comch_client *comch_client) |
| DOCA_STABLE doca_error_t | doca_comch_client_get_connection (const struct doca_comch_client *comch_client, struct doca_comch_connection **connection) |
| DOCA_STABLE doca_error_t | doca_comch_cap_get_max_send_tasks (const struct doca_devinfo *devinfo, uint32_t *max_send_tasks) |
| 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_task_send_alloc_init (struct doca_comch_server *comch_server, struct doca_comch_connection *peer, const void *msg, uint32_t len, struct doca_comch_task_send **task) |
| DOCA_STABLE doca_error_t | doca_comch_client_task_send_alloc_init (struct doca_comch_client *comch_client, struct doca_comch_connection *peer, const void *msg, uint32_t len, struct doca_comch_task_send **task) |
| DOCA_STABLE struct doca_task * | doca_comch_task_send_as_task (struct doca_comch_task_send *task) |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| DOCA_STABLE doca_error_t | doca_comch_connection_update_info (struct doca_comch_connection *comch_connection) |
| update statistics for given comch_connection More... | |
| DOCA_STABLE doca_error_t | doca_comch_connection_get_counter (const struct doca_comch_connection *comch_connection, enum doca_comch_counter counter_type, uint64_t *counter_value) |
| get statistics counter for a given comch_connection More... | |
| 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. More... | |
| 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. More... | |
DOCA Communication Channel library let you set a direct communication channel between the host and the DPU. The channel is run over RoCE/IB protocol and is not part of the TCP/IP stack. Please follow the programmer guide for usage instructions.
| typedef 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) |
Function executed on a doca_comch connection event.
| [in] | event | Doca_comch connection event that has triggered. |
| [in] | comch_connection | Pointer to the peer which triggered the connection event. |
| [in] | change_successful | 1 if the action (connect/disconnect) was successful, 0 otherwise. |
The implementation can assume these values are not NULL.
Definition at line 778 of file doca_comch.h.
| typedef void(* doca_comch_event_consumer_cb_t) (struct doca_comch_event_consumer *event, struct doca_comch_connection *comch_connection, uint32_t id) |
Function executed on a doca_comch consumer event.
| [in] | event | Doca_comch consumer event that has triggered. |
| [in] | comch_connection | Pointer to the comch_connection which triggered that has generated the consumer event. |
| [in] | id | The ID of the newly created or destroyed consumer. |
The implementation can assume these values are not NULL.
Definition at line 874 of file doca_comch.h.
| typedef 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) |
Function executed on a doca_comch receive message event.
| [in] | event | Doca_comch recv message event that has triggered. |
| [in] | recv_buffer | Pointer to the message data associated with the event. |
| [in] | msg_len | Length of the message data associated with the event. |
| [in] | comch_connection | Pointer to the connection instance that generated the message event. |
The implementation can assume these values are not NULL.
Definition at line 718 of file doca_comch.h.
| typedef 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) |
Function executed on doca_comch send task completion. Used for both task success and failure.
| [in] | task | DOCA Comch send task that has completed. |
| [in] | task_user_data | The task user data. |
| [in] | ctx_user_data | Doca_comch context user data. |
The implementation can assume this value is not NULL.
Definition at line 563 of file doca_comch.h.
| enum doca_comch_counter |
Available counters for connection statistics query
| Enumerator | |
|---|---|
| DOCA_COMCH_COUNTER_SENT_MESSAGES | |
| DOCA_COMCH_COUNTER_SENT_BYTES | |
| DOCA_COMCH_COUNTER_RECV_MESSAGES | |
| DOCA_COMCH_COUNTER_RECV_BYTES | |
Definition at line 809 of file doca_comch.h.
| DOCA_STABLE doca_error_t doca_comch_cap_client_is_supported | ( | const struct doca_devinfo * | devinfo | ) |
Check if given device is capable of running a comm channel client.
| [in] | devinfo | The DOCA device information. |
| DOCA_STABLE doca_error_t doca_comch_cap_get_max_clients | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | num_clients | ||
| ) |
Get the maximal number of clients that can be connected to a single doca_comch server.
| [in] | devinfo | devinfo to query the capability for. |
| [out] | num_clients | The number of clients that can be connected to a single doca_comch server. |
| DOCA_STABLE doca_error_t doca_comch_cap_get_max_msg_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | size | ||
| ) |
Get the maximum message size that can be used on any comm channel instance.
| [in] | devinfo | devinfo to query the capability for. |
| [out] | size | The maximum size of a message available on any cc instance. |
| DOCA_STABLE doca_error_t doca_comch_cap_get_max_name_len | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_name_len | ||
| ) |
Get the maximum name length that can be used in a cc instance.
| [in] | devinfo | devinfo to query the capability for. |
| [out] | max_name_len | The cc max name length, including the terminating null byte ('\0'). |
| DOCA_STABLE doca_error_t doca_comch_cap_get_max_recv_queue_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | size | ||
| ) |
Get the maximal recv queue size that can be used on any comm channel instance.
| [in] | devinfo | devinfo to query the capability for. |
| [out] | size | The maximal recv queue size supported on any cc instance. |
| DOCA_STABLE doca_error_t doca_comch_cap_get_max_send_tasks | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_send_tasks | ||
| ) |
Get the maximal send tasks num that can be used on any cc instance.
| [in] | devinfo | devinfo to query the capability for. |
| [out] | max_send_tasks | The maximal supported number of send tasks for any cc instance. |
| DOCA_STABLE doca_error_t doca_comch_cap_server_is_supported | ( | const struct doca_devinfo * | devinfo | ) |
Check if given device is capable of running a comm channel server.
| [in] | devinfo | The DOCA device information. |
| DOCA_STABLE struct doca_ctx* doca_comch_client_as_ctx | ( | struct doca_comch_client * | comch_client | ) |
Convert doca_comch instance into a generalized context for use with doca core objects.
| [in] | comch_client | DOCA Comch client instance. This must remain valid until after the context is no longer required. |
| DOCA_STABLE doca_error_t doca_comch_client_create | ( | struct doca_dev * | dev, |
| const char * | name, | ||
| struct doca_comch_client ** | comch_client | ||
| ) |
Create a DOCA Comch client instance.
| [in] | dev | Device to use in DOCA Comch client instance. |
| [in] | name | Identifier for the server the client will connect to. Max length, including terminating '\0', is obtained by doca_comch_cap_get_max_name_len(). |
| [out] | comch_client | Pointer to pointer to be set to created doca_comch client instance. |
| DOCA_STABLE doca_error_t doca_comch_client_destroy | ( | struct doca_comch_client * | comch_client | ) |
Destroy a DOCA Comch client instance.
| [in] | comch_client | DOCA Comch client instance to be destroyed. |
| 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.
| [in] | comch_client | Pointer to doca_comch_client instance. |
| [in] | new_consumer_event_cb | Consumer event callback on creation of a new consumer. |
| [in] | expired_consumer_event_cb | Consumer event callback on when a consumer has expired. |
| 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.
| [in] | comch_client | Pointer to doca_comch_client instance. |
| [in] | recv_event_cb | Recv event callback. |
| DOCA_STABLE struct doca_comch_client* doca_comch_client_get_client_ctx | ( | const struct doca_comch_connection * | connection | ) |
Get the doca_comch_client context from a given connection.
| [in] | connection | DOCA Comch connection instance. |
| DOCA_STABLE doca_error_t doca_comch_client_get_connection | ( | const struct doca_comch_client * | comch_client, |
| struct doca_comch_connection ** | connection | ||
| ) |
Get the connection object associated with the client ctx. Can only be called after starting the ctx.
| [in] | comch_client | DOCA Comch client instance. |
| [out] | connection | The connection object associated with the client. |
| DOCA_STABLE doca_error_t doca_comch_client_get_device | ( | const struct doca_comch_client * | comch_client, |
| struct doca_dev ** | dev | ||
| ) |
Get the doca device property of the associated doca_comch instance.
| [in] | comch_client | DOCA Comch client instance. |
| [out] | dev | Current device used in the doca_comch instance. |
| DOCA_STABLE doca_error_t doca_comch_client_get_max_msg_size | ( | const struct doca_comch_client * | comch_client, |
| uint32_t * | size | ||
| ) |
Get the maximum message size that can be sent on the comm channel instance.
| [in] | comch_client | DOCA Comch client instance. |
| [out] | size | The maximum size of a message for the instance. |
| DOCA_STABLE doca_error_t doca_comch_client_get_recv_queue_size | ( | const struct doca_comch_client * | comch_client, |
| uint32_t * | size | ||
| ) |
Get the recv queue size property set on the doca_comch instance.
| [in] | comch_client | DOCA Comch client instance. |
| [out] | size | The recv queue size for the instance. |
| DOCA_STABLE doca_error_t doca_comch_client_set_max_msg_size | ( | struct doca_comch_client * | comch_client, |
| uint32_t | size | ||
| ) |
Set the maximum message size property for the doca_comch instance. If not called, a default value will be used and can be queried using doca_comch_client_get_max_msg_size().
| [in] | comch_client | DOCA Comch client instance. |
| [in] | size | The maximum size of a message to set for the instance. Can be queried with doca_comch_cap_get_max_msg_size(). |
| DOCA_STABLE doca_error_t doca_comch_client_set_recv_queue_size | ( | struct doca_comch_client * | comch_client, |
| uint32_t | size | ||
| ) |
Set the recv queue size property for the doca_comch instance. If not called, a default value will be used and can be queried using doca_comch_client_get_recv_queue_size().
| [in] | comch_client | DOCA Comch client instance. |
| [in] | size | The recv queue size to set for the instance. Limit can be queried with doca_comch_cap_get_max_recv_queue_size(). |
| DOCA_STABLE doca_error_t doca_comch_client_task_send_alloc_init | ( | struct doca_comch_client * | comch_client, |
| struct doca_comch_connection * | peer, | ||
| const void * | msg, | ||
| uint32_t | len, | ||
| struct doca_comch_task_send ** | task | ||
| ) |
Allocate and initialize a doca_comch_client send task.
| [in] | comch_client | The doca_comch_client instance. |
| [in] | peer | Connected endpoint to send the message to. |
| [in] | msg | Message or data to sent to associated peer. |
| [in] | len | Length of the message to send. |
| [out] | task | Pointer to a doca_comch_send_task instance populated with input parameters. |
| 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 | ||
| ) |
Configure the doca_comch_client send task callback and parameters.
| [in] | comch_client | The doca_comch_client instance. |
| [in] | task_completion_cb | Send task completion callback. |
| [in] | task_error_cb | Send task error callback. |
| [in] | num_send_tasks | Number of send tasks to create. |
| DOCA_STABLE doca_error_t doca_comch_connection_get_counter | ( | const struct doca_comch_connection * | comch_connection, |
| enum doca_comch_counter | counter_type, | ||
| uint64_t * | counter_value | ||
| ) |
get statistics counter for a given comch_connection
This function will return statistics for a given comch_connection, updated to the last time doca_comch_connection_update_info() was called.
| [in] | comch_connection | Pointer to comch_connection to query statistics for. |
| [in] | counter_type | Which statistics counter should be queried. |
| [out] | counter_value | Will contain the value for the counter on the given comch_connection. |
| DOCA_STABLE union doca_data doca_comch_connection_get_user_data | ( | const struct doca_comch_connection * | connection | ) |
Get the user data from a given connection.
| [in] | connection | DOCA Comch connection instance. |
| DOCA_STABLE doca_error_t doca_comch_connection_set_user_data | ( | struct doca_comch_connection * | connection, |
| union doca_data | user_data | ||
| ) |
Set the user data for a given connection.
| [in] | connection | DOCA Comch connection instance. |
| [in] | user_data | User data for the given connection. |
| DOCA_STABLE doca_error_t doca_comch_connection_update_info | ( | struct doca_comch_connection * | comch_connection | ) |
update statistics for given comch_connection
Should be used before calling to any connection information function to update the saved statistics.
| [in] | comch_connection | Pointer to comch_connection to update statistics in. |
| DOCA_STABLE struct doca_ctx* doca_comch_server_as_ctx | ( | struct doca_comch_server * | comch_server | ) |
Convert doca_comch_server instance into a generalized context for use with doca core objects.
| [in] | comch_server | DOCA Comch server instance. This must remain valid until after the context is no longer required. |
| 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 | ||
| ) |
Create a DOCA Comch server instance.
| [in] | dev | Device to use in DOCA Comch server instance. |
| [in] | repr | Representor device to use in CC server instance. |
| [in] | name | Identifier for server associated with instance. Must be NULL terminated. Max length, including terminating '\0', is obtained by doca_comch_cap_get_max_name_len(). |
| [out] | comch_server | Pointer to pointer to be set to created doca_comch server instance. |
| DOCA_STABLE doca_error_t doca_comch_server_destroy | ( | struct doca_comch_server * | comch_server | ) |
Destroy a DOCA Comch server instance.
| [in] | comch_server | DOCA Comch server instance to be destroyed. |
| DOCA_STABLE doca_error_t doca_comch_server_disconnect | ( | struct doca_comch_server * | comch_server, |
| struct doca_comch_connection * | connection | ||
| ) |
Disconnect specific connection on doca_comch_server.
This function will notify the peer of the disconnection.
| [in] | comch_server | DOCA Comch server instance. |
| [out] | connection | Connection representing the remote peer to disconnect. |
| 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.
| [in] | comch_server | Pointer to doca_comch_server instance. |
| [in] | connect_event_cb | Callback for connect event. |
| [in] | disconnect_event_cb | Callback for disconnect event. |
| 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.
| [in] | comch_server | Pointer to doca_comch_server instance. |
| [in] | new_consumer_event_cb | Consumer event callback on creation of a new consumer. |
| [in] | expired_consumer_event_cb | Consumer event callback on when a consumer has expired. |
| 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.
| [in] | comch_server | Pointer to doca_comch_server instance. |
| [in] | recv_event_cb | Recv event callback. |
| DOCA_STABLE doca_error_t doca_comch_server_get_device | ( | const struct doca_comch_server * | comch_server, |
| struct doca_dev ** | dev | ||
| ) |
Get the doca device property of the associated doca_comch instance.
| [in] | comch_server | DOCA Comch server instance. |
| [out] | dev | Current device used in the doca_comch instance. |
| DOCA_STABLE doca_error_t doca_comch_server_get_device_rep | ( | const struct doca_comch_server * | comch_server, |
| struct doca_dev_rep ** | rep | ||
| ) |
Get the device representor property of the associated doca_comch server instance.
| [in] | comch_server | DOCA Comch server instance. |
| [out] | rep | Current device representor used in the doca_comch server instance. |
| DOCA_STABLE doca_error_t doca_comch_server_get_max_msg_size | ( | const struct doca_comch_server * | comch_server, |
| uint32_t * | size | ||
| ) |
Get the maximum message size that can be sent on the comm channel instance.
| [in] | comch_server | DOCA Comch server instance. |
| [out] | size | The maximum size of a message for the instance. |
| DOCA_STABLE doca_error_t doca_comch_server_get_recv_queue_size | ( | const struct doca_comch_server * | comch_server, |
| uint32_t * | size | ||
| ) |
Get the recv queue size property set on the doca_comch instance.
| [in] | comch_server | DOCA Comch server instance. |
| [out] | size | The recv queue size set for the instance. |
| DOCA_STABLE struct doca_comch_server* doca_comch_server_get_server_ctx | ( | const struct doca_comch_connection * | connection | ) |
Get the doca_comch_server context from a given connection.
| [in] | connection | DOCA Comch connection instance. |
| DOCA_STABLE doca_error_t doca_comch_server_set_max_msg_size | ( | struct doca_comch_server * | comch_server, |
| uint32_t | size | ||
| ) |
Set the maximum message size property for the doca_comch instance. If not called, a default value will be used and can be queried using doca_comch_server_get_max_msg_size().
| [in] | comch_server | DOCA Comch server instance. |
| [in] | size | The maximum size of a message to set for the instance. Can be queried with doca_comch_cap_get_max_msg_size(). |
| DOCA_STABLE doca_error_t doca_comch_server_set_recv_queue_size | ( | struct doca_comch_server * | comch_server, |
| uint32_t | size | ||
| ) |
Set the recv queue size property for the doca_comch instance. If not called, a default value will be used and can be queried using doca_comch_server_get_recv_queue_size().
| [in] | comch_server | DOCA Comch server instance. |
| [in] | size | The recv queue size set for the instance. Can be queried with doca_comch_cap_get_max_recv_queue_size(). |
| DOCA_STABLE doca_error_t doca_comch_server_task_send_alloc_init | ( | struct doca_comch_server * | comch_server, |
| struct doca_comch_connection * | peer, | ||
| const void * | msg, | ||
| uint32_t | len, | ||
| struct doca_comch_task_send ** | task | ||
| ) |
Allocate and initialize a doca_comch_server send task.
| [in] | comch_server | The doca_comch_server instance. |
| [in] | peer | Connected endpoint to send the message to. |
| [in] | msg | Message or data to sent to associated peer. |
| [in] | len | Length of the message to send. |
| [out] | task | Pointer to a doca_comch_send_task instance populated with input parameters. |
| 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 | ||
| ) |
Configure the doca_comch_server send task callback and parameters.
| [in] | comch_server | The doca_comch_server instance. |
| [in] | task_completion_cb | Send task completion callback. |
| [in] | task_error_cb | Send task error callback. |
| [in] | num_send_tasks | Number of send tasks to create. |
| DOCA_STABLE struct doca_task* doca_comch_task_send_as_task | ( | struct doca_comch_task_send * | task | ) |
Convert a doca_comch_send_task task to doca_task.
| [in] | task | Doca_comch_send_task task to convert. |