NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_comch_msgq.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
26 #ifndef DOCA_COMCH_MSGQ_H_
27 #define DOCA_COMCH_MSGQ_H_
28 
29 #include <stddef.h>
30 #include <stdint.h>
31 
32 #include <doca_compat.h>
33 #include <doca_error.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 struct doca_comch_msgq;
40 struct doca_comch_producer;
41 struct doca_comch_consumer;
42 
43 struct doca_dev;
44 struct doca_dpa;
45 
46 /*********************************************************************************************************************
47  * DOCA Comch MsgQ
48  *********************************************************************************************************************/
49 
63 doca_error_t doca_comch_msgq_create(struct doca_dev *dev, struct doca_comch_msgq **msgq);
64 
76 doca_error_t doca_comch_msgq_destroy(struct doca_comch_msgq *msgq);
77 
94 doca_error_t doca_comch_msgq_set_dpa_consumer(struct doca_comch_msgq *msgq, struct doca_dpa *dpa);
95 
109 doca_error_t doca_comch_msgq_set_max_num_consumers(struct doca_comch_msgq *msgq, uint32_t max_num_consumers);
110 
127 doca_error_t doca_comch_msgq_set_dpa_producer(struct doca_comch_msgq *msgq, struct doca_dpa *dpa);
128 
142 doca_error_t doca_comch_msgq_set_max_num_producers(struct doca_comch_msgq *msgq, uint32_t max_num_producers);
143 
163 doca_error_t doca_comch_msgq_start(struct doca_comch_msgq *msgq);
164 
186 doca_error_t doca_comch_msgq_stop(struct doca_comch_msgq *msgq);
187 
201 doca_error_t doca_comch_msgq_consumer_create(struct doca_comch_msgq *msgq, struct doca_comch_consumer **consumer);
202 
216 doca_error_t doca_comch_msgq_producer_create(struct doca_comch_msgq *msgq, struct doca_comch_producer **producer);
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
224 #endif /* DOCA_COMCH_MSGQ_H_ */
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_create(struct doca_dev *dev, struct doca_comch_msgq **msgq)
Create a DOCA Comch MsgQ instance.
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.
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.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_stop(struct doca_comch_msgq *msgq)
Stop DOCA Comch MsgQ.
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.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_start(struct doca_comch_msgq *msgq)
Start DOCA Comch MsgQ.
DOCA_EXPERIMENTAL doca_error_t doca_comch_msgq_destroy(struct doca_comch_msgq *msgq)
Destroy a DOCA Comch MsgQ instance.
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
enum doca_error doca_error_t
DOCA API return codes.