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 is
shared with multiple rdma_cm_id
identifiers.
Note: The returned array must be released by running the rdma_free_devices function.
Devices remain opened when the librdmacm library is loaded.
Parameters
Item | Description |
---|---|
num_devices | Specifies the number of devices that are returned if the value is not NULL. |
Return Values
The rdma_get_devices function returns an array of available RDMA devices, or NULL if the request fails. If an error occurs, errno indicates the reason for failure.