Skip to content

Commit

Permalink
RDMA/ocrdma: Fix CQE expansion of unsignaled WQE
Browse files Browse the repository at this point in the history
Fix CQE expansion of unsignaled WQE -- don't expand the CQE when the
WQE index of the completed CQE matches with last pending WQE (tail) in
the queue.

Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Parav Pandit authored and Roland Dreier committed Sep 14, 2012
1 parent fea7a08 commit ae3bca9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2219,18 +2219,18 @@ static bool ocrdma_poll_success_scqe(struct ocrdma_qp *qp,
u32 wqe_idx;

if (!qp->wqe_wr_id_tbl[tail].signaled) {
expand = true; /* CQE cannot be consumed yet */
*polled = false; /* WC cannot be consumed yet */
} else {
ibwc->status = IB_WC_SUCCESS;
ibwc->wc_flags = 0;
ibwc->qp = &qp->ibqp;
ocrdma_update_wc(qp, ibwc, tail);
*polled = true;
wqe_idx = le32_to_cpu(cqe->wq.wqeidx) & OCRDMA_CQE_WQEIDX_MASK;
if (tail != wqe_idx)
expand = true; /* Coalesced CQE can't be consumed yet */
}
wqe_idx = le32_to_cpu(cqe->wq.wqeidx) & OCRDMA_CQE_WQEIDX_MASK;
if (tail != wqe_idx)
expand = true; /* Coalesced CQE can't be consumed yet */

ocrdma_hwq_inc_tail(&qp->sq);
return expand;
}
Expand Down

0 comments on commit ae3bca9

Please sign in to comment.