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

Typedefs | |
| typedef uint64_t | doca_dpa_dev_comch_consumer_completion_t |
| DPA handle for DPA consumer completion context. More... | |
| typedef uint64_t | doca_dpa_dev_comch_consumer_t |
| DPA handle for DPA consumer. More... | |
| typedef void(* | doca_comch_consumer_task_post_recv_completion_cb_t) (struct doca_comch_consumer_task_post_recv *task, union doca_data task_user_data, union doca_data ctx_user_data) |
Functions | |
| DOCA_STABLE doca_error_t | doca_comch_consumer_create (struct doca_comch_connection *comch_connection, struct doca_mmap *buf_mmap, struct doca_comch_consumer **consumer) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_destroy (struct doca_comch_consumer *consumer) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_cap_is_supported (const struct doca_devinfo *devinfo) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_get_id (const struct doca_comch_consumer *consumer, uint32_t *id) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_cap_get_max_num_tasks (const struct doca_devinfo *devinfo, uint32_t *max_num_tasks) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_cap_get_max_buf_size (const struct doca_devinfo *devinfo, uint32_t *max_buf_size) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_cap_get_max_buf_list_len (const struct doca_devinfo *devinfo, uint32_t *max_buf_list_len) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_cap_get_max_consumers (const struct doca_devinfo *devinfo, uint32_t *max_consumers) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_cap_get_max_imm_data_len (const struct doca_devinfo *devinfo, uint32_t *max_imm_data_len) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_get_imm_data_len (const struct doca_comch_consumer *consumer, uint32_t *imm_data_len) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_set_imm_data_len (struct doca_comch_consumer *consumer, uint32_t imm_data_len) |
| DOCA_STABLE struct doca_ctx * | doca_comch_consumer_as_ctx (struct doca_comch_consumer *consumer) |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_create (struct doca_comch_consumer_completion **consumer_comp) |
| Allocate DOCA Comch consumer completion context on DPA. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_set_dpa_thread (struct doca_comch_consumer_completion *consumer_comp, struct doca_dpa_thread *dpa_thread) |
| Set the DOCA DPA thread of the completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_destroy (struct doca_comch_consumer_completion *consumer_comp) |
| Destroy the DOCA Comch consumer completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_start (struct doca_comch_consumer_completion *consumer_comp) |
| Start DOCA Comch consumer completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_stop (struct doca_comch_consumer_completion *consumer_comp) |
| Stop DOCA Comch consumer completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_get_dpa_handle (struct doca_comch_consumer_completion *consumer_comp, doca_dpa_dev_comch_consumer_completion_t *consumer_comp_handle) |
| Get the DPA handle for the DOCA Comch consumer completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_set_max_num_consumers (struct doca_comch_consumer_completion *consumer_comp, uint32_t max_num_consumers) |
| Set the maximal number of consumers that can be associated with the completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_get_max_num_consumers (const struct doca_comch_consumer_completion *consumer_comp, uint32_t *max_num_consumers) |
| Get the maximal number of consumers that can be associated with the completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_set_max_num_recv (struct doca_comch_consumer_completion *consumer_comp, uint32_t max_num_recv) |
| Set the maximal number of receive operations across all consumers associated with the completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_get_max_num_recv (const struct doca_comch_consumer_completion *consumer_comp, uint32_t *max_num_recv) |
| Get the maximal number of receive operations across all consumers associated with the completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_set_imm_data_len (struct doca_comch_consumer_completion *consumer_comp, uint32_t imm_data_len) |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_completion_get_imm_data_len (const struct doca_comch_consumer_completion *consumer_comp, uint32_t *imm_data_len) |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_set_dev_max_num_recv (struct doca_comch_consumer *consumer, uint32_t dev_num_recv) |
| Set the maximal number of receive operations for a DPA consumer. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_set_completion (struct doca_comch_consumer *consumer, struct doca_comch_consumer_completion *consumer_comp, uint32_t user_data) |
| Associate consumer with DPA completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_comch_consumer_get_dpa_handle (struct doca_comch_consumer *consumer, doca_dpa_dev_comch_consumer_t *dpa_consumer) |
| Retrieve the handle in the dpa memory space of a doca_comch_consumer. More... | |
| DOCA_STABLE doca_error_t | doca_comch_consumer_task_post_recv_set_conf (struct doca_comch_consumer *consumer, doca_comch_consumer_task_post_recv_completion_cb_t task_completion_cb, doca_comch_consumer_task_post_recv_completion_cb_t task_error_cb, uint32_t num_post_recv_tasks) |
| DOCA_STABLE doca_error_t | doca_comch_consumer_task_post_recv_alloc_init (struct doca_comch_consumer *consumer, struct doca_buf *buf, struct doca_comch_consumer_task_post_recv **task) |
| Allocate and initialize a doca_consumer post receive task. More... | |
| DOCA_STABLE struct doca_buf * | doca_comch_consumer_task_post_recv_get_buf (const struct doca_comch_consumer_task_post_recv *task) |
| DOCA_STABLE void | doca_comch_consumer_task_post_recv_set_buf (struct doca_comch_consumer_task_post_recv *task, struct doca_buf *buf) |
| DOCA_STABLE uint32_t | doca_comch_consumer_task_post_recv_get_producer_id (const struct doca_comch_consumer_task_post_recv *task) |
| DOCA_STABLE const uint8_t * | doca_comch_consumer_task_post_recv_get_imm_data (const struct doca_comch_consumer_task_post_recv *task) |
| DOCA_STABLE uint32_t | doca_comch_consumer_task_post_recv_get_imm_data_len (const struct doca_comch_consumer_task_post_recv *task) |
| DOCA_STABLE struct doca_task * | doca_comch_consumer_task_post_recv_as_task (struct doca_comch_consumer_task_post_recv *task) |
DOCA Communication Channel Consumer offers an extension the doca_comch channel for accelerated data transfer between memory on the host and DPU in a FIFO format. An established doca_comch connection is required to negotiate the end points of the FIFO. A consumer object can then post buffers to a remote process that it wishes to receive data on. Completion of a consumer post receive message indicates that data has been populated from a remote producer. The inter-process communication runs over DMA/PCIe and does not affect network bandwidth.
| typedef void(* doca_comch_consumer_task_post_recv_completion_cb_t) (struct doca_comch_consumer_task_post_recv *task, union doca_data task_user_data, union doca_data ctx_user_data) |
Function executed on doca_comch_consumer post receive completion. Used for both task success and failure.
| [in] | task | Doca consumer post recv 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 557 of file doca_comch_consumer.h.
| typedef uint64_t doca_dpa_dev_comch_consumer_completion_t |
DPA handle for DPA consumer completion context.
Definition at line 60 of file doca_comch_consumer.h.
| typedef uint64_t doca_dpa_dev_comch_consumer_t |
DPA handle for DPA consumer.
Definition at line 65 of file doca_comch_consumer.h.
| DOCA_STABLE struct doca_ctx* doca_comch_consumer_as_ctx | ( | struct doca_comch_consumer * | consumer | ) |
Convert doca_comch_consumer instance into a generalized context for use with doca core objects.
| [in] | consumer | Doca_comch_consumer instance. This must remain valid until after the context is no longer required. |
| DOCA_STABLE doca_error_t doca_comch_consumer_cap_get_max_buf_list_len | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_buf_list_len | ||
| ) |
Get the max length of doca_buf list that can be received by a doca_comch_consumer instance.
| [in] | devinfo | Devinfo to query the capability for. |
| [out] | max_buf_list_len | Maximum sized buffer list that can be received by the consumer. |
| DOCA_STABLE doca_error_t doca_comch_consumer_cap_get_max_buf_size | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_buf_size | ||
| ) |
Get the max size doca_buf that can be received by a doca_comch_consumer instance.
| [in] | devinfo | Devinfo to query the capability for. |
| [out] | max_buf_size | Maximum sized buffer that can be received by the consumer. |
| DOCA_STABLE doca_error_t doca_comch_consumer_cap_get_max_consumers | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_consumers | ||
| ) |
Get the max number of consumers that can be associated with a doca_comch_connection.
| [in] | devinfo | Devinfo to query the capability for. |
| [out] | max_consumers | Maximum number of consumers that can be added to a doca_comch_connection. |
| DOCA_STABLE doca_error_t doca_comch_consumer_cap_get_max_imm_data_len | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_imm_data_len | ||
| ) |
Get the max length of immediate data supported by consumers.
| [in] | devinfo | Devinfo to query the capability for. |
| [out] | max_imm_data_len | Maximum length of immediate data consumers support. |
| DOCA_STABLE doca_error_t doca_comch_consumer_cap_get_max_num_tasks | ( | const struct doca_devinfo * | devinfo, |
| uint32_t * | max_num_tasks | ||
| ) |
Get the max number of tasks supported by the device for a doca_comch_consumer instance.
| [in] | devinfo | Devinfo to query the capability for. |
| [out] | max_num_tasks | The maximum number of tasks that can allocated by the instance. |
| DOCA_STABLE doca_error_t doca_comch_consumer_cap_is_supported | ( | const struct doca_devinfo * | devinfo | ) |
Check if given device is capable of running a consumer.
| [in] | devinfo | The DOCA device information. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_create | ( | struct doca_comch_consumer_completion ** | consumer_comp | ) |
Allocate DOCA Comch consumer completion context on DPA.
| [out] | consumer_comp | The newly created DOCA Comch consumer completion context. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_destroy | ( | struct doca_comch_consumer_completion * | consumer_comp | ) |
Destroy the DOCA Comch consumer completion context.
The associated dpa handle will be destroyed as well.
| [in] | consumer_comp | The DOCA Comch consumer completion context to destroy. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_get_dpa_handle | ( | struct doca_comch_consumer_completion * | consumer_comp, |
| doca_dpa_dev_comch_consumer_completion_t * | consumer_comp_handle | ||
| ) |
Get the DPA handle for the DOCA Comch consumer completion context.
| [in] | consumer_comp | The DOCA Comch consumer completion context previously created on DPA. |
| [out] | consumer_comp_handle | A pointer to the associated DPA handle in the dpa memory space. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_get_imm_data_len | ( | const struct doca_comch_consumer_completion * | consumer_comp, |
| uint32_t * | imm_data_len | ||
| ) |
Get the length of immediate data supported by a consumer completion context.
| [in] | consumer_comp | The DOCA Comch consumer completion context to query. |
| [out] | imm_data_len | Length of immediate data the consumer completion context is configured to support. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_get_max_num_consumers | ( | const struct doca_comch_consumer_completion * | consumer_comp, |
| uint32_t * | max_num_consumers | ||
| ) |
Get the maximal number of consumers that can be associated with the completion context.
| [in] | consumer_comp | The DOCA Comch consumer completion context to query. |
| [out] | max_num_consumers | The maximal number of consumers that can be associated with the context. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_get_max_num_recv | ( | const struct doca_comch_consumer_completion * | consumer_comp, |
| uint32_t * | max_num_recv | ||
| ) |
Get the maximal number of receive operations across all consumers associated with the completion context.
| [in] | consumer_comp | The DOCA Comch consumer completion context to query. |
| [out] | max_num_recv | The maximal number of recv that can be associated with the context. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_set_dpa_thread | ( | struct doca_comch_consumer_completion * | consumer_comp, |
| struct doca_dpa_thread * | dpa_thread | ||
| ) |
Set the DOCA DPA thread of the completion context.
This thread will receive notifications for completions.
| [in] | consumer_comp | The DOCA Comch consumer completion context. |
| [in] | dpa_thread | The DOCA dpa thread to be associated with the completion context. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_set_imm_data_len | ( | struct doca_comch_consumer_completion * | consumer_comp, |
| uint32_t | imm_data_len | ||
| ) |
Set the length of immediate data supported by a consumer completion context.
The immediate data length of the consumer completion must be greater or equal to that of any associated consumer.
| [in] | consumer_comp | The DOCA Comch consumer completion context to modify. |
| [in] | imm_data_len | Length of immediate data to configure in the consumer completion context. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_set_max_num_consumers | ( | struct doca_comch_consumer_completion * | consumer_comp, |
| uint32_t | max_num_consumers | ||
| ) |
Set the maximal number of consumers that can be associated with the completion context.
| [in] | consumer_comp | The DOCA Comch consumer completion context to modify. |
| [in] | max_num_consumers | The maximal number of consumers that can be associated with the context. Will be rounded up to next power of 2 |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_set_max_num_recv | ( | struct doca_comch_consumer_completion * | consumer_comp, |
| uint32_t | max_num_recv | ||
| ) |
Set the maximal number of receive operations across all consumers associated with the completion context.
| [in] | consumer_comp | The DOCA Comch consumer completion context to modify. |
| [in] | max_num_recv | The maximal number of recv that can be associated with the context. Will be rounded up to next power of 2 |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_start | ( | struct doca_comch_consumer_completion * | consumer_comp | ) |
Start DOCA Comch consumer completion context.
On start verifies and finalizes the completion context configuration.
The following is possible for started completion context:
The following is NOT possible while completion context is started:
| [in] | consumer_comp | The DOCA Comch consumer completion context to start. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_completion_stop | ( | struct doca_comch_consumer_completion * | consumer_comp | ) |
Stop DOCA Comch consumer completion context.
On stop prevents execution of different operations and allows operations that were available before start. For details see doca_comch_consumer_completion_start(). Completion context can't be stopped while there are DOCA Comch consumers associated with it.
The following is possible for stopped completion context:
The following is NOT possible while completion context is stopped:
| [in] | consumer_comp | The DOCA Comch consumer completion context to stop. |
| DOCA_STABLE doca_error_t doca_comch_consumer_create | ( | struct doca_comch_connection * | comch_connection, |
| struct doca_mmap * | buf_mmap, | ||
| struct doca_comch_consumer ** | consumer | ||
| ) |
Create a DOCA Comch consumer instance.
| [in] | comch_connection | An established control channel connection to create consumer across. |
| [in] | buf_mmap | A registered mmap for the memory region the consumer allows buffer writes to. |
| [out] | consumer | Pointer to pointer to be set to created doca_comch_consumer instance. |
| DOCA_STABLE doca_error_t doca_comch_consumer_destroy | ( | struct doca_comch_consumer * | consumer | ) |
Destroy a DOCA Comch consumer instance.
| [in] | consumer | Pointer to doca_comch_consumer instance to destroy. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_get_dpa_handle | ( | struct doca_comch_consumer * | consumer, |
| doca_dpa_dev_comch_consumer_t * | dpa_consumer | ||
| ) |
Retrieve the handle in the dpa memory space of a doca_comch_consumer.
| [in] | consumer | doca_comch_consumer context to get the dpa handle from. |
| [out] | dpa_consumer | A pointer to the handle in the dpa memory space. |
| DOCA_STABLE doca_error_t doca_comch_consumer_get_id | ( | const struct doca_comch_consumer * | consumer, |
| uint32_t * | id | ||
| ) |
Get the id the doca_comch_consumer instance.
| [in] | consumer | The doca_comch_consumer instance. |
| [out] | id | Per comch_connection unique id associated with the consumer instance. |
| DOCA_STABLE doca_error_t doca_comch_consumer_get_imm_data_len | ( | const struct doca_comch_consumer * | consumer, |
| uint32_t * | imm_data_len | ||
| ) |
Get the length of immediate data supported by a consumer.
| [in] | consumer | Consumer to query. |
| [out] | imm_data_len | Length of immediate data the consumer is configured to support. |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_set_completion | ( | struct doca_comch_consumer * | consumer, |
| struct doca_comch_consumer_completion * | consumer_comp, | ||
| uint32_t | user_data | ||
| ) |
Associate consumer with DPA completion context.
This will allow the completion context to receive completions of this consumer on the DPA
| [in] | consumer | The doca_comch_consumer instance. Must call doca_ctx_set_datapath_on_dpa() prior to this call |
| [in] | consumer_comp | The DOCA Comch consumer completion context to associate with consumer |
| [in] | user_data | User data that can be retrieved in DPA from completion elements returned by this consumer |
| DOCA_EXPERIMENTAL doca_error_t doca_comch_consumer_set_dev_max_num_recv | ( | struct doca_comch_consumer * | consumer, |
| uint32_t | dev_num_recv | ||
| ) |
Set the maximal number of receive operations for a DPA consumer.
| [in] | consumer | The doca_comch_consumer instance. |
| [in] | dev_num_recv | The maximal number of recv that can be associated with the context. Will be rounded up to next power of 2 |
| DOCA_STABLE doca_error_t doca_comch_consumer_set_imm_data_len | ( | struct doca_comch_consumer * | consumer, |
| uint32_t | imm_data_len | ||
| ) |
Set the length of immediate data supported by a consumer.
Length must be less than or equal to that returned by doca_comch_consumer_cap_get_max_imm_data_len().
| [in] | consumer | Consumer to set length of. |
| [in] | imm_data_len | Length of immediate data to configure in the consumer. |
| DOCA_STABLE doca_error_t doca_comch_consumer_task_post_recv_alloc_init | ( | struct doca_comch_consumer * | consumer, |
| struct doca_buf * | buf, | ||
| struct doca_comch_consumer_task_post_recv ** | task | ||
| ) |
Allocate and initialize a doca_consumer post receive task.
Doca buffer should be located within the registered mmap associated with consumer instance. Completion callback will be triggered whenever the buffer has been populated by a consumer.
| [in] | consumer | The doca_comch_consumer instance. |
| [in] | buf | Doca buffer available to be populated by producers. |
| [out] | task | Pointer to a doca_comch_consumer_task_post_recv instance populated with input parameters. |
| DOCA_STABLE struct doca_task* doca_comch_consumer_task_post_recv_as_task | ( | struct doca_comch_consumer_task_post_recv * | task | ) |
Convert doca_comch_consumer_task_post_recv instance into a generalized task for use with progress engine.
| [in] | task | The doca_comch_consumer_task_post_recv instance. |
| DOCA_STABLE struct doca_buf* doca_comch_consumer_task_post_recv_get_buf | ( | const struct doca_comch_consumer_task_post_recv * | task | ) |
Get the doca_buf from the doca_comch_consumer_task_post_recv instance.
| [in] | task | The doca_comch_consumer_task_post_recv instance. |
| DOCA_STABLE const uint8_t* doca_comch_consumer_task_post_recv_get_imm_data | ( | const struct doca_comch_consumer_task_post_recv * | task | ) |
Get a pointer to any immediate data from the doca_comch_consumer_task_post_recv instance.
Immediate data will only be set on post recv completion. doca_comch_consumer_task_post_recv_get_imm_data_len() indicates the number of valid bits pointed to.
| [in] | task | The doca_comch_consumer_task_post_recv instance. |
| DOCA_STABLE uint32_t doca_comch_consumer_task_post_recv_get_imm_data_len | ( | const struct doca_comch_consumer_task_post_recv * | task | ) |
Get the length of any immediate data from the doca_comch_consumer_task_post_recv instance.
Immediate data length will only be set on post recv completion. It indicates the valid number of bytes in the pointer return by doca_comch_consumer_task_post_recv_get_imm_data().
| [in] | task | The doca_comch_consumer_task_post_recv instance. |
| DOCA_STABLE uint32_t doca_comch_consumer_task_post_recv_get_producer_id | ( | const struct doca_comch_consumer_task_post_recv * | task | ) |
Get the producer id from the doca_comch_consumer_task_post_recv instance.
Producer id will only be set on post recv completion and indicates the remote producer that has written data to the associated doca_buf.
| [in] | task | The doca_comch_consumer_task_post_recv instance. |
| DOCA_STABLE void doca_comch_consumer_task_post_recv_set_buf | ( | struct doca_comch_consumer_task_post_recv * | task, |
| struct doca_buf * | buf | ||
| ) |
Set the doca_buf in a doca_comch_consumer_task_post_recv instance.
| [in] | task | The doca_comch_consumer_task_post_recv instance. |
| [in] | buf | Buffer to set in the task. |
| DOCA_STABLE doca_error_t doca_comch_consumer_task_post_recv_set_conf | ( | struct doca_comch_consumer * | consumer, |
| doca_comch_consumer_task_post_recv_completion_cb_t | task_completion_cb, | ||
| doca_comch_consumer_task_post_recv_completion_cb_t | task_error_cb, | ||
| uint32_t | num_post_recv_tasks | ||
| ) |
Configure the doca_comch_consumer post receive task callback and parameters.
| [in] | consumer | The doca_comch_consumer instance. |
| [in] | task_completion_cb | Post receive task completion callback. |
| [in] | task_error_cb | Post receive task error callback. |
| [in] | num_post_recv_tasks | Number of post_recv tasks a consumer can allocate. Must not exceed value returned by doca_comch_consumer_cap_get_max_num_tasks(). |