| 1 | --- |
| 2 | date: ' 2020-04-22' |
| 3 | footer: libibverbs |
| 4 | header: "Libibverbs Programmer's Manual" |
| 5 | layout: page |
| 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' |
| 7 | section: 3 |
| 8 | title: IBV_GET_DEVICE_INDEX |
| 9 | --- |
| 10 | |
| 11 | # NAME |
| 12 | |
| 13 | ibv_get_device_index - get an RDMA device index |
| 14 | |
| 15 | # SYNOPSIS |
| 16 | |
| 17 | ```c |
| 18 | #include <infiniband/verbs.h> |
| 19 | |
| 20 | int ibv_get_device_index(struct ibv_device *device); |
| 21 | ``` |
| 22 | |
| 23 | # DESCRIPTION |
| 24 | |
| 25 | **ibv_get_device_index()** returns stable IB device index as it is assigned by the kernel. |
| 26 | |
| 27 | # RETURN VALUE |
| 28 | |
| 29 | **ibv_get_device_index()** returns an index, or -1 if the kernel doesn't support device indexes. |
| 30 | |
| 31 | # SEE ALSO |
| 32 | |
| 33 | **ibv_get_device_name**(3), |
| 34 | **ibv_get_device_guid**(3), |
| 35 | **ibv_get_device_list**(3), |
| 36 | **ibv_open_device**(3) |
| 37 | |
| 38 | # AUTHOR |
| 39 | |
| 40 | Leon Romanovsky <[email protected]> |