[openib-general] [PATCH] [CM] handle stale connection reject

Sean Hefty mshefty at ichips.intel.com
Tue Feb 22 16:42:10 PST 2005


This patch properly places a local cm_id into the timewait state after
receiving a stale connection reject message.  It also fixes a missing
newline character at the end of the file that somehow got mangled with
my last checkin.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>

Index: infiniband/core/cm.c
===================================================================
--- infiniband/core/cm.c	(revision 1868)
+++ infiniband/core/cm.c	(working copy)
@@ -1862,7 +1862,10 @@ static int cm_rej_handler(struct cm_work
 	case IB_CM_MRA_REQ_SENT:
 	case IB_CM_MRA_REQ_RCVD:
 	case IB_CM_MRA_REP_RCVD:
-		cm_reset_to_idle(cm_id_priv);
+		if (rej_msg->reason == IB_CM_REJ_STALE_CONN)
+			cm_enter_timewait(cm_id_priv);
+		else
+			cm_reset_to_idle(cm_id_priv);
 		break;
 	case IB_CM_DREQ_SENT:
 		wr_id = (unsigned long) cm_id_priv->msg;
@@ -3086,4 +3089,4 @@ static void __exit ib_cm_cleanup(void)
 
 module_init(ib_cm_init);
 module_exit(ib_cm_cleanup);
-\ No newline at end of file
+



More information about the general mailing list