All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: XRC and ib_poll_cq
@ 2013-04-02 20:02 Shlomo Pongratz
       [not found] ` <515B393F.2080405-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Shlomo Pongratz @ 2013-04-02 20:02 UTC (permalink / raw)
  To: Hefty, Sean; +Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hi Sean,

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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: XRC and ib_poll_cq
       [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>
  0 siblings, 1 reply; 5+ messages in thread
From: Hefty, Sean @ 2013-04-03  0:35 UTC (permalink / raw)
  To: Shlomo Pongratz; +Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA

> 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.
--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: XRC and ib_poll_cq
       [not found]     ` <1828884A29C6694DAF28B7E6B8A823736F36A119-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2013-04-03  6:26       ` Shlomo Pongratz
  0 siblings, 0 replies; 5+ messages in thread
From: Shlomo Pongratz @ 2013-04-03  6:26 UTC (permalink / raw)
  To: Hefty, Sean; +Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: XRC and ib_poll_cq
       [not found] ` <515B0B35.3090401-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2013-04-02 19:16   ` Hefty, Sean
  0 siblings, 0 replies; 5+ messages in thread
From: Hefty, Sean @ 2013-04-02 19:16 UTC (permalink / raw)
  To: Shlomo Pongratz, Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA

>  From the XRC annex I understand that WQE is obtained by polling the CQ
> attached to the XRC SRQ.
> Now in "struct ib_wc" we have a pointer of type "struct ib_qp *", should
> the pointer be cast to "struct ib_srq *"?
> In short how do one gets the qp_context/srq_context?

qp_context is accessible directly from struct ib_qp.  srq_context is available from struct ib_srq, the latter of which is also in struct ib_qp.
--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* XRC and ib_poll_cq
@ 2013-04-02 16:45 Shlomo Pongratz
       [not found] ` <515B0B35.3090401-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Shlomo Pongratz @ 2013-04-02 16:45 UTC (permalink / raw)
  To: Hefty, Sean, Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Hi

 From the XRC annex I understand that WQE is obtained by polling the CQ 
attached to the XRC SRQ.
Now in "struct ib_wc" we have a pointer of type "struct ib_qp *", should 
the pointer be cast to "struct ib_srq *"?
In short how do one gets the qp_context/srq_context?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-03  6:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.