Re: [PATCH v2 11/13] SoftiWarp Completion Queue methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Shiraz Saleem <shiraz.saleem@xxxxxxxxx> wrote: -----

>To: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
>From: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
>Date: 10/20/2017 02:58PM
>Cc: linux-rdma@xxxxxxxxxxxxxxx
>Subject: Re: [PATCH v2 11/13] SoftiWarp Completion Queue methods
>
>On Fri, Oct 06, 2017 at 08:28:51AM -0400, Bernard Metzler wrote:
>> Signed-off-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
>> ---
>>  drivers/infiniband/sw/siw/siw_cq.c | 164
>+++++++++++++++++++++++++++++++++++++
>>  1 file changed, 164 insertions(+)
>>  create mode 100644 drivers/infiniband/sw/siw/siw_cq.c
>> 
>> diff --git a/drivers/infiniband/sw/siw/siw_cq.c
>b/drivers/infiniband/sw/siw/siw_cq.c
>> new file mode 100644
>> index 000000000000..0cd6e010e7a7
>> --- /dev/null
>> +++ b/drivers/infiniband/sw/siw/siw_cq.c
>
>> +/*
>> + * Reap one CQE from the CQ.
>> + *
>> + * Caller must hold qp read lock
>
>Why is this a mandate?
>
>
Good point - it is not. Will remove that stupid comment. 

>> + * TODO: Provide routine which can read more than one CQE
>> + */
>> +int siw_reap_cqe(struct siw_cq *cq, struct ib_wc *ofa_wc)
>> +{
>> +	struct siw_cqe *cqe;
>> +	unsigned long flags;
>> +
>> +	spin_lock_irqsave(&cq->lock, flags);
>> +
>> +	cqe = &cq->queue[cq->cq_get % cq->num_cqe];
>> +	if (cqe->flags & SIW_WQE_VALID) {
>> +		siw_wc_siw2ofa(cqe, ofa_wc);
>> +
>> +		if (cq->kernel_verbs) {
>> +			dprint(DBG_WR,
>> +				" QP%d, CQ%d: Reap WQE type: %d at idx %d\n",
>> +				QP_ID((struct siw_qp *)cqe->qp), OBJ_ID(cq),
>> +				cqe->opcode, cq->cq_get % cq->num_cqe);
>> +			siw_qp_put(cqe->qp);
>
>Where do we do the siw_qp_get()?
>
>

We do it when we create the CQE, that is, in siw_sqe_complete(), or
siw_rqe_complete(). See siw_qp.c

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux