[ofw] [PATCH] uDAPL v2 - cma: setup_listener: Cannot assign requested address

Davis, Arlin R arlin.r.davis at intel.com
Wed Nov 18 16:22:34 PST 2009



Colliding with RDS port of 18634. rdma_cm can return
either EADDRINUSE or EADDRNOTAVAIL if the bind fails.
Add check for either and return proper DAT_CONN_QUAL_IN_USE.

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

diff --git a/dapl/openib_cma/cm.c b/dapl/openib_cma/cm.c
index 40634b2..c52e716 100644
--- a/dapl/openib_cma/cm.c
+++ b/dapl/openib_cma/cm.c
@@ -694,7 +694,8 @@ 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) || (errno == EADDRINUSE))
+		if ((errno == EBUSY) || (errno == EADDRINUSE) || 
+		    (errno == EADDRNOTAVAIL))
 			dat_status = DAT_CONN_QUAL_IN_USE;
 		else
 			dat_status =
@@ -717,7 +718,8 @@ dapls_ib_setup_conn_listener(IN DAPL_IA * ia_ptr,
 
 	if (rdma_listen(conn->cm_id, 0)) {	/* max cma backlog */
 
-		if ((errno == EBUSY) || (errno == EADDRINUSE))
+		if ((errno == EBUSY) || (errno == EADDRINUSE) ||
+		    (errno == EADDRNOTAVAIL))
 			dat_status = DAT_CONN_QUAL_IN_USE;
 		else
 			dat_status =
-- 
1.5.2.5




More information about the ofw mailing list