Re: [PATCH v6 3/4] RDMA/Core: add RDMA_NLDEV_CMD_NEWLINK/DELLINK support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 10, 2018 at 02:15:18PM -0600, Steve Wise wrote:
> 
> On 12/10/2018 2:07 PM, Jason Gunthorpe wrote:
> > On Mon, Dec 10, 2018 at 01:47:39PM -0600, Steve Wise wrote:
> >> On 12/7/2018 1:25 PM, Jason Gunthorpe wrote:
> >>> I don't like messing with module refcount to solve a locking problem..
> >>> Here something like this compile-tested thing..
> >>>
> >>> Instead of implementing dellink as a function call implement it as a
> >>> flag 'ALLOW_USER_UNREGISTER'. The core code simply calls
> >>> ib_unregister_device_and_put() upon dellink.
> >>>
> >> Why don't we just mandate that if a driver uses rdma_link_ops, then it
> >> must support the core doing the ib_unregister_device_and_put() on a
> >> DELLINK nlmsg?
> > Yes, exactly.
> >
> > But conversely we must prevent dellink from running if the device was
> > not created by a compatible driver
> 
> That'll be handled by virtue that only devices created via NEWLINK will
> have the driver's link_ops pointer cached in the ib_device.

this is fine, but do we need link_ops to be stored if we are just
calling ib_unregister_device_and_put() There is not really anyneed for
a dellink callback, right?

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux