NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_uar.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2025 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 
24 #ifndef DOCA_UAR_H_
25 #define DOCA_UAR_H_
26 
27 #include <stddef.h>
28 #include <stdint.h>
29 
30 #include <doca_compat.h>
31 #include <doca_error.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /*******************************************************************************
38  * DOCA UAR
39  ******************************************************************************/
40 
41 struct doca_dev;
42 struct doca_dpa;
43 
47 struct doca_uar;
48 
53  DOCA_UAR_ALLOCATION_TYPE_BLUEFLAME = 0, /* Preferred for low latency */
54  DOCA_UAR_ALLOCATION_TYPE_NONCACHE = 1, /* Preferred for high throughput */
55  DOCA_UAR_ALLOCATION_TYPE_NONCACHE_DEDICATED = 2, /* Type NONCACHE_DEDICATED requires libibverbs version
56  >= 1.14.47 */
57 };
58 
76 doca_error_t doca_uar_create(const struct doca_dev *dev,
77  enum doca_uar_allocation_type allocation_type,
78  struct doca_uar **uar);
79 
95 doca_error_t doca_uar_dpa_create(struct doca_dpa *dpa, struct doca_uar **uar);
96 
109 doca_error_t doca_uar_destroy(struct doca_uar *uar);
110 
125 doca_error_t doca_uar_id_get(const struct doca_uar *uar, uint32_t *id);
126 
143 doca_error_t doca_uar_page_get(const struct doca_uar *uar, void **page);
144 
161 doca_error_t doca_uar_reg_addr_get(const struct doca_uar *uar, void **reg);
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
169 #endif /* DOCA_UAR_H_ */
#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.
DOCA_EXPERIMENTAL doca_error_t doca_uar_destroy(struct doca_uar *uar)
Destroy UAR object.
DOCA_EXPERIMENTAL doca_error_t doca_uar_reg_addr_get(const struct doca_uar *uar, void **reg)
Returns the uar register address.
DOCA_EXPERIMENTAL doca_error_t doca_uar_page_get(const struct doca_uar *uar, void **page)
Returns the uar page address.
DOCA_EXPERIMENTAL doca_error_t doca_uar_id_get(const struct doca_uar *uar, uint32_t *id)
Returns the uar id.
DOCA_EXPERIMENTAL doca_error_t doca_uar_dpa_create(struct doca_dpa *dpa, struct doca_uar **uar)
Creates a DPA UAR object.
DOCA_EXPERIMENTAL doca_error_t doca_uar_create(const struct doca_dev *dev, enum doca_uar_allocation_type allocation_type, struct doca_uar **uar)
Creates a UAR object.
doca_uar_allocation_type
UAR allocation type.
Definition: doca_uar.h:52
@ DOCA_UAR_ALLOCATION_TYPE_NONCACHE_DEDICATED
Definition: doca_uar.h:55
@ DOCA_UAR_ALLOCATION_TYPE_BLUEFLAME
Definition: doca_uar.h:53
@ DOCA_UAR_ALLOCATION_TYPE_NONCACHE
Definition: doca_uar.h:54