Re: [PATCH for-next v3 0/3] IB/{hw,sw}: remove 'uobject->context' dependency APIs

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

 



On Fri, Feb 15, 2019 at 03:46:07PM -0700, Jason Gunthorpe wrote:
> On Thu, Feb 07, 2019 at 06:44:46PM +0200, Shamir Rabinovitch wrote:
> > This patch set continue the cleanup started with Jason RFC patch. This
> > patch set clean only the ib_xxx creation APIs because those APIs do have
> > ib_udata.
> > 
> > The final goal of this cleanup is to remove the dependency in the IB
> > code in the ib_xxx->uobject pointer as step toward shared ib_xxx
> > objects.
> > 
> > Changelog:
> > 
> > v3: 
> > - Jason: Modify helper rdma_udata_to_drv_context
> > - Jason: Remove helper rdma_get_ucontext
> > - Christoph Hellwig: Leave ib_udata as center of the user/kernel
> > 	control flow
> > 
> > v2:
> > - Jason: Add the ib_ucontext to the attr bundle and make sure
> >   rdma_get_ucontext can't fail
> > - Jason: Add helper macro to the the driver's context out of
> >   ib_udata
> > - Leon: Un needed tests in mlx4_ib_db_unmap_user
> > 
> > 
> > Shamir Rabinovitch (3):
> >   IB/uverbs: add ib_ucontext to uverbs_attr_bundle sent from ioctl and
> >     cmd flows
> >   IB/verbs: add helper function rdma_udata_to_drv_context
> >   IB/{hw,sw}: remove 'uobject->context' dependency in object creation
> >     APIs
> 
> Applied to for-next, with a number of revisions
> - Needed rebasing
> - Fixes compilation failures in HNS. Enable COMPILE_TEST to get all
>   drivers turned on in .config

Thanks I did not know this.

> - Minor re-formatting
> - Few missed conversion places in mlx5 raw qp and devx
> 
> Please check over the patches I pushed to wip/jgg-for-next

Thanks will do.

> 
> The next logical series is to add udata parameters to all the destroy
> functions and get rid of their references to udata->context. I would
> like to get to a point where uobj->context is never seen in any drivers,
> it will be really close after the destroy change.

I already have the patch set. Need some go-no-go test and it's ready.

> 
> Also, it would make sense to me to now clean up all the ops signatures
> that pass both a ucontext and a udata - we should never pass both,
> just pass the udata. Would you do that rationalization too?

Sure. I already did this. Will double check myself here.

> 
> Thanks,
> Jason

After this patch set I would like to send RFC for a way to add the
'clone' function pointer for each ib_xx core object. I think it can be
done by adding wrapper struct to each ib_xx core object via macro as you
did for the type destroy in uverbs. 

Core objects are allocated by drivers so it's up to the driver to decide
if it add the 'clone' function or not. If object is not shareable in
that driver, 'clone' will be left as NULL.

'clone' purpose is to copy the driver specific information to user from
existing ib_x object.

Thanks, Shamir



[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