From patchwork Mon Jan 13 18:19:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3479861 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 030359F2E9 for ; Mon, 13 Jan 2014 18:19:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26E052012D for ; Mon, 13 Jan 2014 18:19:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD7532012B for ; Mon, 13 Jan 2014 18:19:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751623AbaAMSTe (ORCPT ); Mon, 13 Jan 2014 13:19:34 -0500 Received: from mail-ee0-f52.google.com ([74.125.83.52]:38679 "EHLO mail-ee0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbaAMSTe (ORCPT ); Mon, 13 Jan 2014 13:19:34 -0500 Received: by mail-ee0-f52.google.com with SMTP id e53so1239896eek.25 for ; Mon, 13 Jan 2014 10:19:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=UgcN3JIEhE4+Ju0p5z24AvTHaCEO4ZrqjXJnNQtIjfo=; b=K5MMzXmPnbviUHOh8IUBpsijMrrCRlejAFqxNgWJNM5j7ggsNRuUH0Ln26oqAwJfRf HcbbpGYt+OYjjtvIIW6ghYrR/F1lAMdYGZVZSiEJwEqbM14WQTl9ABPaCBcGHmWGPBJX gzo+tpTvrnbYms49Vst5/TveKZNMokWQGrlw7iRZxHTS5xl0cxwOGKyRfxf2vXjPq2e1 Tp4jro3mIpPhvCLQ5xjnd0/kqv9wkZltEEsIiu56T37B3fDlG04uxDdMaPaQfq7YjDfx AaX0kdM/kNC0AElhp9SaRF11xex4gFGNMumdktvS+37J2EaF9q8PbdEZ+BLy/QITpAU6 mclQ== X-Gm-Message-State: ALoCoQnx4evsh+RlbDJ/JAIbOyQ196Kg4TI2XUpbwKYi5S8uaUR7UMpBN6mEdBDGPxedMBXa6BLZ X-Received: by 10.15.95.72 with SMTP id bc48mr24037095eeb.49.1389637172446; Mon, 13 Jan 2014 10:19:32 -0800 (PST) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id b41sm41921348eef.16.2014.01.13.10.19.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Jan 2014 10:19:32 -0800 (PST) Message-ID: <52D42E31.7010606@dev.mellanox.co.il> Date: Mon, 13 Jan 2014 13:19:29 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Vladimir Koushnir Subject: [PATCH opensm] osm_ucast_mgr.c: After applying guid_order options, add nodes sorted by neighbor switch load Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vladimir Koushnir Signed-off-by: Vladimir Koushnir Signed-off-by: Alex Netes Signed-off-by: Hal Rosenstock --- opensm/osm_ucast_mgr.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opensm/osm_ucast_mgr.c b/opensm/osm_ucast_mgr.c index ab94e34..a1b0eb1 100644 --- a/opensm/osm_ucast_mgr.c +++ b/opensm/osm_ucast_mgr.c @@ -799,7 +799,7 @@ static void add_sw_endports_to_order_list(osm_switch_t * sw, port = osm_get_port_by_guid(m->p_subn, p->p_remote_physp-> port_guid); - if (!port) + if (!port || port->flag) continue; cl_qlist_insert_tail(&m->port_order_list, &port->list_item); @@ -864,8 +864,8 @@ static int ucast_mgr_build_lfts(osm_ucast_mgr_t * p_mgr) OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A0D: " "cannot parse guid routing order file \'%s\'\n", p_mgr->p_subn->opt.guid_routing_order_file); - } else - sort_ports_by_switch_load(p_mgr); + } + sort_ports_by_switch_load(p_mgr); if (p_mgr->p_subn->opt.port_prof_ignore_file) { cl_qmap_apply_func(&p_mgr->p_subn->sw_guid_tbl,