[ewg] [PATCH 3/3] DAPL v2.0: scm: dat_psp_create returns wrong error code on bind/listen failure

Davis, Arlin R arlin.r.davis at intel.com
Wed Oct 26 14:11:00 PDT 2011


The SCM provider changed to return DAT_INVALID_PARAMTER instead of
incorrect DAT_CONN_QUAL_UNAVAILABLE error code on any bind or
listen failure.

Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
---
 dapl/openib_scm/cm.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index 968d9b9..b9cb1bc 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -991,13 +991,14 @@ dapli_socket_listen(DAPL_IA * ia_ptr, DAT_CONN_QUAL serviceID, DAPL_SP * sp_ptr)
 	if ((bind(cm_ptr->socket, (struct sockaddr *)&addr, sizeof(addr)) < 0)
 	    || (listen(cm_ptr->socket, 128) < 0)) {
 		int err = dapl_socket_errno();
-		dapl_log(DAPL_DBG_TYPE_CM,
-			 " listen: ERROR 0x%x %s on port %d\n",
-			 err, strerror(err), serviceID + 1000);
 		if (err == EADDRINUSE)
 			dat_status = DAT_CONN_QUAL_IN_USE;
-		else
-			dat_status = DAT_CONN_QUAL_UNAVAILABLE;
+		else {
+			dapl_log(DAPL_DBG_TYPE_WARN,
+				 " listen: ERROR 0x%x %s on port %d\n",
+				 err, strerror(err), serviceID + 1000);
+			dat_status = DAT_INVALID_PARAMETER;
+		}
 		goto bail;
 	}
 
-- 
1.7.3





More information about the ewg mailing list