Re: [PATCH V4 for-next 02/10] IB/core: Introduce Work Queue object and its verbs

Yishai Hadas
2016-05-29T13:30:37Z

On 5/29/2016 3:56 PM, Sagi Grimberg wrote:
>
>> Looks good,
>>
>> Reviewed-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
>
> Wait, I have a question first,
>
> Can you explain why a wq takes a reference on a CQ?
> I don't really see why we enforce this association. I cannot
> destroy the CQ before I destroy the wq?
>
> Look at SRQs which I find quite similar (the normal one, not the XRC
> one), it does not reference the CQ.

This association WQ->CQ is same as with QP->CQ where reference is taken
on the CQ. When creating a normal SRQ there is no input CQ, only when
working with XRC one, in that case a reference is really taken.