]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ofed/libibverbs/man/ibv_create_srq.3
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ofed / libibverbs / man / ibv_create_srq.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_CREATE_SRQ 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_create_srq, ibv_destroy_srq \- create or destroy a shared receive queue (SRQ)
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
10 .BI "struct ibv_srq *ibv_create_srq(struct ibv_pd " "*pd" ", struct "
11 .BI "                               ibv_srq_init_attr " "*srq_init_attr" );
12 .sp
13 .BI "struct ibv_srq *ibv_create_xrc_srq(struct ibv_pd " "*pd" ",
14 .BI "                                   struct ibv_xrc_domain " "*xrc_domain" ",
15 .BI "                                   struct ibv_cq " "*xrc_cq" ",
16 .BI "                                   struct ibv_srq_init_attr " "*srq_init_attr" );
17 .sp
18 .BI "int ibv_destroy_srq(struct ibv_srq " "*srq" );
19 .fi
20 .SH "DESCRIPTION"
21 .B ibv_create_srq()
22 creates a shared receive queue (SRQ) associated with the protection domain
23 .I pd\fR.
24 .PP
25 .B ibv_create_xrc_srq()
26 creates an XRC shared receive queue (SRQ) associated with the protection domain
27 .I pd\fR,
28 the XRC domain
29 .I xrc_domain
30 and the CQ which will hold the XRC completion
31 .I xrc_cq\fR.
32 .PP
33 The argument
34 .I srq_init_attr
35 is an ibv_srq_init_attr struct, as defined in <infiniband/verbs.h>.
36 .PP
37 .nf
38 struct ibv_srq_init_attr {
39 .in +8
40 void                   *srq_context;    /* Associated context of the SRQ */
41 struct ibv_srq_attr     attr;           /* SRQ attributes */
42 .in -8
43 };
44 .sp
45 .nf
46 struct ibv_srq_attr {
47 .in +8
48 uint32_t                max_wr;         /* Requested max number of outstanding work requests (WRs) in the SRQ */
49 uint32_t                max_sge;        /* Requested max number of scatter elements per WR */
50 uint32_t                srq_limit;      /* The limit value of the SRQ (irrelevant for ibv_create_srq) */
51 .in -8
52 };
53 .fi
54 .PP
55 The function
56 .B ibv_create_srq()
57 will update the
58 .I srq_init_attr
59 struct with the original values of the SRQ that was created; the
60 values of max_wr and max_sge will be greater than or equal to the
61 values requested.
62 .PP
63 .B ibv_destroy_srq()
64 destroys the SRQ
65 .I srq\fR.
66 .SH "RETURN VALUE"
67 .B ibv_create_srq()
68 returns a pointer to the created SRQ, or NULL if the request fails.
69 .PP
70 .B ibv_destroy_srq()
71 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
72 .SH "NOTES"
73 .B ibv_destroy_srq()
74 fails if any queue pair is still associated with this SRQ.
75 .SH "SEE ALSO"
76 .BR ibv_alloc_pd (3),
77 .BR ibv_modify_srq (3),
78 .BR ibv_query_srq (3)
79 .SH "AUTHORS"
80 .TP
81 Dotan Barak <dotanb@mellanox.co.il>