1MLX5DV_INIT_OBJ(3)         Library Functions Manual         MLX5DV_INIT_OBJ(3)
2
3
4

NAME

6       mlx5dv_init_obj  -  Initialize  mlx5  direct  verbs object from ibv_xxx
7       structures
8

SYNOPSIS

10       #include <infiniband/mlx5dv.h>
11
12       int mlx5dv_init_obj(struct mlx5dv_obj *obj, uint64_t obj_type);
13

DESCRIPTION

15       mlx5dv_init_obj() This  function  will  initialize  mlx5dv_xxx  structs
16       based  on  supplied  type.  The information for initialization is taken
17       from ibv_xx structs supplied as part of input.
18
19       Request information of CQ marks its owned by direct verbs for all  con‐
20       sumer index related actions. The initialization type can be combination
21       of several types together.
22
23       struct mlx5dv_qp {
24               uint32_t                *dbrec;
25               struct {
26                       void            *buf;
27                       uint32_t        wqe_cnt;
28                       uint32_t        stride;
29               } sq;
30               struct {
31                       void            *buf;
32                       uint32_t        wqe_cnt;
33                       uint32_t        stride;
34               } rq;
35               struct {
36                       void            *reg;
37                       uint32_t        size;
38               } bf;
39               uint64_t                comp_mask;
40       };
41
42       struct mlx5dv_cq {
43               void                    *buf;
44               uint32_t                *dbrec;
45               uint32_t                cqe_cnt;
46               uint32_t                cqe_size;
47               void                    *cq_uar;
48               uint32_t                cqn;
49               uint64_t                comp_mask;
50       };
51
52       struct mlx5dv_srq {
53               void                    *buf;
54               uint32_t                *dbrec;
55               uint32_t                stride;
56               uint32_t                head;
57               uint32_t                tail;
58               uint64_t                comp_mask;
59       };
60
61       struct mlx5dv_rwq {
62               void            *buf;
63               uint32_t        *dbrec;
64               uint32_t        wqe_cnt;
65               uint32_t        stride;
66               uint64_t        comp_mask;
67       };
68
69       struct mlx5dv_dm {
70               void      *buf;
71               uint64_t  length;
72               uint64_t  comp_mask;
73       };
74
75       struct mlx5dv_ah {
76               struct mlx5_wqe_av    *av;
77               uint64_t              comp_mask;
78       };
79
80       struct mlx5dv_obj {
81               struct {
82                       struct ibv_qp           *in;
83                       struct mlx5dv_qp        *out;
84               } qp;
85               struct {
86                       struct ibv_cq           *in;
87                       struct mlx5dv_cq        *out;
88               } cq;
89               struct {
90                       struct ibv_srq          *in;
91                       struct mlx5dv_srq       *out;
92               } srq;
93               struct {
94                       struct ibv_wq           *in;
95                       struct mlx5dv_rwq       *out;
96               } rwq;
97               struct {
98                       struct ibv_dm       *in;
99                       struct mlx5dv_dm    *out;
100               } dm;
101               struct {
102                       struct ibv_ah       *in;
103                       struct mlx5dv_ah    *out;
104               } ah;
105       };
106
107       enum mlx5dv_obj_type {
108               MLX5DV_OBJ_QP   = 1 << 0,
109               MLX5DV_OBJ_CQ   = 1 << 1,
110               MLX5DV_OBJ_SRQ  = 1 << 2,
111               MLX5DV_OBJ_RWQ  = 1 << 3,
112               MLX5DV_OBJ_DM   = 1 << 4,
113               MLX5DV_OBJ_AH   = 1 << 5,
114       };
115

RETURN VALUE

117       0 on success or the value of errno  on  failure  (which  indicates  the
118       failure reason).
119

NOTES

121        *   The   information   if   doorbell   is   blueflame   is  based  on
122       mlx5dv_qp->bf->size, in case of 0 it's not a BF.
123        * Compatibility masks (comp_mask) are in/out fields.
124

SEE ALSO

126       mlx5dv(7)
127

AUTHORS

129       Leon Romanovsky <leonro@mellanox.com>
130
131
132
1331.0.0                             2017-02-02                MLX5DV_INIT_OBJ(3)
Impressum