]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ofed/librdmacm/man/rdma_accept.3
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / ofed / librdmacm / man / rdma_accept.3
1 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
2 .TH "RDMA_ACCEPT" 3 "2014-05-27" "librdmacm" "Librdmacm Programmer's Manual" librdmacm
3 .SH NAME
4 rdma_accept \- Called to accept a connection request.
5 .SH SYNOPSIS
6 .B "#include <rdma/rdma_cma.h>"
7 .P
8 .B "int" rdma_accept
9 .BI "(struct rdma_cm_id *" id ","
10 .BI "struct rdma_conn_param *" conn_param ");"
11 .SH ARGUMENTS
12 .IP "id" 12
13 Connection identifier associated with the request.
14 .IP "conn_param" 12
15 Information needed to establish the connection.  See CONNECTION PROPERTIES
16 below for details.
17 .SH "DESCRIPTION"
18 Called from the listening side to accept a connection or datagram
19 service lookup request.
20 .SH "RETURN VALUE"
21 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
22 set to indicate the failure reason.
23 .SH "NOTES"
24 Unlike the socket accept routine, rdma_accept is not called on a
25 listening rdma_cm_id.  Instead, after calling rdma_listen, the user
26 waits for an RDMA_CM_EVENT_CONNECT_REQUEST event to occur.  Connection request
27 events give the user a newly created rdma_cm_id, similar to a new
28 socket, but the rdma_cm_id is bound to a specific RDMA device.
29 rdma_accept is called on the new rdma_cm_id.
30 .SH "CONNECTION PROPERTIES"
31 The following properties are used to configure the communication and specified
32 by the conn_param parameter when accepting a connection or datagram
33 communication request.  Users should use the rdma_conn_param values reported
34 in the connection request event to determine appropriate values for these
35 fields when accepting.  Users may reference the rdma_conn_param structure in
36 the connection event directly, or can reference their own structure.  If the
37 rdma_conn_param structure from an event is referenced, the event must not be
38 acked until after this call returns.
39 .P
40 If the conn_param parameter is NULL, the values reported in the connection
41 request event are used, adjusted down based on local hardware restrictions.
42 .IP private_data
43 References a user-controlled data buffer.  The contents of the buffer are
44 copied and transparently passed to the remote side as part of the
45 communication request.  May be NULL if private_data is not required.
46 .IP private_data_len
47 Specifies the size of the user-controlled data buffer.  Note that the actual
48 amount of data transferred to the remote side is transport dependent and may
49 be larger than that requested.
50 .IP responder_resources
51 The maximum number of outstanding RDMA read and atomic operations that the
52 local side will accept from the remote side.  Applies only to RDMA_PS_TCP.
53 This value must be less than or equal to the local RDMA device attribute
54 max_qp_rd_atom, but preferably greater than or equal to the responder_resources
55 value reported in the connect request event.
56 .IP initiator_depth
57 The maximum number of outstanding RDMA read and atomic operations that the
58 local side will have to the remote side.  Applies only to RDMA_PS_TCP.
59 This value must be less than or equal to the local RDMA device attribute
60 max_qp_init_rd_atom and the initiator_depth value reported in the connect
61 request event.
62 .IP flow_control
63 Specifies if hardware flow control is available.  This value is exchanged
64 with the remote peer and is not used to configure the QP.  Applies only to
65 RDMA_PS_TCP.
66 .IP retry_count
67 This value is ignored.
68 .IP rnr_retry_count
69 The maximum number of times that a send operation from the remote peer
70 should be retried on a connection after receiving a receiver not ready (RNR)
71 error.  RNR errors are generated when a send request arrives before a buffer
72 has been posted to receive the incoming data.  Applies only to RDMA_PS_TCP.
73 .IP srq
74 Specifies if the QP associated with the connection is using a shared receive
75 queue.  This field is ignored by the library if a QP has been created on the
76 rdma_cm_id.  Applies only to RDMA_PS_TCP.
77 .IP qp_num
78 Specifies the QP number associated with the connection.  This field is ignored
79 by the library if a QP has been created on the rdma_cm_id.
80 .SH "INFINIBAND SPECIFIC"
81 In addition to the connection properties defined above, InfiniBand QPs are
82 configured with minimum RNR NAK timer and local ACK timeout values.  The
83 minimum RNR NAK timer value is set to 0, for a delay of 655 ms.
84 The local ACK timeout is calculated based on the packet lifetime and local
85 HCA ACK delay.  The packet lifetime is determined by the InfiniBand Subnet
86 Administrator and is part of the route (path record) information obtained
87 by the active side of the connection.  The HCA ACK delay is a property of
88 the locally used HCA.
89 .P
90 The RNR retry count is a 3-bit value.
91 .P
92 The length of the private data provided by the user is limited to 196 bytes
93 for RDMA_PS_TCP, or 136 bytes for RDMA_PS_UDP.
94 .SH "SEE ALSO"
95 rdma_listen(3), rdma_reject(3), rdma_get_cm_event(3)