NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA Comch MsgQ
Collaboration diagram for DOCA Comch MsgQ:

Functions

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_create (struct doca_dev *dev, struct doca_comch_msgq **msgq)
 Create a DOCA Comch MsgQ instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_destroy (struct doca_comch_msgq *msgq)
 Destroy a DOCA Comch MsgQ instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_dpa_consumer (struct doca_comch_msgq *msgq, struct doca_dpa *dpa)
 Set consumers to DPA. All consumers on this MsgQ will be created for DPA. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_max_num_consumers (struct doca_comch_msgq *msgq, uint32_t max_num_consumers)
 Set the maximal number of consumers that can be created using this MsgQ. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_dpa_producer (struct doca_comch_msgq *msgq, struct doca_dpa *dpa)
 Set producers to DPA. All producers on this MsgQ will be created for DPA. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_max_num_producers (struct doca_comch_msgq *msgq, uint32_t max_num_producers)
 Set the maximal number of producers that can be created using this MsgQ. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_start (struct doca_comch_msgq *msgq)
 Start DOCA Comch MsgQ. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_stop (struct doca_comch_msgq *msgq)
 Stop DOCA Comch MsgQ. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_consumer_create (struct doca_comch_msgq *msgq, struct doca_comch_consumer **consumer)
 Create a DOCA Comch consumer instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_producer_create (struct doca_comch_msgq *msgq, struct doca_comch_producer **producer)
 Create a DOCA Comch producer instance. More...
 

Detailed Description

DOCA Communication Channel MsgQ library lets you set a direct communication channel between Host/DPU and DPA. The channel is not part of the TCP/IP stack. Please follow the programmer guide for usage instructions.

Function Documentation

◆ doca_comch_msgq_consumer_create()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_consumer_create ( struct doca_comch_msgq *  msgq,
struct doca_comch_consumer **  consumer 
)

Create a DOCA Comch consumer instance.

Parameters
[in]msgqThe DOCA Comch MsgQ to be used for creating the consumer
[out]consumerPointer to pointer to be set to created doca_comch_consumer instance.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_create()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_create ( struct doca_dev *  dev,
struct doca_comch_msgq **  msgq 
)

Create a DOCA Comch MsgQ instance.

Parameters
[in]devA DOCA device that will be used to send/receive the messages.
[out]msgqPointer to pointer to be set to created doca_comch_msgq instance.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_destroy ( struct doca_comch_msgq *  msgq)

Destroy a DOCA Comch MsgQ instance.

Parameters
[in]msgqThe DOCA Comch MsgQ to destroy.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_producer_create()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_producer_create ( struct doca_comch_msgq *  msgq,
struct doca_comch_producer **  producer 
)

Create a DOCA Comch producer instance.

Parameters
[in]msgqThe DOCA Comch MsgQ to be used for creating the producer
[out]producerPointer to pointer to be set to created doca_comch_producer instance.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_set_dpa_consumer()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_dpa_consumer ( struct doca_comch_msgq *  msgq,
struct doca_dpa *  dpa 
)

Set consumers to DPA. All consumers on this MsgQ will be created for DPA.

This configuration specifies that all consumers on this MsgQ will be created and used on this DPA instance. By default consumers are set on Host (or DPU).

Parameters
[in]msgqThe DOCA Comch MsgQ to modify.
[in]dpaThe DPA context that will use the consumers. Must be on same device as the MsgQ.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_set_dpa_producer()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_dpa_producer ( struct doca_comch_msgq *  msgq,
struct doca_dpa *  dpa 
)

Set producers to DPA. All producers on this MsgQ will be created for DPA.

This configuration specifies that all producers on this MsgQ will be created and used on this DPA instance. By default producers are set on Host (or DPU).

Parameters
[in]msgqThe DOCA Comch MsgQ to modify.
[in]dpaThe DPA context that will use the producers. Must be on same device as the MsgQ.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_set_max_num_consumers()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_max_num_consumers ( struct doca_comch_msgq *  msgq,
uint32_t  max_num_consumers 
)

Set the maximal number of consumers that can be created using this MsgQ.

Parameters
[in]msgqThe DOCA Comch MsgQ to modify.
[in]max_num_consumersThe maximal number of consumers that can be created.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_set_max_num_producers()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_set_max_num_producers ( struct doca_comch_msgq *  msgq,
uint32_t  max_num_producers 
)

Set the maximal number of producers that can be created using this MsgQ.

Parameters
[in]msgqThe DOCA Comch MsgQ to modify.
[in]max_num_producersThe maximal number of producers that can be created.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_start()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_start ( struct doca_comch_msgq *  msgq)

Start DOCA Comch MsgQ.

On start verifies and finalizes the MsgQ configuration.

The following is possible for started MsgQ:

  • Creating consumers and producers.

The following is NOT possible while completion context is started:

  • Setting the properties of the MsgQ
Parameters
[in]msgqThe DOCA Comch MsgQ to start.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_comch_msgq_stop()

DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_stop ( struct doca_comch_msgq *  msgq)

Stop DOCA Comch MsgQ.

On stop prevents execution of different operations and allows operations that were available before start. For details see doca_comch_msgq_start(). MsgQ can't be stopped while there are DOCA Comch consumers/producers associated with it.

The following is possible for stopped MsgQ:

  • Setting the properties of the MsgQ

The following is NOT possible while MsgQ is stopped:

  • Creating DOCA Comch consumers or producers from MsgQ.
Parameters
[in]msgqThe DOCA Comch MsgQ to stop.
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.