if path is not returned, print warning message and use default SL.

Signed-off-by: Arlin Davis <[email protected]>
---
 dapl/openib_common/qp.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

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:   
-- 
1.7.3



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

Reply via email to