]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ofed/libibverbs/man/ibv_get_device_list.3
MFV r356163,r356197:
[FreeBSD/FreeBSD.git] / contrib / ofed / libibverbs / man / ibv_get_device_list.3
1 .\" -*- nroff -*-
2 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
3 .\"
4 .TH IBV_GET_DEVICE_LIST 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
5 .SH "NAME"
6 ibv_get_device_list, ibv_free_device_list \- get and release list of available RDMA devices
7 .SH "SYNOPSIS"
8 .nf
9 .B #include <infiniband/verbs.h>
10 .sp
11 .BI "struct ibv_device **ibv_get_device_list(int " "*num_devices" );
12 .sp
13 .BI "void ibv_free_device_list(struct ibv_device " "**list" );
14 .fi
15 .SH "DESCRIPTION"
16 .B ibv_get_device_list()
17 returns a NULL-terminated array of RDMA devices currently available.
18 The argument
19 .I num_devices
20 is optional; if not NULL, it is set to the number of devices returned in the array.
21 .PP
22 .B ibv_free_device_list()
23 frees the array of devices
24 .I list
25 returned by
26 .B ibv_get_device_list()\fR.
27 .SH "RETURN VALUE"
28 .B ibv_get_device_list()
29 returns the array of available RDMA devices, or sets
30 .I errno
31 and returns NULL if the request fails. If no devices are found then
32 .I num_devices
33 is set to 0, and non-NULL is returned.
34 .PP
35 .B ibv_free_device_list()
36 returns no value.
37 .SH "ERRORS"
38 .TP
39 .B EPERM
40 Permission denied.
41 .TP
42 .B ENOSYS
43 No kernel support for RDMA.
44 .TP
45 .B ENOMEM
46 Insufficient memory to complete the operation.
47 .SH "NOTES"
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.
54 .P
55 Setting the environment variable
56 .BR IBV_SHOW_WARNINGS
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
59 it.
60 .SH "SEE ALSO"
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)
65 .SH "AUTHORS"
66 .TP
67 Dotan Barak <dotanba@gmail.com>