rdma_disconnect

Disconnects a connection.

Syntax

#include <rdma/rdma_cma.h>
int rdma_disconnect(struct rdma_cm_id *id);

Description

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.

Parameters

id Specifies the connection identifier associated with the request.

Return Values

The rdma_disconnect function returns the following values:
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.
[ Feedback ]