From ede1d714a8e7ae99246eb382c1c1165f238cf7c3 Mon Sep 17 00:00:00 2001 From: James Lentini Date: Mon, 13 Mar 2006 18:15:49 +0000 Subject: [PATCH] r5789: Reduces some debug output in the async thread and fixes listen processing of EBUSY. Signed-off by: Arlin Davis Signed-off by: James Lentini --- dapl/openib_cma/dapl_ib_cm.c | 9 +++------ dapl/openib_cma/dapl_ib_util.c | 8 ++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dapl/openib_cma/dapl_ib_cm.c b/dapl/openib_cma/dapl_ib_cm.c index 3ae8742..9229486 100644 --- a/dapl/openib_cma/dapl_ib_cm.c +++ b/dapl/openib_cma/dapl_ib_cm.c @@ -554,7 +554,6 @@ dapls_ib_setup_conn_listener(IN DAPL_IA *ia_ptr, 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 *ia_ptr, 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 *ia_ptr, " 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; } diff --git a/dapl/openib_cma/dapl_ib_util.c b/dapl/openib_cma/dapl_ib_util.c index 9083cc3..051ffc1 100644 --- a/dapl/openib_cma/dapl_ib_util.c +++ b/dapl/openib_cma/dapl_ib_util.c @@ -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, -- 2.46.0