> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to