[ofw] [PATCH 04/12] dapl-2.0: scm: add support for canceling conn request that times out.

Davis, Arlin R arlin.r.davis at intel.com
Wed May 19 11:11:26 PDT 2010


print warning message during timeout.

Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
---
 dapl/common/dapl_ep_connect.c |    2 ++
 dapl/openib_scm/cm.c          |   11 ++++++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/dapl/common/dapl_ep_connect.c b/dapl/common/dapl_ep_connect.c
index 4e5e112..1f193ae 100755
--- a/dapl/common/dapl_ep_connect.c
+++ b/dapl/common/dapl_ep_connect.c
@@ -334,6 +334,8 @@ dapl_ep_connect(IN DAT_EP_HANDLE ep_handle,
 
 			dapls_timer_set(ep_ptr->cxn_timer,
 					dapls_ep_timeout, ep_ptr, timeout);
+
+			dapl_log(DAPL_DBG_TYPE_WARN, " dapl_ep_connect timeout = %d us\n", timeout);
 		}
 		dapl_os_unlock(&ep_ptr->header.lock);
 	}
diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index 957066a..6958b67 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -1366,7 +1366,16 @@ dapls_ib_disconnect_clean(IN DAPL_EP * ep_ptr,
 			  IN DAT_BOOLEAN active,
 			  IN const ib_cm_events_t ib_cm_event)
 {
-	/* nothing to cleanup */
+	if (ib_cm_event == IB_CME_TIMEOUT) {
+		dp_ib_cm_handle_t cm_ptr = dapl_get_cm_from_ep(ep_ptr);
+
+		dapl_log(DAPL_DBG_TYPE_WARN,
+			"dapls_ib_disc_clean: CONN_TIMEOUT ep %p cm %p %s\n",
+			ep_ptr, cm_ptr, dapl_cm_state_str(cm_ptr->state));
+		
+		/* schedule release of socket and local resources */
+		dapli_cm_free(cm_ptr);
+	}
 }
 
 /*
-- 
1.5.2.5




More information about the ofw mailing list