From patchwork Mon Sep 27 13:32:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 212562 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 o8RDnkgZ024657 for ; Mon, 27 Sep 2010 13:51:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750780Ab0I0NvD (ORCPT ); Mon, 27 Sep 2010 09:51:03 -0400 Received: from qmta13.westchester.pa.mail.comcast.net ([76.96.59.243]:59935 "EHLO qmta13.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841Ab0I0NvB (ORCPT ); Mon, 27 Sep 2010 09:51:01 -0400 Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73]) by qmta13.westchester.pa.mail.comcast.net with comcast id Bn911f00A1ap0As5Dpr0X9; Mon, 27 Sep 2010 13:51:00 +0000 Received: from hal.comcast.net ([75.69.247.31]) by omta22.westchester.pa.mail.comcast.net with comcast id Bpr01f0080hNrtn3ipr0sc; Mon, 27 Sep 2010 13:51:00 +0000 Received: from hal.comcast.net (localhost.localdomain [127.0.0.1]) by hal.comcast.net (8.14.3/8.14.3) with ESMTP id o8RDlVp5001410; Mon, 27 Sep 2010 09:47:37 -0400 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id o8RDWE2i001271; Mon, 27 Sep 2010 09:32:14 -0400 Date: Mon, 27 Sep 2010 09:32:14 -0400 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_ucast_ftree: When roots are not connected, update hop count but not lft Message-ID: <20100927133214.GA1267@comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) 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]); Mon, 27 Sep 2010 13:51:04 +0000 (UTC) diff --git a/opensm/opensm/osm_ucast_ftree.c b/opensm/opensm/osm_ucast_ftree.c index 88ea344..d74ba66 100644 --- a/opensm/opensm/osm_ucast_ftree.c +++ b/opensm/opensm/osm_ucast_ftree.c @@ -3012,8 +3012,10 @@ static void fabric_route_roots(IN ftree_fabric_t * p_ftree) "through port %u\n", tuple_to_str(p_sw->tuple), lid, port_num); - /* set local lft */ - p_sw->p_osm_sw->new_lft[lid] = port_num; + if (p_ftree->p_osm->subn.opt.connect_roots) { + /* set local lft */ + p_sw->p_osm_sw->new_lft[lid] = port_num; + } /* * Set local min hop table. @@ -4061,12 +4063,10 @@ static int do_routing(IN void *context) "Filling switch forwarding tables for switch-to-switch paths\n"); fabric_route_to_switches(p_ftree); - if (p_ftree->p_osm->subn.opt.connect_roots) { - OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE, - "Connecting switches that are unreachable within " - "Up/Down rules\n"); - fabric_route_roots(p_ftree); - } + OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE, + "Connecting switches that are unreachable within " + "Up/Down rules\n"); + fabric_route_roots(p_ftree); /* for each switch, set its fwd table */ cl_qmap_apply_func(&p_ftree->sw_tbl, set_sw_fwd_table, (void *)p_ftree);