[openib-general] [PATCH] libmthca: overflow test typo

Michael S. Tsirkin mst at mellanox.co.il
Mon Jan 30 08:51:21 PST 2006


Fix typo in overflow test in libmthca.
Noted by Yossi Leybovich.

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

Index: openib/src/userspace/libmthca/src/qp.c
===================================================================
--- openib/src/userspace/libmthca/src/qp.c	(revision 5134)
+++ openib/src/userspace/libmthca/src/qp.c	(working copy)
@@ -349,7 +349,7 @@ int mthca_tavor_post_recv(struct ibv_qp 
 			size0 = 0;
 		}
 
-		if (wq_overflow(&qp->rq, nreq, to_mcq(qp->ibv_qp.send_cq))) {
+		if (wq_overflow(&qp->rq, nreq, to_mcq(qp->ibv_qp.recv_cq))) {
 			ret = -1;
 			*bad_wr = wr;
 			goto out;
@@ -690,7 +690,7 @@ int mthca_arbel_post_recv(struct ibv_qp 
 	ind = qp->rq.head & (qp->rq.max - 1);
 
 	for (nreq = 0; wr; ++nreq, wr = wr->next) {
-		if (wq_overflow(&qp->rq, nreq, to_mcq(qp->ibv_qp.send_cq))) {
+		if (wq_overflow(&qp->rq, nreq, to_mcq(qp->ibv_qp.recv_cq))) {
 			ret = -1;
 			*bad_wr = wr;
 			goto out;

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list