rdma_get_devices

Gets a list of RDMA devices that are available.

Syntax

#include <rdma/rdma_cma.h>
struct ibv_context **rdma_get_devices(int *num_devices);

Description

The rdma_get_devices function returns a NULL-terminated array of open RDMA devices. You can use this routine to allocate resources on specific RDMA devices that will be shared across multiple rdma_cm_ids.

Note: The returned array must be released by calling the rdma_free_devices routine. Devices remain opened while the librdmacm library is loaded.

Parameters

num_devices Specifies the number of devices returned if the value is not NULL.

Return Values

A NULL-terminated array On success
NULL On failure
[ Feedback ]