DAPL_DBG_TYPE_RTN = 0x0200,
DAPL_DBG_TYPE_EXCEPTION = 0x0400,
DAPL_DBG_TYPE_SRQ = 0x0800,
- DAPL_DBG_TYPE_CNTR = 0x1000
+ DAPL_DBG_TYPE_CNTR = 0x1000,
+ DAPL_DBG_TYPE_CM_LIST = 0x2000
} DAPL_DBG_TYPE;
hca_ptr->ib_trans.cr_state = IB_THREAD_EXIT;
dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " cr_thread(hca %p) exit\n", hca_ptr);
}
+
+
+#ifdef DAPL_COUNTERS
+/* Debug aid: List all Connections in process and state */
+void dapls_print_cm_list(IN DAPL_IA *ia_ptr)
+{
+ /* Print in process CR's for this IA, if debug type set */
+ int i = 0;
+ dp_ib_cm_handle_t cr, next_cr;
+
+ dapl_os_lock(&ia_ptr->hca_ptr->ib_trans.lock);
+ if (!dapl_llist_is_empty((DAPL_LLIST_HEAD*)
+ &ia_ptr->hca_ptr->ib_trans.list))
+ next_cr = dapl_llist_peek_head((DAPL_LLIST_HEAD*)
+ &ia_ptr->hca_ptr->ib_trans.list);
+ else
+ next_cr = NULL;
+
+ printf("\n DAPL IA CONNECTIONS IN PROCESS:\n");
+ while (next_cr) {
+ cr = next_cr;
+ next_cr = dapl_llist_next_entry((DAPL_LLIST_HEAD*)
+ &ia_ptr->hca_ptr->ib_trans.list,
+ (DAPL_LLIST_ENTRY*)&cr->entry);
+
+ printf( " CONN[%d]: sp %p ep %p sock %d %s %s -> %s\n",
+ i, cr->sp, cr->ep, cr->socket,
+ cr->dst.qp_type == IBV_QPT_RC ? "RC" : "UD",
+ dapl_cm_state_str(cr->state),
+ inet_ntoa(((struct sockaddr_in *)
+ &cr->dst.ia_address)->sin_addr));
+ i++;
+ }
+ printf("\n");
+ dapl_os_unlock(&ia_ptr->hca_ptr->ib_trans.lock);
+}
+#endif
int dapli_cq_thread_init(struct dapl_hca *hca_ptr);
void dapli_cq_thread_destroy(struct dapl_hca *hca_ptr);
DAT_RETURN dapli_socket_disconnect(dp_ib_cm_handle_t cm_ptr);
+void dapls_print_cm_list(IN DAPL_IA *ia_ptr);
DAT_RETURN
dapls_modify_qp_state ( IN ib_qp_handle_t qp_handle,
}
}
+STATIC _INLINE_ char * dapl_cm_state_str(IN int st)
+{
+ static char *cm_state[] = {
+ "SCM_INIT",
+ "SCM_LISTEN",
+ "SCM_CONN_PENDING",
+ "SCM_RTU_PENDING",
+ "SCM_ACCEPTING",
+ "SCM_ACCEPTING_DATA",
+ "SCM_ACCEPTED",
+ "SCM_REJECTED",
+ "SCM_CONNECTED",
+ "SCM_DISCONNECTED",
+ "SCM_DESTROY"
+ };
+ return ((st < 0 || st > 10) ? "Invalid CM state?" : cm_state[st]);
+}
+
/*
* Definitions required only for DAT 1.1 builds
*/