rdma_listen

Listens for 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 for incoming connection requests lookup. The listen operation is restricted to the locally bound source addresses.

Notes:
  • You must have bound the rdma_cm_id to a local address by calling rdma_bind_addr before calling the rdma_listen routine.
  • If the rdma_cm_id 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 is bound to an RDMA port number only, the listen operation occurs across all RDMA devices.

Parameters

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

Return Values

The rdma_listen function returns the following values:
0 On success.
-1 Error, see errno.
-EINVAL If the id parameter is NULL.
-ENODATA The write operation on id->channel->fd failed.
-ENOMEM There is not enough space to allocate by malloc.
-ENODEV Unable to get an RDMA device.
[ Feedback ]