RDMA_ACCEPT(3) | Librdmacm Programmer's Manual | RDMA_ACCEPT(3) |
rdma_accept - Called to accept a connection request.
#include <rdma/rdma_cma.h>
int rdma_accept (struct rdma_cm_id *id, struct rdma_conn_param *conn_param);
Called from the listening side to accept a connection or datagram service lookup request.
Returns 0 on success, or -1 on error. If an error occurs, errno will be set to indicate the failure reason.
Unlike the socket accept routine, rdma_accept is not called on a listening rdma_cm_id. Instead, after calling rdma_listen, the user waits for an RDMA_CM_EVENT_CONNECT_REQUEST event to occur. Connection request events give the user a newly created rdma_cm_id, similar to a new socket, but the rdma_cm_id is bound to a specific RDMA device. rdma_accept is called on the new rdma_cm_id.
The following properties are used to configure the communication and specified by the conn_param parameter when accepting a connection or datagram communication request. Users should use the rdma_conn_param values reported in the connection request event to determine appropriate values for these fields when accepting. Users may reference the rdma_conn_param structure in the connection event directly, or can reference their own structure. If the rdma_conn_param structure from an event is referenced, the event must not be acked until after this call returns.
If the conn_param parameter is NULL, the values reported in the connection request event are used, adjusted down based on local hardware restrictions.
In addition to the connection properties defined above, InfiniBand QPs are configured with minimum RNR NAK timer and local ACK timeout values. The minimum RNR NAK timer value is set to 0, for a delay of 655 ms. The local ACK timeout is calculated based on the packet lifetime and local HCA ACK delay. The packet lifetime is determined by the InfiniBand Subnet Administrator and is part of the route (path record) information obtained by the active side of the connection. The HCA ACK delay is a property of the locally used HCA.
The RNR retry count is a 3-bit value.
The length of the private data provided by the user is limited to 196 bytes for RDMA_PS_TCP, or 136 bytes for RDMA_PS_UDP.
2014-05-27 | librdmacm |