Lines Matching refs:tail
34 u32 tail;
42 tail = RDMA_READ_UAPI_ATOMIC(u_wc->tail);
47 tail = k_wc->tail;
61 if (unlikely(next == tail || cq->cq_full)) {
183 * Allocate the completion queue entries and head/tail pointers.
319 RDMA_READ_UAPI_ATOMIC(cq->queue->tail))
322 if (cq->kqueue->head != cq->kqueue->tail)
341 u32 head, tail, n;
380 * Make sure head and tail are sane since they
386 tail = RDMA_READ_UAPI_ATOMIC(old_u_wc->tail);
390 tail = old_k_wc->tail;
395 if (tail > (u32)cq->ibcq.cqe)
396 tail = (u32)cq->ibcq.cqe;
397 if (head < tail)
398 n = cq->ibcq.cqe + 1 + head - tail;
400 n = head - tail;
405 for (n = 0; tail != head; n++) {
407 u_wc->uqueue[n] = old_u_wc->uqueue[tail];
409 k_wc->kqueue[n] = old_k_wc->kqueue[tail];
410 if (tail == (u32)cq->ibcq.cqe)
411 tail = 0;
413 tail++;
418 RDMA_WRITE_UAPI_ATOMIC(u_wc->tail, 0);
422 k_wc->tail = 0;
482 u32 tail;
491 tail = wc->tail;
492 if (tail > (u32)cq->ibcq.cqe)
493 tail = (u32)cq->ibcq.cqe;
495 if (tail == wc->head)
498 trace_rvt_cq_poll(cq, &wc->kqueue[tail], npolled);
499 *entry = wc->kqueue[tail];
500 if (tail >= cq->ibcq.cqe)
501 tail = 0;
503 tail++;
505 wc->tail = tail;