1IBV_POST_SRQ_RECV(3) Libibverbs Programmer's Manual IBV_POST_SRQ_RECV(3)
2
3
4
6 ibv_post_srq_recv - post a list of work requests (WRs) to a shared
7 receive queue (SRQ)
8
10 #include <infiniband/verbs.h>
11
12 int ibv_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
13 struct ibv_recv_wr **bad_wr);
14
16 ibv_post_srq_recv() posts the linked list of work requests (WRs) start‐
17 ing with wr to the shared receive queue (SRQ) srq. It stops processing
18 WRs from this list at the first failure (that can be detected immedi‐
19 ately while requests are being posted), and returns this failing WR
20 through bad_wr.
21
22 The argument wr is an ibv_recv_wr struct, as defined in <infini‐
23 band/verbs.h>.
24
25 struct ibv_recv_wr {
26 uint64_t wr_id; /* User defined WR ID */
27 struct ibv_recv_wr *next; /* Pointer to next WR in list, NULL if last WR */
28 struct ibv_sge *sg_list; /* Pointer to the s/g array */
29 int num_sge; /* Size of the s/g array */
30 };
31
32 struct ibv_sge {
33 uint64_t addr; /* Start address of the local memory buffer */
34 uint32_t length; /* Length of the buffer */
35 uint32_t lkey; /* Key of the local Memory Region */
36 };
37
39 ibv_post_srq_recv() returns 0 on success, or the value of errno on
40 failure (which indicates the failure reason).
41
43 The buffers used by a WR can only be safely reused after WR the request
44 is fully executed and a work completion has been retrieved from the
45 corresponding completion queue (CQ).
46
47 If a WR is being posted to a UD QP, the Global Routing Header (GRH) of
48 the incoming message will be placed in the first 40 bytes of the buf‐
49 fer(s) in the scatter list. If no GRH is present in the incoming mes‐
50 sage, then the first bytes will be undefined. This means that in all
51 cases, the actual data of the incoming message will start at an offset
52 of 40 bytes into the buffer(s) in the scatter list.
53
55 ibv_create_qp(3), ibv_post_send(3), ibv_post_recv(3), ibv_poll_cq(3)
56
58 Dotan Barak <dotanba@gmail.com>
59
60
61
62libibverbs 2006-10-31 IBV_POST_SRQ_RECV(3)