diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2017-06-18 14:39:59 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2017-08-10 13:21:54 +0300 |
commit | ecc82c53f9a4ce08ba7df626a4262c86841ced8f (patch) | |
tree | d335b803fb7c7d11b744a42a00519d4487e1b018 /drivers/infiniband/core/core_priv.h | |
parent | RDMA/core: Add iterator over ib_devices (diff) | |
download | linux-dev-ecc82c53f9a4ce08ba7df626a4262c86841ced8f.tar.xz linux-dev-ecc82c53f9a4ce08ba7df626a4262c86841ced8f.zip |
RDMA/core: Add and expose static device index
This patch adds static device index in similar fashion to
already available in netdev world (struct net->ifindex).
In downstream patches, the RDMA nelink will use this idx-to-ib_device
conversion, so as part of this commit, we are exposing the translation
function to be visible for IB/core users.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/core_priv.h')
-rw-r--r-- | drivers/infiniband/core/core_priv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h index 0c175590cf92..cbdcc81e1df8 100644 --- a/drivers/infiniband/core/core_priv.h +++ b/drivers/infiniband/core/core_priv.h @@ -309,4 +309,9 @@ static inline int ib_mad_enforce_security(struct ib_mad_agent_private *map, return 0; } #endif + +struct ib_device *__ib_device_get_by_index(u32 ifindex); +/* RDMA device netlink */ +void nldev_init(void); +void nldev_exit(void); #endif /* _CORE_PRIV_H */ |