Re: [PATCH for-next] RDMA/siw: Simplify QP representation.

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

 



On Mon, Dec 09, 2019 at 04:50:23PM +0000, Bernard Metzler wrote:
> -----"Jason Gunthorpe" <jgg@xxxxxxxx> wrote: -----
>
> >To: "Bernard Metzler" <bmt@xxxxxxxxxxxxxx>
> >From: "Jason Gunthorpe" <jgg@xxxxxxxx>
> >Date: 12/09/2019 05:07PM
> >Cc: linux-rdma@xxxxxxxxxxxxxxx, krishna2@xxxxxxxxxxx, leon@xxxxxxxxxx
> >Subject: [EXTERNAL] Re: [PATCH for-next] RDMA/siw: Simplify QP
> >representation.
> >
> >On Fri, Nov 29, 2019 at 05:25:09PM +0100, Bernard Metzler wrote:
> >> Change siw_qp to contain ib_qp. Use ib_qp's uobject pointer
> >> to distinguish kernel level and user level applications.
> >> Apply same mechanism for kerne/user level application
> >> detection to shared receive queues and completion queues.
> >
> >Drivers should not touch the uobject. If I recall you can use
> >restrack
> >to tell if it is kernel or user created
> >
> 'bool res->user' would probably be it, but I stumbled
> upon this comment (e.g. in struct ib_qp):
>
>         /*
>          * Implementation details of the RDMA core, don't use in drivers:
>          */
>         struct rdma_restrack_entry     res;
>
>
> So we shall not use restrack information in drivers..?
> Shall restrack better export a query such as
> 'rdma_restrack_is_user(resource)'?

rdma_is_kernel_res() inside include/rdma/restrack.h

I added the comment mentioned above before we started to remove uobject
accesses.

Thanks



[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