public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Shlomo Pongratz <shlomop-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: XRC and ib_poll_cq
Date: Wed, 3 Apr 2013 09:26:42 +0300	[thread overview]
Message-ID: <515BCBA2.5010600@mellanox.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A823736F36A119-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

On 4/3/2013 3:35 AM, Hefty, Sean wrote:
>> Thanks, it seems that I asked the question in a wrong way.
>> The context is what I need eventually but in order to find it I first
>> need to recover the QP or the XRC SRQ.
>> Per core there may be several QP and SRQ using the same CQ.
>> When doing ib_poll_cq on the CQ the WQE in hand has only an ib_qp pointer.
> Correct - dereference the qp pointer to get the context, srq, and srq_context.
>
> struct ib_wc wc;
>
> ib_poll_cq(...&wc)
> my_qp = wc.qp;
> my_qp_context = wc.qp->qp_context;
> my_srq = wc.qp->srq;
> my_srq_context = wc.qp->srq->srq_context;
>
> this tells you what QP/SRQ the completion is related to.
Hi Sean,

Your answer actually raises another question.
According to the annex the XRC SRQ is used directly (it is like an RD QP 
but without a requester side), and also in the user space example 
"xrc_pingpong.c" no QP is created on-top of the XRC SRQ.
So the question is what is this QP that you de-referenced in the 
statement "my_srq = wc.qp->srq;"?
Is it just and artifact of the implementation?

S.P.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-04-03  6:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 20:02 XRC and ib_poll_cq Shlomo Pongratz
     [not found] ` <515B393F.2080405-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-04-03  0:35   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A823736F36A119-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-04-03  6:26       ` Shlomo Pongratz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-04-02 16:45 Shlomo Pongratz
     [not found] ` <515B0B35.3090401-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-04-02 19:16   ` Hefty, Sean

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=515BCBA2.5010600@mellanox.com \
    --to=shlomop-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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