Debian Codegraph @

libibverbs/man/ibv_post_srq_recv.3

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