[ofa-general] [PATCH] dapl v1: dat_psp_create_any fails, return code and conn_qual seed value incorrect

Arlin Davis arlin.r.davis at intel.com
Mon Feb 11 13:58:06 PST 2008


Fix v1 udapl for OFED 1.3 rc4, Bug 910: 

The OFA dapl provider is checking for incorrect return code 
from rdma_bind_addr and rdma_listen calls. This causes an error 
to be returned back to the consumer instead of correctly 
incrementing the seed port and re-calling the OFA provider 
until a valid port is issued. The seed value (1000) is also 
incorrect and should start a non-privledged port (1024) to 
avoid EPERM errors when seeding the starting port value.

Patch against dat1.2 branch:

Signed-off by: Arlin Davis <ardavis at ichips.intel.com>

diff --git a/dapl/common/dapl_psp_create_any.c b/dapl/common/dapl_psp_create_any.c
index a2057f5..f3ec594 100644
--- a/dapl/common/dapl_psp_create_any.c
+++ b/dapl/common/dapl_psp_create_any.c
@@ -82,7 +82,7 @@ dapl_psp_create_any (
     DAPL_SP		*sp_ptr;
     DAPL_EVD		*evd_ptr;
     DAT_RETURN		dat_status;
-    static DAT_CONN_QUAL hint_conn_qual = 1000;	/* seed value */
+    static DAT_CONN_QUAL hint_conn_qual = 1024;	/* seed value */
     DAT_CONN_QUAL	lcl_conn_qual;
     DAT_CONN_QUAL	limit_conn_qual;
 
diff --git a/dapl/openib_cma/dapl_ib_cm.c b/dapl/openib_cma/dapl_ib_cm.c
index ae12658..1826941 100755
--- a/dapl/openib_cma/dapl_ib_cm.c
+++ b/dapl/openib_cma/dapl_ib_cm.c
@@ -701,7 +701,7 @@ dapls_ib_setup_conn_listener(IN DAPL_IA *ia_ptr,
 
 
 	if (rdma_bind_addr(conn->cm_id,(struct sockaddr *)&addr)) {
-		if (errno == EBUSY)
+		if ((errno == EBUSY) || (errno == EADDRINUSE))
 			dat_status = DAT_CONN_QUAL_IN_USE;
 		else
 			dat_status = 
@@ -724,7 +724,7 @@ dapls_ib_setup_conn_listener(IN DAPL_IA *ia_ptr,
 	
 	if (rdma_listen(conn->cm_id,64)) { /* backlog to 64 */
 
-		if (errno == EBUSY)
+		if ((errno == EBUSY) || (errno == EADDRINUSE))
 			dat_status = DAT_CONN_QUAL_IN_USE;
 		else
 			dat_status = 




More information about the general mailing list