Re: [PATCH for-next 09/13] RDMA/bnxt_re: Allow posting when QPs are in error

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

 



On Thu, Jun 22, 2017 at 11:10 AM, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
>> +static bool bnxt_qplib_is_qp_in_sq_flushlist(struct bnxt_qplib_qp *qp)
>> +{
>> +     bool flushed = false;
>> +     unsigned long flags;
>> +
>> +     spin_lock_irqsave(&qp->scq->flush_lock, flags);
>> +     flushed = qp->sq.flushed;
>> +     spin_unlock_irqrestore(&qp->scq->flush_lock, flags);
>> +     return flushed;
>
> I don't really understand the lock/unlock here. What exactly do you
> protect? Is it the change of "flushed"? It can be and will be worthless
> immediately after your unlock.
>
> You should protect the whole flow which depends on your "flushed".
Agreed. This lock is required for handling the completions when the qp
moves from error to
reset state. But surely it needs a rework.  I will post  v2.
--
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