diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-11-10 17:20:24 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 19:57:04 -0800 |
commit | 077b1a5af062a9e430d11c8dee425f88f053d377 (patch) | |
tree | 5ef7fae80813b6feda69ad9abb2a71e1e7694288 | |
parent | 9351061f8b56d566a878af69aaa7ca20629b10b2 (diff) | |
download | libmthca-077b1a5af062a9e430d11c8dee425f88f053d377.tar.gz |
Fix bugs in long receive list posting fixes
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/qp.c | 5 | ||||
-rw-r--r-- | src/srq.c | 4 |
3 files changed, 11 insertions, 3 deletions
@@ -1,5 +1,10 @@ 2005-11-09 Roland Dreier <roland@cisco.com> + * src/srq.c (mthca_tavor_post_srq_recv), src/qp.c + (mthca_tavor_post_recv): Fix bugs in long receive list handling; + need to set nreq to 0 and not put 256 credits into the second + doorbell word. + * src/cq.c (mthca_cq_clean): Handle case where CQ indices wrap around by treating signed comparisons of prod_index and cq->cons_index carefully. @@ -314,8 +314,10 @@ int mthca_tavor_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr, for (nreq = 0; wr; ++nreq, wr = wr->next) { if (nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB) { + nreq = 0; + doorbell[0] = htonl((qp->rq.next_ind << qp->rq.wqe_shift) | size0); - doorbell[1] = htonl((ibqp->qp_num << 8) | nreq); + doorbell[1] = htonl(ibqp->qp_num << 8); /* * Make sure that descriptors are written @@ -326,7 +328,6 @@ int mthca_tavor_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr, mthca_write64(doorbell, to_mctx(ibqp->context), MTHCA_RECV_DOORBELL); qp->rq.head += nreq; - nreq = 0; size0 = 0; } @@ -99,8 +99,10 @@ int mthca_tavor_post_srq_recv(struct ibv_srq *ibsrq, for (nreq = 0; wr; ++nreq, wr = wr->next) { if (nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB) { + nreq = 0; + doorbell[0] = htonl(first_ind << srq->wqe_shift); - doorbell[1] = htonl((srq->srqn << 8) | nreq); + doorbell[1] = htonl(srq->srqn << 8); /* * Make sure that descriptors are written |