1RDMA_CONNECT(3) Librdmacm Programmer's Manual RDMA_CONNECT(3)
2
3
4
6 rdma_connect - Initiate an active connection request.
7
9 #include <rdma/rdma_cma.h>
10
11 int rdma_connect (struct rdma_cm_id *id, struct rdma_conn_param
12 *conn_param);
13
15 id RDMA identifier.
16
17 conn_param connection parameters. See CONNECTION PROPERTIES below for
18 details.
19
21 For an rdma_cm_id of type RDMA_PS_TCP, this call initiates a connection
22 request to a remote destination. For an rdma_cm_id of type
23 RDMA_PS_UDP, it initiates a lookup of the remote QP providing the data‐
24 gram service.
25
27 Returns 0 on success, or -1 on error. If an error occurs, errno will
28 be set to indicate the failure reason.
29
31 Users must have resolved a route to the destination address by having
32 called rdma_resolve_route or rdma_create_ep before calling this rou‐
33 tine.
34
36 The following properties are used to configure the communication and
37 specified by the conn_param parameter when connecting or establishing
38 datagram communication.
39
40 private_data
41 References a user-controlled data buffer. The contents of the
42 buffer are copied and transparently passed to the remote side as
43 part of the communication request. May be NULL if private_data
44 is not required.
45
46 private_data_len
47 Specifies the size of the user-controlled data buffer. Note
48 that the actual amount of data transferred to the remote side is
49 transport dependent and may be larger than that requested.
50
51 responder_resources
52 The maximum number of outstanding RDMA read and atomic opera‐
53 tions that the local side will accept from the remote side.
54 Applies only to RDMA_PS_TCP. This value must be less than or
55 equal to the local RDMA device attribute max_qp_rd_atom and
56 remote RDMA device attribute max_qp_init_rd_atom. The remote
57 endpoint can adjust this value when accepting the connection.
58
59 initiator_depth
60 The maximum number of outstanding RDMA read and atomic opera‐
61 tions that the local side will have to the remote side. Applies
62 only to RDMA_PS_TCP. This value must be less than or equal to
63 the local RDMA device attribute max_qp_init_rd_atom and remote
64 RDMA device attribute max_qp_rd_atom. The remote endpoint can
65 adjust this value when accepting the connection.
66
67 flow_control
68 Specifies if hardware flow control is available. This value is
69 exchanged with the remote peer and is not used to configure the
70 QP. Applies only to RDMA_PS_TCP.
71
72 retry_count
73 The maximum number of times that a data transfer operation
74 should be retried on the connection when an error occurs. This
75 setting controls the number of times to retry send, RDMA, and
76 atomic operations when timeouts occur. Applies only to
77 RDMA_PS_TCP.
78
79 rnr_retry_count
80 The maximum number of times that a send operation from the
81 remote peer should be retried on a connection after receiving a
82 receiver not ready (RNR) error. RNR errors are generated when a
83 send request arrives before a buffer has been posted to receive
84 the incoming data. Applies only to RDMA_PS_TCP.
85
86 srq Specifies if the QP associated with the connection is using a
87 shared receive queue. This field is ignored by the library if a
88 QP has been created on the rdma_cm_id. Applies only to
89 RDMA_PS_TCP.
90
91 qp_num Specifies the QP number associated with the connection. This
92 field is ignored by the library if a QP has been created on the
93 rdma_cm_id. Applies only to RDMA_PS_TCP.
94
96 In addition to the connection properties defined above, InfiniBand QPs
97 are configured with minimum RNR NAK timer and local ACK timeout values.
98 The minimum RNR NAK timer value is set to 0, for a delay of 655 ms.
99 The local ACK timeout is calculated based on the packet lifetime and
100 local HCA ACK delay. The packet lifetime is determined by the Infini‐
101 Band Subnet Administrator and is part of the resolved route (path
102 record) information. The HCA ACK delay is a property of the locally
103 used HCA.
104
105 Retry count and RNR retry count values are 3-bit values.
106
107 The length of the private data provided by the user is limited to 56
108 bytes for RDMA_PS_TCP, or 180 bytes for RDMA_PS_UDP.
109
111 Connections established over iWarp RDMA devices currently require that
112 the active side of the connection send the first message.
113
115 rdma_cm(7), rdma_create_id(3), rdma_resolve_route(3), rdma_discon‐
116 nect(3), rdma_listen(3), rdma_get_cm_event(3)
117
118
119
120librdmacm 2010-07-19 RDMA_CONNECT(3)