On Sun, Feb 03, 2019 at 06:43:31PM +0200, Shamir Rabinovitch wrote: > > I don't think we should be duplicating the driver object, sharing > > should be a uverbs thing where it just creates a new uobject and > > points to the same driver object. Somehow this has to work out > > a lifetime too. > > I think I was miss understood here... Duplicating the object is not > duplicating the ib_x HW object but rather letting the driver to copy the > related information from the existing ib_x object to the user-space > library. Example is the pdn number in mlx4 ib_bd creation. We should have a query API for drivers to call if they want to re-attach to shared objects. The query can return any driver specific information that might be needed. Maybe drivers that don't implement the query can't do the share? Jason