aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-11-10 17:20:24 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 19:57:04 -0800
commit077b1a5af062a9e430d11c8dee425f88f053d377 (patch)
tree5ef7fae80813b6feda69ad9abb2a71e1e7694288
parent9351061f8b56d566a878af69aaa7ca20629b10b2 (diff)
downloadlibmthca-077b1a5af062a9e430d11c8dee425f88f053d377.tar.gz
Fix bugs in long receive list posting fixes
-rw-r--r--ChangeLog5
-rw-r--r--src/qp.c5
-rw-r--r--src/srq.c4
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ccc6d4b..f888def 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/src/qp.c b/src/qp.c
index fb425d5..bfe1003 100644
--- a/src/qp.c
+++ b/src/qp.c
@@ -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;
}
diff --git a/src/srq.c b/src/srq.c
index 78f472f..c6b6e37 100644
--- a/src/srq.c
+++ b/src/srq.c
@@ -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