[ofw] [PATCH 08/11] uDAPL scm: destroy QP called before disconnect

Davis, Arlin R arlin.r.davis at intel.com
Mon Jul 6 12:52:21 PDT 2009


Handle the case where QP is destroyed before
disconnect processing. Windows supports
reinit_qp during a disconnect call by
destroying the QP and recreating the
QO instead of state change from reset
to init. Call disconnect in destroy
CM code to handle this unexpected state.

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

diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index 5708214..9713641 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -283,6 +283,9 @@ void dapls_ib_cm_free(dp_ib_cm_handle_t cm_ptr, DAPL_EP *ep)
 		return;
 	}
 
+	/* free could be called before disconnect */
+	dapli_socket_disconnect(cm_ptr);
+
 	dapl_os_lock(&cm_ptr->lock);
 	cm_ptr->state = DCM_DESTROY;
 	if ((cm_ptr->ep) && (cm_ptr->ep->cm_handle == cm_ptr)) {
-- 
1.5.2.5




More information about the ofw mailing list