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

NAME

6       mlx4dv_init_obj  -  Initialize  mlx4  direct  verbs object from ibv_xxx
7       structures
8

SYNOPSIS

10       #include <infiniband/mlx4dv.h>
11
12       int mlx4dv_init_obj(struct mlx4dv_obj *obj, uint64_t obj_type);
13

DESCRIPTION

15       mlx4dv_init_obj() This  function  will  initialize  mlx4dv_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 mlx4dv_qp {
24               uint32_t         *rdb;
25               uint32_t         *sdb;
26               struct {
27                       uint32_t        wqe_cnt;
28                       int             wqe_shift;
29                       int             offset;
30               } sq;
31               struct {
32                       uint32_t        wqe_cnt;
33                       int             wqe_shift;
34                       int             offset;
35               } rq;
36               struct {
37                       void            *buf;
38                       size_t          length;
39               } buf;
40               uint64_t        comp_mask;
41       };
42
43       struct mlx4dv_cq {
44               struct {
45                       void            *buf;
46                       size_t          length;
47               } buf;
48               uint32_t        cqe_cnt;
49               uint32_t        cqn;
50               uint32_t        *set_ci_db;
51               uint32_t        *arm_db;
52               int             arm_sn;
53               int             cqe_size;
54               uint64_t        comp_mask; /* Use enum mlx4dv_cq_comp_mask */
55               void            *cq_uar;
56       };
57
58       struct mlx4dv_srq {
59               struct {
60                       void            *buf;
61                       size_t          length;
62               } buf;
63               int             wqe_shift;
64               int             head;
65               int             tail;
66               uint32_t        *db;
67               uint64_t        comp_mask;
68       };
69
70       struct mlx4dv_rwq {
71               __be32          *rdb;
72               struct {
73                       uint32_t        wqe_cnt;
74                       int             wqe_shift;
75                       int             offset;
76               } rq;
77               struct {
78                       void            *buf;
79                       size_t          length;
80               } buf;
81               uint64_t        comp_mask;
82       };
83
84       struct mlx4dv_obj {
85               struct {
86                       struct ibv_qp      *in;
87                       struct mlx4dv_qp   *out;
88               } qp;
89               struct {
90                       struct ibv_cq      *in;
91                       struct mlx4dv_cq   *out;
92               } cq;
93       };
94
95       enum mlx4dv_obj_type {
96               MLX4DV_OBJ_QP   = 1 << 0,
97               MLX4DV_OBJ_CQ   = 1 << 1,
98               MLX4DV_OBJ_SRQ  = 1 << 2,
99       };
100

RETURN VALUE

102       0 on success or the value of errno  on  failure  (which  indicates  the
103       failure reason).
104

NOTES

106        * Compatibility masks (comp_mask) are in/out fields.
107

SEE ALSO

109       mlx4dv(7)
110

AUTHORS

112       Maor Gottlieb <maorg@mellanox.com>
113
114
115
1161.0.0                             2017-02-02                MLX4DV_INIT_OBJ(3)
Impressum