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.
◆ doca_comch_msgq_consumer_create()
Create a DOCA Comch consumer instance.
- Parameters
-
| [in] | msgq | The DOCA Comch MsgQ to be used for creating the consumer |
| [out] | consumer | Pointer 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()
Create a DOCA Comch MsgQ instance.
- Parameters
-
| [in] | dev | A DOCA device that will be used to send/receive the messages. |
| [out] | msgq | Pointer 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()
Destroy a DOCA Comch MsgQ instance.
- Parameters
-
| [in] | msgq | The 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()
Create a DOCA Comch producer instance.
- Parameters
-
| [in] | msgq | The DOCA Comch MsgQ to be used for creating the producer |
| [out] | producer | Pointer 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()
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] | msgq | The DOCA Comch MsgQ to modify. |
| [in] | dpa | The 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()
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] | msgq | The DOCA Comch MsgQ to modify. |
| [in] | dpa | The 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()
Set the maximal number of consumers that can be created using this MsgQ.
- Parameters
-
| [in] | msgq | The DOCA Comch MsgQ to modify. |
| [in] | max_num_consumers | The 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()
Set the maximal number of producers that can be created using this MsgQ.
- Parameters
-
| [in] | msgq | The DOCA Comch MsgQ to modify. |
| [in] | max_num_producers | The 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()
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] | msgq | The 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()
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] | msgq | The DOCA Comch MsgQ to stop. |
- Returns
- DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.