This should transition the QP state to SQE when encountering a send error on the CQ. There may be a better way of doing this; I didn't spend a lot of time studying the code.
- Sean
Index: mthca_dev.h =================================================================== --- mthca_dev.h (revision 1209) +++ mthca_dev.h (working copy) @@ -311,6 +311,7 @@
void mthca_qp_event(struct mthca_dev *dev, u32 qpn, enum ib_event_type event_type); +void mthca_qp_send_error(struct mthca_qp *qp); int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask); int mthca_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, struct ib_send_wr **bad_wr); Index: mthca_cq.c =================================================================== --- mthca_cq.c (revision 1209) +++ mthca_cq.c (working copy) @@ -330,6 +330,9 @@ break; }
+ if (cqe->syndrome != SYNDROME_WR_FLUSH_ERR && is_send) + mthca_qp_send_error(qp); + err = mthca_free_err_wqe(qp, is_send, wqe_index, &dbd, &new_wqe); if (err) return err; Index: mthca_qp.c =================================================================== --- mthca_qp.c (revision 1209) +++ mthca_qp.c (working copy) @@ -288,6 +288,12 @@ wake_up(&qp->wait); }
+void mthca_qp_send_error(struct mthca_qp *qp) +{ + if (qp->state == IB_QPS_RTS) + qp->state = IB_QPS_SQE; +} + static int to_mthca_state(enum ib_qp_state ib_state) { switch (ib_state) {
_______________________________________________ openib-general mailing list [EMAIL PROTECTED] http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general