#define DAPL_ATS_NAME ATS_NAME
#define HCA_IPV6_ADDRESS_LENGTH 16
+/* until dapl_ibal_util.h define of IB_INVALID_HANDLE which overlaps the
+ * Windows ib_types.h typedef enu ib_api_status_t IB_INVALID_HANDLE is fixed.
+ */
+#undef IB_INVALID_HANDLE
+#define DAPL_IB_INVALID_HANDLE NULL
+
int g_dapl_loopback_connection = 0;
extern dapl_ibal_root_t dapl_ibal_root;
return;
}
- if (ep_ptr->cm_handle == IB_INVALID_HANDLE )
+ if (ep_ptr->cm_handle == DAPL_IB_INVALID_HANDLE )
{
dapl_dbg_log (DAPL_DBG_TYPE_CM,
"--> %s: Invalid EP->CM handle?\n", __FUNCTION__);
{
dapl_dbg_log (DAPL_DBG_TYPE_CM,
"--> %s: BAD EP Magic EP=%lx\n", __FUNCTION__,ep_ptr);
+ return DAT_SUCCESS;
}
- if (ep_ptr->cm_handle == IB_INVALID_HANDLE )
+ if (ep_ptr->cm_handle == DAPL_IB_INVALID_HANDLE )
{
dapl_dbg_log (DAPL_DBG_TYPE_CM,
"--> %s: Invalid EP->CM handle, OK.\n", __FUNCTION__);
{
ep_ptr->sent_discreq = DAT_TRUE;
ib_status = ib_cm_dreq ( &cm_dreq );
+
+ if ( ib_status == IB_SUCCESS )
+ dapl_dbg_log (DAPL_DBG_TYPE_CM,
+ "--> DsD: EP %p DREQ SENT\n", ep_ptr);
+
/* tolerate INVALID_STATE error as the other side can race ahead and
* generate a DREQ before we do.
*/
- if ( ib_status == IB_INVALID_STATE )
+ if ( ib_status == IB_INVALID_STATE || ib_status == IB_INVALID_HANDLE )
+ {
ib_status = IB_SUCCESS;
-
- if (ib_status)
+ }
+ else if (ib_status)
{
dapl_dbg_log(DAPL_DBG_TYPE_ERR,
"%s() EP %p ib_cm_dreq() status %s\n",
__FUNCTION__,ep_ptr,ib_get_err_str(ib_status));
}
- if ( ib_status == IB_SUCCESS )
- dapl_dbg_log (DAPL_DBG_TYPE_CM,
- "--> DsD: EP %p DREQ SENT\n", ep_ptr);
}
return ib_status;
}
return DAT_INVALID_PARAMETER;
}
- if (cr_ptr->sp_ptr == IB_INVALID_HANDLE)
+ if (cr_ptr->sp_ptr == DAPL_IB_INVALID_HANDLE)
{
dapl_dbg_log ( DAPL_DBG_TYPE_ERR,
"--> DsCH: CR = %lx invalid psp handle\n", cr_ptr);