From patchwork Mon Mar 10 15:21:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3803671 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 CB6239F1CD for ; Mon, 10 Mar 2014 15:22:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1966201BF for ; Mon, 10 Mar 2014 15:22:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 405D1201CE for ; Mon, 10 Mar 2014 15:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753909AbaCJPV6 (ORCPT ); Mon, 10 Mar 2014 11:21:58 -0400 Received: from mail-we0-f177.google.com ([74.125.82.177]:56578 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753850AbaCJPV5 (ORCPT ); Mon, 10 Mar 2014 11:21:57 -0400 Received: by mail-we0-f177.google.com with SMTP id u57so8554962wes.22 for ; Mon, 10 Mar 2014 08:21:56 -0700 (PDT) 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=qF3AJgzRRHgtt9xI41Da9JgO+OYj1BiqKAgB4neddws=; b=Ze7ndb5C7oUNLJIw44plSo8YgMhUTd7OQyoo5Z7PK+MfkEn3SN5IM8M3iSBVCJ17FW wqu2+FAS4EiyY6zkxWNTH/PTY5KTqeV4nU67DlO3ZxrhJjo+0zpAB+UAzK9Jqu7VtLT5 ocsjPCobL9nHEjW4m7T44LRffP6bNPdQVCNJdlxJv2XukbNcvizKNP3hlBTlzepZkB4F CpTQ8q2hN1v6HH0HBj54F2tdZ4qAkfKEjIuAEieWjH8Po4CucQnaVH0tVXo+WK/STgGq p0Og29tDggNEJOjcK0WQuYL/x3BBvVgMeXr44Y56NRzfzxvOh3U9RVbZ2GKUkPZYPr/S OXoA== X-Gm-Message-State: ALoCoQnHz2zUmYcKSHqf6MlJtTWF5SCQuFYu0lwMikbaquB3nkPgF7ZkhSuPoJtlMBH2EShAjzeC X-Received: by 10.194.58.180 with SMTP id s20mr1886006wjq.54.1394464916089; Mon, 10 Mar 2014 08:21:56 -0700 (PDT) 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 lg9sm7741609wjb.3.2014.03.10.08.21.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 08:21:55 -0700 (PDT) Message-ID: <531DD88F.3030802@dev.mellanox.co.il> Date: Mon, 10 Mar 2014 11:21:51 -0400 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: Alex Netes , Vladimir Koushnir Subject: [PATCH opensm] osm_state_mgr.c: Clear first time sweep even after subnet error 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: Eli Dorfman Date: Wed, 24 Nov 2010 11:18:44 +0200 Clear first time sweep even after subnet initialization error. Wait sweep interval between heavy sweeps after subnet init error. Signed-off-by: Eli Dorfman Signed-off-by: Alex Netes Signed-off-by: Hal Rosenstock --- opensm/osm_state_mgr.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/opensm/osm_state_mgr.c b/opensm/osm_state_mgr.c index 1872f31..baeff05 100644 --- a/opensm/osm_state_mgr.c +++ b/opensm/osm_state_mgr.c @@ -1156,6 +1156,10 @@ static void do_sweep(osm_sm_t * sm) osm_remote_sm_t *p_remote_sm; unsigned config_parsed = 0; + /* after subnet initialization error, run heavy sweep */ + if (sm->p_subn->subnet_initialization_error) + sm->p_subn->force_heavy_sweep = TRUE; + if (sm->p_subn->force_heavy_sweep) { if (osm_subn_rescan_conf_files(sm->p_subn) < 0) OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 331A: " @@ -1526,6 +1530,7 @@ repeat_discovery: /* in any case we zero this flag */ sm->p_subn->coming_out_of_standby = FALSE; + sm->p_subn->first_time_master_sweep = FALSE; /* If there were errors - then the subnet is not really up */ if (sm->p_subn->subnet_initialization_error == TRUE) { @@ -1537,7 +1542,6 @@ repeat_discovery: sm->p_subn->need_update = 0; osm_dump_all(sm->p_subn->p_osm); state_mgr_up_msg(sm); - sm->p_subn->first_time_master_sweep = FALSE; if (OSM_LOG_IS_ACTIVE_V2(sm->p_log, OSM_LOG_VERBOSE) || sm->p_subn->opt.sa_db_dump) @@ -1554,8 +1558,7 @@ repeat_discovery: /* if we got a signal to force heavy sweep or errors * in the middle of the sweep - try another sweep. */ - if (sm->p_subn->force_heavy_sweep - || sm->p_subn->subnet_initialization_error) + if (sm->p_subn->force_heavy_sweep) osm_sm_signal(sm, OSM_SIGNAL_SWEEP); /* Write a new copy of our persistent guid2mkey database */