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