From patchwork Wed Feb 11 12:22:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 5812451 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A3B25BF440 for ; Wed, 11 Feb 2015 12:22:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD9E920222 for ; Wed, 11 Feb 2015 12:22:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19EAE20218 for ; Wed, 11 Feb 2015 12:22:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752642AbbBKMW1 (ORCPT ); Wed, 11 Feb 2015 07:22:27 -0500 Received: from mail-wi0-f176.google.com ([209.85.212.176]:40265 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752260AbbBKMW0 (ORCPT ); Wed, 11 Feb 2015 07:22:26 -0500 Received: by mail-wi0-f176.google.com with SMTP id h11so3219230wiw.3 for ; Wed, 11 Feb 2015 04:22:25 -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=yjPtMkA6mUPaV/v6MHcwdOTQi0ErJEE0goYANr3Ldwg=; b=hsTxigZhIISLBWEKSWkRc0aoioKQsNVt96glg5IQQbXPVXLbF6a8zcXR2nCP+WxO6X 6mKyExhxUpJ+qqnIAqYg4roKkQnjyLXhq1nmw3AjjoGk/RurwsXj/HYV1/JxDgQut+yz y2tB66V+NJIes3W7JGo0d/wesOQuK9UuqS6/IYrlxnXumrdXnvGHnyIbq7uh0jcCjOVo +LlZJlEsHVEKwzJrE5owXq3wukm3s8cDaceld64gK4RRoh8CxE5RlBWYpvfSsS8Q+tYa ja5yi+VPs+j5I1L0Ma2DbLghPNzMov32Mbq0AWb6jNLqTQx/T2bYUf4RmODNFnDxkwYz rYqw== X-Gm-Message-State: ALoCoQmyjK24TjYOp4SkVtMWkhYCtzATV8BKTq5TGZnN632SlJhdz0x93I8DpP8uXb7yKd1qwOqY X-Received: by 10.180.221.232 with SMTP id qh8mr47220230wic.6.1423657345301; Wed, 11 Feb 2015 04:22:25 -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 n10sm2157727wic.11.2015.02.11.04.22.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Feb 2015 04:22:24 -0800 (PST) Message-ID: <54DB497D.70600@dev.mellanox.co.il> Date: Wed, 11 Feb 2015 07:22:21 -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 , Shlomi Nimrodi Subject: [PATCH opensm] osm_ucast_mgr.c: Support diverse paths for LMC > 0 when scatter_ports is enabled 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: Vladimir Koushnir The patch adds an ability to calculate diverse paths for all LIDs (LMC > 0) derived from the same Base LID, when scatter ports is enabled (different from 0). We apply randomization during selection of the outports only when routing is calculated for the Base LID. For LIDs different from the Base LID, we don't randomize the outport but apply the procedure for calculating diverse path as if scatter_ports equals 0. The patch is relevant for minhop/updn routing. Signed-off-by: Vladimir Koushnir Signed-off-by: Shlomi Nimrodi --- 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 0b24e73..219e080 100644 --- a/opensm/osm_ucast_mgr.c +++ b/opensm/osm_ucast_mgr.c @@ -260,7 +260,7 @@ static void ucast_mgr_process_port(IN osm_ucast_mgr_t * p_mgr, p_mgr->p_subn->opt.lmc, p_mgr->is_dor, p_mgr->p_subn->opt.port_shifting, - p_port->use_scatter, + !lid_offset && p_port->use_scatter, OSM_LFT); if (port == OSM_NO_PATH) {