Debian Codegraph @

libibverbs/man/ibv_create_srq.3

raw
1 .\" -*- nroff -*-
2 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
3 .\"
4 .TH IBV_CREATE_SRQ 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
5 .SH "NAME"
6 ibv_create_srq, ibv_destroy_srq \- create or destroy a shared receive queue (SRQ)
7 .SH "SYNOPSIS"
8 .nf
9 .B #include <infiniband/verbs.h>
10 .sp
11 .BI "struct ibv_srq *ibv_create_srq(struct ibv_pd " "*pd" ", struct "
12 .BI " ibv_srq_init_attr " "*srq_init_attr" );
13 .sp
14 .BI "int ibv_destroy_srq(struct ibv_srq " "*srq" );
15 .fi
16 .SH "DESCRIPTION"
17 .B ibv_create_srq()
18 creates a shared receive queue (SRQ) associated with the protection domain
19 .I pd\fR.
20 The argument
21 .I srq_init_attr
22 is an ibv_srq_init_attr struct, as defined in <infiniband/verbs.h>.
23 .PP
24 .nf
25 struct ibv_srq_init_attr {
26 .in +8
27 void *srq_context; /* Associated context of the SRQ */
28 struct ibv_srq_attr attr; /* SRQ attributes */
29 .in -8
30 };
31 .sp
32 .nf
33 struct ibv_srq_attr {
34 .in +8
35 uint32_t max_wr; /* Requested max number of outstanding work requests (WRs) in the SRQ */
36 uint32_t max_sge; /* Requested max number of scatter elements per WR */
37 uint32_t srq_limit; /* The limit value of the SRQ (irrelevant for ibv_create_srq) */
38 .in -8
39 };
40 .fi
41 .PP
42 The function
43 .B ibv_create_srq()
44 will update the
45 .I srq_init_attr
46 struct with the original values of the SRQ that was created; the
47 values of max_wr and max_sge will be greater than or equal to the
48 values requested.
49 .PP
50 .B ibv_destroy_srq()
51 destroys the SRQ
52 .I srq\fR.
53 .SH "RETURN VALUE"
54 .B ibv_create_srq()
55 returns a pointer to the created SRQ, or NULL if the request fails.
56 .PP
57 .B ibv_destroy_srq()
58 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
59 .SH "NOTES"
60 .B ibv_destroy_srq()
61 fails if any queue pair is still associated with this SRQ.
62 .SH "SEE ALSO"
63 .BR ibv_alloc_pd (3),
64 .BR ibv_modify_srq (3),
65 .BR ibv_query_srq (3)
66 .SH "AUTHORS"
67 .TP
68 Dotan Barak <[email protected]>