Fix v2 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 master branch (v2):

Signed-off by: Arlin Davis <[EMAIL PROTECTED]>

diff --git a/dapl/common/dapl_psp_create_any.c 
b/dapl/common/dapl_psp_create_any.c
index a2768fb..e2faa4a 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 e65debc..811789e 100755
--- a/dapl/openib_cma/dapl_ib_cm.c
+++ b/dapl/openib_cma/dapl_ib_cm.c
@@ -690,7 +690,7 @@ dapls_ib_setup_conn_listener(IN DAPL_IA *ia_ptr,
        ((struct sockaddr_in *)&addr)->sin_port = SID_TO_PORT(ServiceID);
 
        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 = 
@@ -713,7 +713,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 = 

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to