NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_rdma_bridge.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022 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 
25 #ifndef DOCA_RDMA_BRIDGE_H_
26 #define DOCA_RDMA_BRIDGE_H_
27 
28 #include <stdint.h>
29 
30 #ifdef __linux__
31 #include <infiniband/verbs.h>
32 #else /* Windows */
36 #define UM_MAX_ERRNO 999
40 #define UM_ENOMEM 12
45 #define __DEVX_IFC_H__
46 
47 typedef uint16_t __be16;
48 typedef uint32_t __be32;
49 typedef uint64_t __be64;
50 typedef uint16_t u16;
51 typedef uint32_t u32;
52 typedef uint64_t u64;
54 #include <winsock2.h>
55 #include <windows.h>
56 #include <mlx5verbs.h>
57 #endif /* __linux__ */
58 
59 #include <doca_error.h>
60 #include <doca_types.h>
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 struct doca_dev;
67 struct doca_buf;
68 struct doca_mmap;
69 
85 doca_error_t doca_rdma_bridge_get_dev_pd(const struct doca_dev *dev, struct ibv_pd **pd);
86 
120 doca_error_t doca_rdma_bridge_open_dev_from_pd(struct ibv_pd *pd, struct doca_dev **dev);
121 
143 doca_error_t doca_rdma_bridge_get_buf_mkey(const struct doca_buf *buf, struct doca_dev *dev, uint32_t *mkey);
144 
167 doca_error_t doca_rdma_bridge_get_mmap_mkey_from_pd(const struct doca_mmap *mmap, struct ibv_pd *pd, uint32_t *mkey);
168 
169 #ifdef __cplusplus
170 }
171 #endif
172 
175 #endif /* DOCA_RDMA_BRIDGE_H_ */
doca_dpa_dev_mmap_t mmap
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
#define DOCA_STABLE
To set a Symbol (or specifically a function) as stable API, i.e. it won't be changed.
Definition: doca_compat.h:96
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE doca_error_t doca_rdma_bridge_open_dev_from_pd(struct ibv_pd *pd, struct doca_dev **dev)
Open a DOCA device using an ibv_pd.
uint32_t __be32
uint64_t u64
uint64_t __be64
DOCA_STABLE doca_error_t doca_rdma_bridge_get_buf_mkey(const struct doca_buf *buf, struct doca_dev *dev, uint32_t *mkey)
Get lkey with doca_access_flag access for a DOCA buffer of a DOCA device.
uint16_t __be16
DOCA_EXPERIMENTAL doca_error_t doca_rdma_bridge_get_mmap_mkey_from_pd(const struct doca_mmap *mmap, struct ibv_pd *pd, uint32_t *mkey)
Get the mkey of a DOCA device associated with a given ibv_pd.
DOCA_STABLE doca_error_t doca_rdma_bridge_get_dev_pd(const struct doca_dev *dev, struct ibv_pd **pd)
Get the protection domain associated with a DOCA device.
uint16_t u16
uint32_t u32