rdma_listen

Listens to the incoming connection requests.

Syntax

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

Description

The rdma_listen function initiates a listen operation for the incoming connection requests. The listen operation is restricted to the locally bound source addresses.

Notes:
  • You must have bound and associated the rdma_cm_id identifier with a local address by the rdma_bind_addr operation before the rdma_listen operation.
  • If the rdma_cm_id identifier is bound to a specific IP address, the listen operation is restricted to that address and the associated RDMA device.
  • If the rdma_cm_id identifier is bound to an RDMA port number, the listen operation occurs across all RDMA devices.

Parameters

Item Description
id Specifies the RDMA identifier.
backlog Specifies the backlog of incoming connection requests.

Return Values

The rdma_listen function returns 0 on success, or -1 on error. If an error occurs, errno indicates the reason for failure.