2 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
4 .TH IBV_GET_DEVICE_LIST 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
6 ibv_get_device_list, ibv_free_device_list \- get and release list of available RDMA devices
9 .B #include <infiniband/verbs.h>
11 .BI "struct ibv_device **ibv_get_device_list(int " "*num_devices" );
13 .BI "void ibv_free_device_list(struct ibv_device " "**list" );
16 .B ibv_get_device_list()
17 returns a NULL-terminated array of RDMA devices currently available.
20 is optional; if not NULL, it is set to the number of devices returned in the array.
22 .B ibv_free_device_list()
23 frees the array of devices
26 .B ibv_get_device_list()\fR.
28 .B ibv_get_device_list()
29 returns the array of available RDMA devices, or sets
31 and returns NULL if the request fails. If no devices are found then
33 is set to 0, and non-NULL is returned.
35 .B ibv_free_device_list()
43 No kernel support for RDMA.
46 Insufficient memory to complete the operation.
48 Client code should open all the devices it intends to use with
49 .B ibv_open_device()\fR before calling
50 .B ibv_free_device_list()\fR.
51 Once it frees the array with
52 .B ibv_free_device_list()\fR,
53 it will be able to use only the open devices; pointers to unopened devices will no longer be valid.
55 Setting the environment variable
57 will cause warnings to be emitted to stderr if a kernel verbs device
58 is discovered, but no corresponding userspace driver can be found for
61 .BR ibv_fork_init (3),
62 .BR ibv_get_device_name (3),
63 .BR ibv_get_device_guid (3),
64 .BR ibv_open_device (3)
67 Dotan Barak <dotanba@gmail.com>