aboutsummaryrefslogtreecommitdiffstats
path: root/man/ibv_create_wq.3
blob: 1ee584aee938119d48abd7674631bb8466c34c61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.\" -*- nroff -*-
.\"
.TH IBV_CREATE_WQ 3 2016-07-27 libibverbs "Libibverbs Programmer's Manual"
.SH "NAME"
ibv_create_wq, ibv_destroy_wq \- create or destroy a Work Queue (WQ).
.SH "SYNOPSIS"
.nf
.B #include <infiniband/verbs_exp.h>
.sp
.BI "struct ibv_wq *ibv_create_wq(struct ibv_context " "*context,"
.BI "                                     struct ibv_wq_init_attr " "*wq_init_attr" );
.sp
.BI "int ibv_destroy_wq(struct ibv_wq " "*wq" );
.fi
.SH "DESCRIPTION"
.B ibv_create_wq()
creates a WQ associated with the ibv_context
.I context\fR.
The argument
.I wq_init_attr
is an ibv_wq_init_attr struct, as defined in <infiniband/verbs.h>.
.PP
.nf
struct ibv_wq_init_attr {
.in +8
void                      *wq_context;    /* Associated context of the WQ */
enum ibv_wq_type           wq_type;       /* WQ type */
uint32_t                   max_wr;        /* Requested max number of outstanding WRs in the WQ */
uint32_t                   max_sge;       /* Requested max number of scatter/gather (s/g) elements per WR in the WQ */
struct  ibv_pd            *pd;            /* PD to be associated with the WQ */
struct  ibv_cq            *cq;            /* CQ to be associated with the WQ */
uint32_t                   comp_mask;     /* Identifies valid fields. Use ibv_wq_init_attr_mask */
.in -8
};
.fi
.PP
The function
.B ibv_create_wq()
will update the
.I wq_init_attr\fB\fR->max_wr
and
.I wq_init_attr\fB\fR->max_sge
fields with the actual \s-1WQ\s0 values of the WQ that was created;
the values will be greater than or equal to the values requested.
.PP
.B ibv_destroy_wq()
destroys the WQ
.I wq\fR.
.SH "RETURN VALUE"
.B ibv_create_wq()
returns a pointer to the created WQ, or NULL if the request fails.
.PP
.B ibv_destroy_wq()
returns 0 on success, or the value of errno on failure (which indicates the failure reason).
.SH "SEE ALSO"
.BR ibv_modify_wq (3),
.SH "AUTHORS"
.TP
Yishai Hadas <yishaih@mellanox.com>