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>
This commit is contained in:
Leon Romanovsky 2017-06-18 14:39:59 +03:00 • committed by Leon Romanovsky
commit ecc82c53f9
3 changed files with 43 additions and 1 deletions