From patchwork Fri Dec 10 21:58:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 399632 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBALwmwg024968 for ; Fri, 10 Dec 2010 21:58:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755870Ab0LJV6r (ORCPT ); Fri, 10 Dec 2010 16:58:47 -0500 Received: from mga02.intel.com ([134.134.136.20]:32452 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753864Ab0LJV6r convert rfc822-to-8bit (ORCPT ); Fri, 10 Dec 2010 16:58:47 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 10 Dec 2010 13:58:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,326,1288594800"; d="scan'208";a="685990912" Received: from orsmsx602.amr.corp.intel.com ([10.22.226.211]) by orsmga001.jf.intel.com with ESMTP; 10 Dec 2010 13:58:46 -0800 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx602.amr.corp.intel.com ([10.22.226.211]) with mapi; Fri, 10 Dec 2010 13:58:46 -0800 From: "Davis, Arlin R" To: "linux-rdma@vger.kernel.org" , "ofw@lists.openfabrics.org" CC: "Smith, Stan" Date: Fri, 10 Dec 2010 13:58:46 -0800 Subject: [PATCH] dapl 2.0: scm, ucm: set RAI_NOROUTE flag with rdma_getaddrinfo() call to avoid blocking. Thread-Topic: [PATCH] dapl 2.0: scm, ucm: set RAI_NOROUTE flag with rdma_getaddrinfo() call to avoid blocking. Thread-Index: AcuYtWrmERyCFDPER9eCpBq4+ftl8Q== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Dec 2010 21:58:48 +0000 (UTC) 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: