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_obj {
70               struct {
71                       struct ibv_qp           *in;
72                       struct mlx5dv_qp        *out;
73               } qp;
74               struct {
75                       struct ibv_cq           *in;
76                       struct mlx5dv_cq        *out;
77               } cq;
78               struct {
79                       struct ibv_srq          *in;
80                       struct mlx5dv_srq       *out;
81               } srq;
82               struct {
83                       struct ibv_wq           *in;
84                       struct mlx5dv_rwq       *out;
85               } rwq;
86       };
87
88       enum mlx5dv_obj_type {
89               MLX5DV_OBJ_QP   = 1 << 0,
90               MLX5DV_OBJ_CQ   = 1 << 1,
91               MLX5DV_OBJ_SRQ  = 1 << 2,
92               MLX5DV_OBJ_RWQ  = 1 << 3,
93       };
94

RETURN VALUE

96       0 on success or the value of errno  on  failure  (which  indicates  the
97       failure reason).
98

NOTES

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

SEE ALSO

105       mlx5dv(7)
106

AUTHORS

108       Leon Romanovsky <leonro@mellanox.com>
109
110
111
1121.0.0                             2017-02-02                MLX5DV_INIT_OBJ(3)
Impressum