[ofa-general] [PATCH 1/1] [v2] remove unnecessary assert from dapl_ep_free.
Arlin Davis
arlin.r.davis at intel.com
Tue Mar 18 16:32:15 PDT 2008
dat_ep_free must handle the case where a consumer calls
free in CONNECTED or DISCONNECT_PENDING states. After
free calls disconnect, there may be a pending event,
in which case the providers dapls_ib_qp_free will block
accordingly and handle pending events.
Signed-off by: Arlin Davis ardavis at ichips.intel.com
---
dapl/common/dapl_ep_free.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dapl/common/dapl_ep_free.c b/dapl/common/dapl_ep_free.c
index e4e6944..62d9644 100644
--- a/dapl/common/dapl_ep_free.c
+++ b/dapl/common/dapl_ep_free.c
@@ -111,14 +111,22 @@ dapl_ep_free (
* Invoke ep_disconnect to clean up outstanding connections
*/
(void) dapl_ep_disconnect (ep_ptr, DAT_CLOSE_ABRUPT_FLAG);
- dapl_os_assert (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECTED ||
- ep_ptr->param.ep_state == DAT_EP_STATE_UNCONNECTED);
/*
* Do verification of parameters and the state change atomically.
*/
dapl_os_lock ( &ep_ptr->header.lock );
+#ifdef DAPL_DBG
+ /* check if event pending and warn, don't assert, state is valid */
+ if (ep_ptr->param.ep_state == DAT_EP_STATE_DISCONNECT_PENDING) {
+ dapl_dbg_log (DAPL_DBG_TYPE_WARN, " dat_ep_free WARNING: "
+ "EVENT PENDING on ep %p, disconnect "
+ "and wait before calling dat_ep_free\n",
+ ep_ptr);
+ }
+#endif
+
if (ep_ptr->cxn_timer != NULL)
{
dapls_timer_cancel ( ep_ptr->cxn_timer );
--
1.5.2.5
More information about the general
mailing list