Disconnects a connection.
#include <rdma/rdma_cma.h> int rdma_disconnect(struct rdma_cm_id *id);
The rdma_disconnect function disconnects a connection and transitions any associated QP to the error state that will flush posted work requests to the completion queue. This routing might be called by both the client and server side of a connection. After successfully disconnection, an RDMA_CM_EVENT_DISCONNECTED event is generated on both sides of the connection.
id | Specifies the connection identifier associated with the request. |
0 | On success. |
-1 | Error, see errno. |
-EINVAL | The error occurs if the id or id->qp is NULL or bad transport type. |
-ENODATA | The write operation on id->channel->fd failed. |