diff mbox

dapl 2.0: scm, ucm: set RAI_NOROUTE flag with rdma_getaddrinfo() call to avoid blocking.

Message ID E3280858FA94444CA49D2BA02341C983011EBD7098@orsmsx506.amr.corp.intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Arlin Davis Dec. 10, 2010, 9:58 p.m. UTC
None
diff mbox

Patch

diff --git a/dapl/openib_common/qp.c b/dapl/openib_common/qp.c
index 8db6f8e..1e5b6d4 100644
--- a/dapl/openib_common/qp.c
+++ b/dapl/openib_common/qp.c
@@ -374,6 +374,9 @@  void dapls_ib_reinit_ep(IN DAPL_EP * ep_ptr)
 #endif				// _WIN32 || _WIN64
 
 #if DAPL_USE_IBACM
+#ifndef RAI_NOROUTE 
+#define RAI_NOROUTE 0
+#endif
 uint8_t dapls_get_sl(DAPL_HCA *hca_ptr, uint16_t dlid)
 {
 	struct rdma_addrinfo hint, *res;
@@ -387,6 +390,7 @@  uint8_t dapls_get_sl(DAPL_HCA *hca_ptr, uint16_t dlid)
 	path.dlid = dlid;
 
 	memset(&hint, 0, sizeof hint);
+	hint.ai_flags = RAI_NOROUTE;
 	hint.ai_route = &path;
 	hint.ai_route_len = sizeof(path);
 
@@ -397,6 +401,10 @@  uint8_t dapls_get_sl(DAPL_HCA *hca_ptr, uint16_t dlid)
 	if (res->ai_route_len)
 		sl = ntohs(((struct ibv_path_record *) res->ai_route)->
 			   qosclass_sl) & 0xF;
+	else 
+		dapl_log(DAPL_DBG_TYPE_CM_WARNING,
+			" dapls_get_sl: Warning, route miss 0x%x -> 0x%x\n",
+			slid, dlid);
 
 	rdma_freeaddrinfo(res);
 out: