]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ofed/librdmacm/man/rdma_post_recv.3
[bhyve] virtio-net: Do not allow receiving packets until features have been negotiated.
[FreeBSD/FreeBSD.git] / contrib / ofed / librdmacm / man / rdma_post_recv.3
1 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
2 .TH "RDMA_POST_RECV" 3 "2010-07-19" "librdmacm" "Librdmacm Programmer's Manual" librdmacm
3 .SH NAME
4 rdma_post_recv \- post a work request to receive an incoming message.
5 .SH SYNOPSIS
6 .B "#include <rdma/rdma_verbs.h>"
7 .P
8 .B "int" rdma_post_recv
9 .BI "(struct rdma_cm_id *" id ","
10 .BI "void *" context ","
11 .BI "void *" addr ","
12 .BI "size_t " length ","
13 .BI "struct ibv_mr *" mr ");"
14 .SH ARGUMENTS
15 .IP "id" 12
16 A reference to a communication identifier where the message buffer
17 will be posted.
18 .IP "context" 12
19 User-defined context associated with the request.
20 .IP "addr" 12
21 The address of the memory buffer to post.
22 .IP "length" 12
23 The length of the memory buffer.
24 .IP "mr" 12
25 A registered memory region associated with the posted buffer.
26 .SH "DESCRIPTION"
27 Posts a work request to the receive queue of the queue pair associated
28 with the rdma_cm_id.  The posted buffer will be queued to receive an incoming
29 message sent by the remote peer.
30 .SH "RETURN VALUE"
31 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
32 set to indicate the failure reason.
33 .SH "NOTES"
34 The user is responsible for ensuring that a receive buffer is posted
35 and large enough to contain all sent data before the peer posts the
36 corresponding send message.  The message buffer must have been registered
37 before being posted, with the mr parameter referencing the registration.
38 The buffer must remain registered until the receive completes.
39 .P
40 Messages may be posted to an rdma_cm_id only after a queue pair has
41 been associated with it.  A queue pair is bound to an rdma_cm_id after
42 calling rdma_create_ep or rdma_create_qp, if the rdma_cm_id is allocated
43 using rdma_create_id.
44 .P
45 The user-defined context associated with the receive request will be
46 returned to the user through the work completion wr_id, work request
47 identifier, field.
48 .SH "SEE ALSO"
49 rdma_cm(7), rdma_create_id(3), rdma_create_ep(3), rdma_create_qp(3),
50 rdma_reg_read(3), ibv_reg_mr(3), ibv_dereg_mr(3),
51 rdma_post_recvv(3), rdma_post_send(3)