Accepts a connection request.
Syntax
#include <rdma/rdma_cma.h>
int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param);
Description
The rdma_accept function
is called from the listening side to accept a connection lookup request.
Notes: - The rdma_accept routine is not called on a listening rdma_cm_id,
unlike the socket accept routine. Instead, after calling rdma_listen,
you have to wait for a connection request event to occur.
- Connection request events gives you a newly created rdma_cm_id,
similar to a new socket, but the rdma_cm_id is bound to a specific
RDMA device. The rdma_accept routine is called on the new rdma_cm_id.
Connection Properties
See, the rdma_connect routine.
Parameters
id |
Specifies the connection identifier associated
with the request. |
conn_param |
Specifies the information required to establish
the connection. |
Return Values
The
rdma_accept function
returns the following values:
0 |
On success. |
-1 |
Error, see errno. |
-EINVAL |
The error occurs:- If the id, conn_param, id->qp, or id->qp->context parameter is
NULL.
- If conn_param->responder_resources is bigger than the local RDMA
device attribute, max_qp_rd_atom, and remote RDMA device attribute, max_qp_init_rd_atom.
- If conn_param->initiator_depth is bigger than the local RDMA device
attribute, max_qp_init_rd_atom, and remote RDMA device attribute, max_qp_rd_atom.
|
-EPROTONOSUPPORT |
The id->ps is not RDMA_PS_TCP. |
-ENODATA |
The write operation on id->channel->fd failed. |