From patchwork Tue Feb 5 14:30:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 2097961 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B44D23FDF1 for ; Tue, 5 Feb 2013 14:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754340Ab3BEOaW (ORCPT ); Tue, 5 Feb 2013 09:30:22 -0500 Received: from mail-bk0-f52.google.com ([209.85.214.52]:49379 "EHLO mail-bk0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754152Ab3BEOaV (ORCPT ); Tue, 5 Feb 2013 09:30:21 -0500 Received: by mail-bk0-f52.google.com with SMTP id jk13so105944bkc.11 for ; Tue, 05 Feb 2013 06:30:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent:x-gm-message-state; bh=HVrjFwYtO9BbFcfDYJYGbQTur4mnBO0NQLM3kKtZioc=; b=J/Kszswb8nhaAPymE3JJ+K+4F+aPeL3mSTbDg6+JBN6voPM/45NqVZ7j3CgiRNZsCY vznZ3l0OpSBekYTvkOL6ip6plIXjE5KG+r8yJLPX6L7v8OKXsR8ibrVd1OLHiovnx+tE gtKQIS7OTt2XZ/Kwpu8a9u+0FQbH8ykHvRvaiYZOtS2cNdnwi7h+IrvI7l9GC2eARhAO of4kIih2JP/epoBebGD2pao7p51tVouCXV++guRl22lRxv8mqHX0R9SiWRmIUJqIRpY2 jowKlUQuXLH7XsBAMxBw43fTm6J1kKFpkRRsJKPkG4f3aMImktAvSc3ZqlpQcv+mmIWg 2Smw== X-Received: by 10.204.9.156 with SMTP id l28mr6601718bkl.40.1360074619601; Tue, 05 Feb 2013 06:30:19 -0800 (PST) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPS id x18sm2609639bkw.4.2013.02.05.06.30.18 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 05 Feb 2013 06:30:18 -0800 (PST) Date: Tue, 5 Feb 2013 16:30:17 +0200 From: Alex Netes To: linux-rdma@vger.kernel.org Cc: Eli Dorfman Subject: [PATCH] opensm/osm_sm_state_mgr.c: Start sweep immedeately when recieving HANDOVER in DISCOVERING state Message-ID: <20130205143017.GE13151@calypso.mtl.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQmd+bAmCdIhFGIhohRlDCmYpkmIUz2dIfkP/sLobiV0stotqia1Zoey8BCqZFoT4uP0Kr9M Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Instead of waiting fo sweep_interval to expire, start the sweep imeediately. That can speed-up SM bring up. Found-by: Eli Dorfman Signed-off-by: Alex Netes --- opensm/osm_sm_state_mgr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/opensm/osm_sm_state_mgr.c b/opensm/osm_sm_state_mgr.c index 7da8258..c996ea2 100644 --- a/opensm/osm_sm_state_mgr.c +++ b/opensm/osm_sm_state_mgr.c @@ -294,11 +294,13 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm, break; case OSM_SM_SIGNAL_HANDOVER: /* - * Do nothing. We will discover it later on. If we already discovered - * this SM, and got the HANDOVER - this means the remote SM is of - * lower priority. In this case we will stop polling it (since it is - * a lower priority SM in STANDBY state). + * Signal for a new sweep. We need to discover the other SM. + * If we already discovered this SM, and got the + * HANDOVER - this means the remote SM is of lower priority. + * In this case we will stop polling it (since it is a lower + * priority SM in STANDBY state). */ + osm_sm_signal(sm, OSM_SIGNAL_SWEEP); break; default: sm_state_mgr_signal_error(sm, signal);