RDMA/core: Introduce rdma_read_gid_attr_ndev_rcu() to check GID attribute
authorParav Pandit <parav@mellanox.com>
Wed, 5 Sep 2018 09:54:25 +0000 (12:54 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 12 Sep 2018 22:32:17 +0000 (16:32 -0600)
commitd6b1764a8c5ac0ad3a66c6d11d24c4fe067fe933
tree9b82b62906e476c9383f61e1c7cb929acb305dba
parent6aaecd38568557266ff7a5c3765c58322586e4ce
RDMA/core: Introduce rdma_read_gid_attr_ndev_rcu() to check GID attribute

Introduce an API rdma_read_gid_attr_ndev_rcu() to return GID attribute
netdevice which is in UP state for accessing netdevice's fields such as
net namespace and ifindex.

This is useful for users who intent to access netdevice fields under rcu
lock.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cache.c
drivers/infiniband/core/core_priv.h