Re: [PATCH rdma-core RESEND] providers/rxe: Replace '%' with '&' in check_qp_queue_full()

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

 



On 2022/1/11 10:24, Xiao Yang wrote:
> The expression "cons == ((qp->cur_index + 1) % q->index_mask)" mistakenly
> assumes the queue is full when the number of entires is equal to "maximum - 1"
> (maximum is correct).
>
> For example:
> If cons and qp->cur_index are 0 and q->index_mask is 1, check_qp_queue_full()
> reports ENOSPC.wrote
Hi Bob,

I think the commit message also misled you.

The expression "cons == ((qp->cur_index + 1) % q->index_mask)" mistakenly
assumes the queue is full when we create an empty two-slots queue (i.e. cur_index = 0 and cons = 0)

Best Regards,
Xiao Yang




[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