Skip to contentSkip to conversation

RDMA/cxgb4: Mark the QP in error before disabling the Q in the firmware

PATCH In review Kumar Sanghvi 2 participants 2 messages Oct 25, 2011 – Oct 28, 2011 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/cxgb4: Mark the QP in error before disabling the Q in the firmware

From: Tom Tucker <tom-/Yg/[email protected]>

The QP needs to be moved to error before telling the firwmare to shutdown the queue. Otherwise, the application can submit WR that will never get fetched by the hardware and never flushed by the driver.

---
 drivers/infiniband/hw/cxgb4/qp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/infiniband/hw/cxgb4/qp.c +4 -0
index a391a4a..d6ccc7e 100644
@@ -1226,6 +1226,8 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
 				disconnect = 1;
 				c4iw_get_ep(&qhp->ep->com);
 			}
+			if (qhp->ibqp.uobject)
+				t4_set_wq_in_error(&qhp->wq);
 			ret = rdma_fini(rhp, qhp, ep);
 			if (ret)
 				goto err;
@@ -1244,6 +1246,8 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
 			break;
 		case C4IW_QP_STATE_ERROR:
 			set_state(qhp, C4IW_QP_STATE_ERROR);
+			if (qhp->ibqp.uobject)
+				t4_set_wq_in_error(&qhp->wq);
 			if (!internal) {
 				abort = 1;
 				disconnect = 1;
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by
#2 lore raw
In reply to a message not in the archive
Quoted 8 lines · Kumar Sanghvi

From: Tom Tucker<tom-/Yg/[email protected]>

The QP needs to be moved to error before telling the firwmare to shutdown the queue. Otherwise, the application can submit WR that will never get fetched by the hardware and never flushed by the driver.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html