diff options
author | Eli Cohen <eli@mellanox.co.il> | 2007-06-11 14:43:26 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-06-11 14:43:26 -0700 |
commit | 919c3773f87dcd310a6dc02dd6112f844ab17353 (patch) | |
tree | 4ee433d6b807b3557857bce46a531c2723bc5658 | |
parent | e7d065192e10851ce6a6506dbc5227f4dbaf8fcd (diff) | |
download | libmlx4-919c3773f87dcd310a6dc02dd6112f844ab17353.tar.gz |
Fix handling of wq->tail for send completions
Cast the increment added to wq->tail when send completions are
processed to uint16_t to avoid using wrong values caused by standard
integer promotions.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | src/cq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -238,7 +238,7 @@ static int mlx4_poll_one(struct mlx4_cq *cq, if (is_send) { wq = &(*cur_qp)->sq; wqe_index = ntohs(cqe->wqe_index); - wq->tail += wqe_index - (uint16_t) wq->tail; + wq->tail += (uint16_t) (wqe_index - (uint16_t) wq->tail); wc->wr_id = wq->wrid[wq->tail & (wq->max - 1)]; ++wq->tail; } else if ((*cur_qp)->ibv_qp.srq) { |