rdma_connect
Initiates an active connection request.
Syntax
#include <rdma/rdma_cma.h>
int rdma_connect(struct rdma_cm_id *id, struct rdma_conn_param *conn_param);
Description
The rdma_connect function initiates a connection request to a remote destination.
Note: The route to the destination address must be resolved
by running the rdma_resolve_route call or by running the rdma_create_ep call
before the rdma_connect operation.
Connection Properties
The following properties
are used to configure the communication that is specified by the conn_param parameter
when connecting or establishing a datagram communication.
- private_data
- References a user-controlled data buffer. The contents of the buffer are copied and transparently passed to the remote side as part of the communication request. This property can be NULL if it is not required.
- private_data_len:
- Specifies the size of the user-controlled data buffer.
- responder_resources:
- Specifies the maximum number of outstanding Remote Direct Memory Access (RDMA) read operations that the local side accepts from the remote side. This property applies only to the RDMA_PS_TCP event. The responder_resources value must be less than or equal to the local RDMA device attribute max_qp_rd_atom and to the remote RDMA device attribute max_qp_init_rd_atom. The remote endpoint can adjust this value when accepting the connection.
- initiator_depth:
- Specifies the maximum number of outstanding RDMA read operations that the local side must read to the remote side. This property applies only to the RDMA_PS_TCP event. The initiator_depth value must be less than or equal to the local RDMA device attribute max_qp_init_rd_atom and to the remote RDMA device attribute max_qp_rd_atom. The remote endpoint can adjust to this value when accepting the connection.
- flow_control:
- Specifies if the hardware flow control is available. The flow_control value is exchanged with the remote peer and is not used to configure the queue pair (QP). This property applies only to the RDMA_PS_TCP event , and is specific to the InfiniBand architecture.
- retry_count:
- Specifies the maximum number of times the data transfer operation must be tried on the connection when an error occurs. The retry_count setting controls the number of times to retry sending the data transmission to RDMA, and atomic operations when time outs occur. This property applies only to the RDMA_PS_TCP event, and is specific to the InfiniBand architecture.
- rnr_retry_count:
- Specifies the maximum number of times that a send operation from the remote peer is tried on a connection after receiving a receiver not ready (RNR) error. RNR errors are generated when a send request arrives before a buffer is posted to receive the incoming data. This property applies only to the RDMA_PS_TCP event., and is specific to the InfiniBand architecture.
- srq:
- Specifies whether the QP that is associated with the connection
is using a shared receive queue. The srq field is ignored by
the library if a QP is created on the
rdma_cm_id
identifier. This property applies only to the RDMA_PS_TCP event, and is currently not supported. - qp_num:
- Specifies whether the QP number is associated with the connection.
The qp_num field is ignored by the library if a QP is created
on the
rdma_cm_id
identifier. This property applies only to the RDMA_PS_TCP event. - iWARP specific:
- Specifies the connections established over Internet Wide Area RDMA Protocol ( iWARP RDMA) devices that currently require the active side of the connection to send the first message.
Parameters
Item | Description |
---|---|
id | Specifies the RDMA identifier. |
conn_param | Specifies the connection parameters. |
Return Values
The rdma_connect function
returns the following values:
Item | Description |
---|---|
0 | On success. |
-1 | Error, see errno. |