[ofa-general] [PATCH] libmthca: fix posting >255 recv WRs

Michael S. Tsirkin mst at dev.mellanox.co.il
Sun May 13 08:57:08 PDT 2007


The following fixes posting lists of > 255 WRs for tavor:
rq.next_ind must be updated each doorbell, otherwise the
next doorbell will use an incorrect index.

Found by Ronni Zimmermann at Mellanox.
Signed-off-by: Michael S. Tsirkin <mst at dev.mellanox.co.il>

--

Same as the kernel patch, really.

diff --git a/src/qp.c b/src/qp.c
index f2483e9..372a418 100644
--- a/src/qp.c
+++ b/src/qp.c
@@ -412,6 +412,7 @@ 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.next_ind = ind;
 			qp->rq.head += MTHCA_TAVOR_MAX_WQES_PER_RECV_DB;
 			size0 = 0;
 		}

-- 
MST



More information about the general mailing list