1IBV_POST_RECV(3) Libibverbs Programmer's Manual IBV_POST_RECV(3)
2
3
4
6 ibv_post_recv - post a list of work requests (WRs) to a receive queue
7
9 #include <infiniband/verbs.h>
10
11 int ibv_post_recv(struct ibv_qp *qp, struct ibv_recv_wr *wr,
12 struct ibv_recv_wr **bad_wr);
13
15 ibv_post_recv() posts the linked list of work requests (WRs) starting
16 with wr to the receive queue of the queue pair qp. It stops processing
17 WRs from this list at the first failure (that can be detected immedi‐
18 ately while requests are being posted), and returns this failing WR
19 through bad_wr.
20
21 The argument wr is an ibv_recv_wr struct, as defined in <infini‐
22 band/verbs.h>.
23
24 struct ibv_recv_wr {
25 uint64_t wr_id; /* User defined WR ID */
26 struct ibv_recv_wr *next; /* Pointer to next WR in list, NULL if last WR */
27 struct ibv_sge *sg_list; /* Pointer to the s/g array */
28 int num_sge; /* Size of the s/g array */
29 };
30
31 struct ibv_sge {
32 uint64_t addr; /* Start address of the local memory buffer */
33 uint32_t length; /* Length of the buffer */
34 uint32_t lkey; /* Key of the local Memory Region */
35 };
36
37
39 ibv_post_recv() returns 0 on success, or the value of errno on failure
40 (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 the QP qp is associated with a shared receive queue, you must use
48 the function ibv_post_srq_recv(), and not ibv_post_recv(), since the
49 QP's own receive queue will not be used.
50
52 ibv_create_qp(3), ibv_post_send(3), ibv_post_srq_recv(3),
53 ibv_poll_cq(3)
54
56 Dotan Barak <dotanb@mellanox.co.il>
57
58
59
60libibverbs 2006-10-31 IBV_POST_RECV(3)