From patchwork Wed Feb 5 10:08:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 3585691 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BC4C7C02DC for ; Wed, 5 Feb 2014 12:09:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCE9F2017B for ; Wed, 5 Feb 2014 12:09:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D697720170 for ; Wed, 5 Feb 2014 12:09:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272AbaBEMJi (ORCPT ); Wed, 5 Feb 2014 07:09:38 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:49474 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750849AbaBEMJi (ORCPT ); Wed, 5 Feb 2014 07:09:38 -0500 Received: by mail-we0-f174.google.com with SMTP id x55so222440wes.5 for ; Wed, 05 Feb 2014 04:09:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=wpgdbEx7n0wg3Hj1B2gmCrXDHYu3VBKPNc792zA80Vs=; b=ABeIfVC7jtEuDT1xVqr1dSy6D1fwpxkyKiwY/TmiyCTRpPDoagqpxziDVoX53wz4FO jRAy29xoJfPQSTLv7W4wSuT3Tyj+pfAMhlhwXSUN9rrfYThJmyguN2TvNEpl65lIC6jq UU9cjmlSY5l+dqwDnjvEAY7GlgdSayljl+qZtH+GqIbKc6dnqP0ZzUS4hq23jWakhTKh uFKWCAXgezzbQMIhVZ/y+V3qVyl9YvITNjmIHKd5kWpE+PL0l3DwH8a36dOK/6ItlQX7 s0+qOaEq4/nuy6JIIqviyetPxuSKq9CQSNU1rteyQkQ8mqIe06cuYZLPh5yVXacvgiAr wMDA== X-Gm-Message-State: ALoCoQlgcY82p3lW7zeIc6OJAtFBb/jzU9SHyzmBNA62W+vSDDrT/9G1+5OtJBh6nyAnOWVk3kl7 X-Received: by 10.194.92.7 with SMTP id ci7mr1051775wjb.58.1391602177067; Wed, 05 Feb 2014 04:09:37 -0800 (PST) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id k10sm60954631wjf.11.2014.02.05.04.09.35 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 05 Feb 2014 04:09:36 -0800 (PST) From: Alex Netes To: hal@mellanox.com, linux-rdma@vger.kernel.org Cc: Alex Netes Subject: [PATCH 1/1] opensm/osm_node_info_rcv.c: Fix multiple switch discovery during a sweep Date: Wed, 5 Feb 2014 12:08:18 +0200 Message-Id: <1391594898-18129-1-git-send-email-alexne@mellanox.com> X-Mailer: git-send-email 1.7.1 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.4 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 Because of the race between Get(SwitchInfo) and Get(NodeInfo) to the same switch, SM will send additional Get(SwitchInfo) before it get a first reply. In a sequence SM will send many redundant MADs and slow down the discovery process significantly. With this fix, when a switch doesn't respond to Get(SwitchInfo) once during the sweep it will be dropped. Signed-off-by: Alex Netes --- opensm/osm_node_info_rcv.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/opensm/osm_node_info_rcv.c b/opensm/osm_node_info_rcv.c index c0233f7..b7c20e8 100644 --- a/opensm/osm_node_info_rcv.c +++ b/opensm/osm_node_info_rcv.c @@ -573,20 +573,9 @@ static void ni_rcv_process_existing_switch(IN osm_sm_t * sm, /* If this switch has already been probed during this sweep, then don't bother reprobing it. - There is one exception - if the node has been visited, but - for some reason we don't have the switch object (this can happen - if the SwitchInfo mad didn't reach the SM) then we want - to retry to probe the switch. */ if (p_node->discovery_count == 1) ni_rcv_process_switch(sm, p_node, p_madw); - else if (!p_node->sw) { - /* we don't have the SwitchInfo - retry to get it */ - OSM_LOG(sm->p_log, OSM_LOG_DEBUG, - "Retry to get SwitchInfo on node GUID:0x%" PRIx64 "\n", - cl_ntoh64(osm_node_get_node_guid(p_node))); - ni_rcv_process_switch(sm, p_node, p_madw); - } OSM_LOG_EXIT(sm->p_log); }