Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libibverbs: Get stable IB device index
The kernel which supports query over netlink interface returns stable IB device index as part of it. This index much better identifier than sysfs name that can be renamed and/or disappear. Up till now, this index was used internally by libibverbs, but the next patch will rely on this API in the librdmacm code. The -1 as returned value means that kernel doesn't support indexes. Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
- Loading branch information
Leon Romanovsky
committed
May 13, 2020
1 parent
4ca5caf
commit 307f922
Showing
9 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
date: ' 2020-04-22' | ||
footer: libibverbs | ||
header: "Libibverbs Programmer's Manual" | ||
layout: page | ||
license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' | ||
section: 3 | ||
title: IBV_GET_DEVICE_INDEX | ||
--- | ||
|
||
# NAME | ||
|
||
ibv_get_device_index - get an RDMA device index | ||
|
||
# SYNOPSIS | ||
|
||
```c | ||
#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_guid**(3), | ||
**ibv_get_device_list**(3), | ||
**ibv_open_device**(3) | ||
# AUTHOR | ||
Leon Romanovsky <leonro@mellanox.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters