public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Bernard Metzler <BMT@zurich.ibm.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	linux-rdma@vger.kernel.org, krishna2@chelsio.com
Subject: Re: [PATCH for-next] RDMA/siw: Simplify QP representation.
Date: Mon, 9 Dec 2019 20:29:44 +0200	[thread overview]
Message-ID: <20191209182944.GE67461@unreal> (raw)
In-Reply-To: <OF3F5E9911.A6946CC7-ON002584CB.0059DED2-002584CB.005C8103@notes.na.collabserv.com>

On Mon, Dec 09, 2019 at 04:50:23PM +0000, Bernard Metzler wrote:
> -----"Jason Gunthorpe" <jgg@ziepe.ca> wrote: -----
>
> >To: "Bernard Metzler" <bmt@zurich.ibm.com>
> >From: "Jason Gunthorpe" <jgg@ziepe.ca>
> >Date: 12/09/2019 05:07PM
> >Cc: linux-rdma@vger.kernel.org, krishna2@chelsio.com, leon@kernel.org
> >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

  reply	other threads:[~2019-12-09 18:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 16:25 [PATCH for-next] RDMA/siw: Simplify QP representation Bernard Metzler
2019-12-09 16:07 ` Jason Gunthorpe
2019-12-09 16:50   ` Bernard Metzler
2019-12-09 18:29     ` Leon Romanovsky [this message]
2019-12-10 12:36       ` Bernard Metzler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191209182944.GE67461@unreal \
    --to=leon@kernel.org \
    --cc=BMT@zurich.ibm.com \
    --cc=jgg@ziepe.ca \
    --cc=krishna2@chelsio.com \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox