From patchwork Thu Jun 10 15:01:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eli Dorfman (Voltaire)" X-Patchwork-Id: 105396 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5AEie8j000859 for ; Thu, 10 Jun 2010 14:44:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752425Ab0FJOoY (ORCPT ); Thu, 10 Jun 2010 10:44:24 -0400 Received: from fwil.voltaire.com ([193.47.165.2]:14721 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759278Ab0FJOoX (ORCPT ); Thu, 10 Jun 2010 10:44:23 -0400 Received: from [172.25.1.69] ([172.25.1.69]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 10 Jun 2010 17:44:19 +0300 Message-ID: <4C10FE4B.9080106@gmail.com> Date: Thu, 10 Jun 2010 18:01:31 +0300 From: "Eli Dorfman (Voltaire)" User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Sasha Khapyorsky CC: linux-rdma Subject: [PATCH] return no path when path does not exist X-OriginalArrivalTime: 10 Jun 2010 14:44:19.0926 (UTC) FILETIME=[68B42F60:01CB08AB] 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 (demeter.kernel.org [140.211.167.41]); Thu, 10 Jun 2010 14:44:40 +0000 (UTC) diff --git a/opensm/opensm/osm_switch.c b/opensm/opensm/osm_switch.c index 311c4f7..b621852 100644 --- a/opensm/opensm/osm_switch.c +++ b/opensm/opensm/osm_switch.c @@ -628,6 +628,8 @@ uint8_t osm_switch_recommend_mcast_path(IN osm_switch_t * p_sw, a black hole that will destroy the Earth in a firey conflagration. */ least_hops = osm_switch_get_least_hops(p_sw, base_lid); + if (least_hops == OSM_NO_PATH) + return OSM_NO_PATH; for (port_num = 1; port_num < num_ports; port_num++) if (osm_switch_get_hop_count(p_sw, base_lid, port_num) == least_hops)