From patchwork Thu Jan 8 12:50:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 5592441 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F1F229F357 for ; Thu, 8 Jan 2015 12:50:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D2422038A for ; Thu, 8 Jan 2015 12:50:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0728120389 for ; Thu, 8 Jan 2015 12:50:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754315AbbAHMuI (ORCPT ); Thu, 8 Jan 2015 07:50:08 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:57935 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753240AbbAHMuH (ORCPT ); Thu, 8 Jan 2015 07:50:07 -0500 Received: by mail-wi0-f179.google.com with SMTP id ex7so3051593wid.0 for ; Thu, 08 Jan 2015 04:50:06 -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=WzUXVZuIH8mCY0lKxWAYogASL1Q9CnmkFsapul0mbLY=; b=ENVHSM9VjeBGwVrGsyf6BTXKTc3TvK/5ZlOhfAlRT00F3nZxdMSSUkbbDUZSKmEAsL bVVRysJZnsvRLT6JfqplabYvCqEiXyphkqn3konq1fTvWJtC2TezocVx9RNO6sjxk2/7 SwDDgNLyo3gTQ2Mt81QR5UAVHWBbDkySbqaY6De5nQ+JPpfbZaGdo6DPtbmQA0sX96qt 7OHPnLJe214xSxuZKa+dctgtKkrXC14nQHW7h+PMKBsHhDmZIyaBX3OJnbn+dVQ+yl88 iXyoVgsjDnWxGOX3WfoXuk5rJZ3WaPe+UZHVKokkJECqwZQjJZisBTGp9NC/EDAdmY/p K6zQ== X-Gm-Message-State: ALoCoQlpftBG48yILRUJ1A+d5VNJE4C3cnApLZRPLZ6k+QWga8RXM0TUiZhEy2abPSZxdHYk/+bz X-Received: by 10.194.2.178 with SMTP id 18mr18946392wjv.67.1420721406668; Thu, 08 Jan 2015 04:50:06 -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 dc1sm21729952wib.18.2015.01.08.04.50.05 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Jan 2015 04:50:06 -0800 (PST) Message-ID: <54AE7CFB.6010402@dev.mellanox.co.il> Date: Thu, 08 Jan 2015 07:50:03 -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: Daniel Klein Subject: [PATCH opensm 5/5] osm_ucast_mgr.c: Select exit ports for lid offset > 0 using new_lft Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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: Daniel Klein Bug description: When opensm selects from which port it should continue selecting exit ports for lids with lid offset > 0, it uses the lft that was calculated and assigned to the switch on the previous sweep instead of the new lft. Signed-off-by: Daniel Klein Signed-off-by: Hal Rosenstock --- opensm/osm_ucast_mgr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/opensm/osm_ucast_mgr.c b/opensm/osm_ucast_mgr.c index 7dc69f3..a268ce2 100644 --- a/opensm/osm_ucast_mgr.c +++ b/opensm/osm_ucast_mgr.c @@ -235,7 +235,7 @@ static void ucast_mgr_process_port(IN osm_ucast_mgr_t * p_mgr, if (lid_offset && !p_mgr->is_dor) /* ignore potential overflow - it is handled in osm_switch.c */ start_from = - osm_switch_get_port_by_lid(p_sw, lid_ho - 1, OSM_LFT) + 1; + osm_switch_get_port_by_lid(p_sw, lid_ho - 1, OSM_NEW_LFT) + 1; OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG, "Processing port 0x%" PRIx64