James,
Here are a few small changes. Reduces some debug output in the async thread and
fixes listen
processing of EBUSY.
-arlin
Signed-off by: Arlin Davis <[EMAIL PROTECTED]>
Index: dapl/openib_cma/dapl_ib_util.c
===================================================================
--- dapl/openib_cma/dapl_ib_util.c (revision 5694)
+++ dapl/openib_cma/dapl_ib_util.c (working copy)
@@ -736,7 +736,7 @@ void dapli_thread(void *arg)
int ret,idx,fds;
char rbuf[2];
- dapl_dbg_log (DAPL_DBG_TYPE_CM,
+ dapl_dbg_log (DAPL_DBG_TYPE_UTIL,
" ib_thread(%d,0x%x): ENTER: pipe %d ucma %d\n",
getpid(), g_ib_thread, g_ib_pipe[0], rdma_get_fd());
@@ -776,7 +776,7 @@ void dapli_thread(void *arg)
ufds[idx].revents = 0;
uhca[idx] = hca;
- dapl_dbg_log(DAPL_DBG_TYPE_CM,
+ dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
" ib_thread(%d) poll_fd: hca[%d]=%p, async=%d"
" pipe=%d cm=%d cq=d\n",
getpid(), hca, ufds[idx-1].fd,
@@ -792,14 +792,14 @@ void dapli_thread(void *arg)
dapl_os_unlock(&g_hca_lock);
ret = poll(ufds, fds, -1);
if (ret <= 0) {
- dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+ dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
" ib_thread(%d): ERR %s poll\n",
getpid(),strerror(errno));
dapl_os_lock(&g_hca_lock);
continue;
}
- dapl_dbg_log(DAPL_DBG_TYPE_CM,
+ dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
" ib_thread(%d) poll_event: "
" async=0x%x pipe=0x%x cm=0x%x cq=0x%x\n",
getpid(), ufds[idx-1].revents, ufds[0].revents,
Index: dapl/openib_cma/dapl_ib_cm.c
===================================================================
--- dapl/openib_cma/dapl_ib_cm.c (revision 5694)
+++ dapl/openib_cma/dapl_ib_cm.c (working copy)
@@ -554,7 +554,6 @@ dapls_ib_setup_conn_listener(IN DAPL_IA
IN DAPL_SP *sp_ptr )
{
DAT_RETURN dat_status = DAT_SUCCESS;
- int status;
ib_cm_srvc_handle_t conn;
/* Allocate CM and initialize lock */
@@ -576,7 +575,7 @@ dapls_ib_setup_conn_listener(IN DAPL_IA
if (rdma_bind_addr(conn->cm_id,
(struct sockaddr *)&ia_ptr->hca_ptr->hca_address)) {
- if (errno == -EBUSY)
+ if (errno == EBUSY)
dat_status = DAT_CONN_QUAL_IN_USE;
else
dat_status =
@@ -597,15 +596,13 @@ dapls_ib_setup_conn_listener(IN DAPL_IA
" listen(conn=%p cm_id=%d)\n",
sp_ptr->cm_srvc_handle,conn->cm_id);
- status = rdma_listen(conn->cm_id,64); /* backlog to 64 */
+ if (rdma_listen(conn->cm_id,64)) { /* backlog to 64 */
- if (status) {
- if (status == -EBUSY)
+ if (errno == EBUSY)
dat_status = DAT_CONN_QUAL_IN_USE;
else
dat_status =
dapl_convert_errno(errno,"setup_listener");
-
goto bail;
}
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general