1manadv_init_obj(3) manadv_init_obj(3)
2
3
4
6 manadv_init_obj - Initialize mana direct verbs object from ibv_xxx
7 structures
8
10 #include <infiniband/manadv.h>
11
12 int manadv_init_obj(struct manadv_obj *obj, uint64_t obj_type);
13
15 manadv_init_obj() This function will initialize manadv_xxx structs
16 based on supplied type. The information for initialization is taken
17 from ibv_xx structs supplied as part of input.
18
20 obj The manadv_xxx structs be to returned.
21
22 struct manadv_qp {
23 void *sq_buf;
24 uint32_t sq_count;
25 uint32_t sq_size;
26 uint32_t sq_id;
27 uint32_t tx_vp_offset;
28 void *db_page;
29 };
30
31 struct manadv_cq {
32 void *buf;
33 uint32_t count;
34 uint32_t cq_id;
35 };
36
37 struct manadv_rwq {
38 void *buf;
39 uint32_t count;
40 uint32_t size;
41 uint32_t wq_id;
42 void *db_page;
43 };
44
45 struct manadv_obj {
46 struct {
47 struct ibv_qp *in;
48 struct manadv_qp *out;
49 } qp;
50
51 struct {
52 struct ibv_cq *in;
53 struct manadv_cq *out;
54 } cq;
55
56 struct {
57 struct ibv_wq *in;
58 struct manadv_rwq *out;
59 } rwq;
60 };
61
62 obj_type
63 The types of the manadv_xxx structs to be returned.
64
65 enum manadv_obj_type {
66 MANADV_OBJ_QP = 1 << 0,
67 MANADV_OBJ_CQ = 1 << 1,
68 MANADV_OBJ_RWQ = 1 << 2,
69 };
70
72 0 on success or the value of errno on failure (which indicates the
73 failure reason).
74
76 Long Li <longli@microsoft.com>
77
78
79
80 manadv_init_obj(3)