---
name: "ibv_get_device_index"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ibv_get_device_index"
---

# ibv\_get\_device\_index(3)

get an RDMA device index

## NAME

ibv\_get\_device\_index - get an RDMA device index

## SYNOPSIS

-

  ```
  #include <infiniband/verbs.h>
  int ibv_get_device_index(struct ibv_device *device);
  ```

## DESCRIPTION

**ibv\_get\_device\_index()** returns stable IB device index as it is assigned by the kernel.

## RETURN VALUE

**ibv\_get\_device\_index()** returns an index, or -1 if the kernel doesn’t support device indexes.

## SEE ALSO

[**ibv\_get\_device\_name**(3)](/ibv_get_device_name/3.md), [**ibv\_get\_device\_guid**(3)](/ibv_get_device_guid/3.md), [**ibv\_get\_device\_list**(3)](/ibv_get_device_list/3.md), [**ibv\_open\_device**(3)](/ibv_open_device/3.md)

## AUTHOR

Leon Romanovsky ⟨leonro@mellanox.com⟩\\c
