Skip to content
Commit 324e227e authored by Jason Gunthorpe's avatar Jason Gunthorpe
Browse files

RDMA/device: Add ib_device_get_by_netdev()



Several drivers need to find the ib_device from a given netdev. rxe needs
this at speed in an unsleepable context, so choose to implement the
translation using a RCU safe hash table.

The hash table can have a many to one mapping. This is intended to support
some future case where multiple IB drivers (ie iWarp and RoCE) connect to
the same netdevs. driver_ids will need to be different to support this.

In the process this makes the struct ib_device and ib_port_data RCU safe
by deferring their kfrees.

Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent c2261dd7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment