[ofa-general] [PATCH] IB/ipath - Don't put QP in timeout queue if waiting to send

Ralph Campbell ralphc at pathscale.com
Fri Apr 27 11:08:40 PDT 2007


This patch fixes a problem which causes too many RC timeouts
and retransmits.

Hopefully, this can be included in OFED 1.2 as well as
going upstream.

Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>

diff -r 9a0d437dd1a1 drivers/infiniband/hw/ipath/ipath_rc.c
--- a/drivers/infiniband/hw/ipath/ipath_rc.c	Wed Apr 18 17:46:23 2007 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_rc.c	Wed Apr 18 17:47:12 2007 -0700
@@ -228,18 +228,13 @@ int ipath_make_rc_req(struct ipath_qp *q
 		goto done;
 
 	if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK) ||
-	    qp->s_rnr_timeout)
+	    qp->s_rnr_timeout || qp->s_wait_credit)
 		goto bail;
 
 	/* Limit the number of packets sent without an ACK. */
 	if (ipath_cmp24(qp->s_psn, qp->s_last_psn + IPATH_PSN_CREDIT) > 0) {
 		qp->s_wait_credit = 1;
 		dev->n_rc_stalls++;
-		spin_lock(&dev->pending_lock);
-		if (list_empty(&qp->timerwait))
-			list_add_tail(&qp->timerwait,
-				      &dev->pending[dev->pending_index]);
-		spin_unlock(&dev->pending_lock);
 		goto bail;
 	}
 
diff -r 9a0d437dd1a1 drivers/infiniband/hw/ipath/ipath_verbs.h
--- a/drivers/infiniband/hw/ipath/ipath_verbs.h	Wed Apr 18 17:46:23 2007 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.h	Wed Apr 18 17:47:12 2007 -0700
@@ -423,7 +423,7 @@ struct ipath_qp {
 #define IPATH_S_RDMAR_PENDING	0x04
 #define IPATH_S_ACK_PENDING	0x08
 
-#define IPATH_PSN_CREDIT	2048
+#define IPATH_PSN_CREDIT	512
 
 /*
  * Since struct ipath_swqe is not a fixed size, we can't simply index into





More information about the general mailing list