[ofa-general] [PATCH for-2.6.22] IB/mthca: fix send CQE with error for QP connected to SRQ

Michael S. Tsirkin mst at dev.mellanox.co.il
Sun May 27 08:06:42 PDT 2007


mthca_free_err_wqe currently treats both send and receive CQEs identically in
case of SRQ.  But for tavor mode hardware, send CQEs with error can be chained
together even if the RQ is part of SRQ, so we miss some CQEs.
This, in turn, triggers crashes in IPoIB CM:
https://bugs.openfabrics.org//show_bug.cgi?id=604.
Fix by following the WQE chain for all send CQEs, same as non-SRQ QP.

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

---

This is a fix for bug 604 in ofa bugzilla. Pls consider for 2.6.22.

diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index 0276649..7474646 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -2287,7 +2287,7 @@ void mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send,
 	 * For SRQs, all WQEs generate a CQE, so we're always at the
 	 * end of the doorbell chain.
 	 */
-	if (qp->ibqp.srq) {
+	if (qp->ibqp.srq && !is_send) {
 		*new_wqe = 0;
 		return;
 	}

-- 
MST



More information about the general mailing list