]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libibverbs/man/ibv_post_srq_recv.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libibverbs / man / ibv_post_srq_recv.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_POST_SRQ_RECV 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_post_srq_recv \- post a list of work requests (WRs) to a shared receive queue (SRQ)
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
10 .BI "int ibv_post_srq_recv(struct ibv_srq " "*srq" ", struct ibv_recv_wr " "*wr" ,
11 .BI "                      struct ibv_recv_wr " "**bad_wr" );
12 .fi
13 .SH "DESCRIPTION"
14 .B ibv_post_srq_recv()
15 posts the linked list of work requests (WRs) starting with
16 .I wr
17 to the shared receive queue (SRQ)
18 .I srq\fR.
19 It stops processing WRs from this list at the first failure (that can
20 be detected immediately while requests are being posted), and returns
21 this failing WR through
22 .I bad_wr\fR.
23 .PP
24 The argument
25 .I wr
26 is an ibv_recv_wr struct, as defined in <infiniband/verbs.h>.
27 .PP
28 .nf
29 struct ibv_recv_wr {
30 .in +8
31 uint64_t                wr_id;     /* User defined WR ID */
32 struct ibv_recv_wr     *next;      /* Pointer to next WR in list, NULL if last WR */
33 struct ibv_sge         *sg_list;   /* Pointer to the s/g array */
34 int                     num_sge;   /* Size of the s/g array */
35 .in -8
36 };
37 .sp
38 .nf
39 struct ibv_sge {
40 .in +8
41 uint64_t                addr;      /* Start address of the local memory buffer */
42 uint32_t                length;    /* Length of the buffer */
43 uint32_t                lkey;      /* Key of the local Memory Region */
44 .in -8
45 };
46 .fi
47 .SH "RETURN VALUE"
48 .B ibv_post_srq_recv()
49 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
50 .SH "NOTES"
51 The buffers used by a WR can only be safely reused after WR the
52 request is fully executed and a work completion has been retrieved
53 from the corresponding completion queue (CQ).
54 .PP
55 If a WR is being posted to a UD QP, the Global Routing Header (GRH) of
56 the incoming message will be placed in the first 40 bytes of the
57 buffer(s) in the scatter list.  If no GRH is present in the incoming
58 message, then the first bytes will be undefined.  This means that in
59 all cases, the actual data of the incoming message will start at an
60 offset of 40 bytes into the buffer(s) in the scatter list.
61 .SH "SEE ALSO"
62 .BR ibv_create_qp (3),
63 .BR ibv_post_send (3),
64 .BR ibv_post_recv (3),
65 .BR ibv_poll_cq (3)
66 .SH "AUTHORS"
67 .TP
68 Dotan Barak <dotanb@mellanox.co.il>