From patchwork Mon Apr 26 12:16:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 95062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3QCGTWr011673 for ; Mon, 26 Apr 2010 12:16:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753045Ab0DZMQR (ORCPT ); Mon, 26 Apr 2010 08:16:17 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:53375 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753028Ab0DZMQQ (ORCPT ); Mon, 26 Apr 2010 08:16:16 -0400 Received: by bwz19 with SMTP id 19so64001bwz.21 for ; Mon, 26 Apr 2010 05:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=+xtrho4y7i+DoYVpCmxLe9cxUtc9lOytrxjRSC6rREI=; b=OUQ3k82yjfgIt9X59CNeJq7br6c8+/2dUk4WY0Mk+cpTp4RrAsYIUqn9DlI/wJbs5V r2L2HMV4rChAhf2WLWWQH9fVXcDNt+6/IDzQqPvBS6/ldLPoRf4a8u/o3PJVZsgtGXwi OLwqv7LvnvDNYapE3A2v8oD1JHOt6A0zTQEUo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=F1LCZvcA3u1+BqbqJWH4SJNTwK6KVsl2Kk/KHBkJn0+kw/uE52ifFWqnYewo/UySv1 kVALwRV0ml5pomD7PBwVKt4FptiC+GCeJq5Rhbea+fvRXuHAHy2JYaACNdKD8YvsAerA YEFiBU4wukYuJxzE3WXCsWB0PXpunW5GmfkHg= Received: by 10.102.240.34 with SMTP id n34mr2230503muh.31.1272284174700; Mon, 26 Apr 2010 05:16:14 -0700 (PDT) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id s10sm16695567mue.27.2010.04.26.05.16.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 05:16:13 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id F3B3B11DF7; Mon, 26 Apr 2010 15:16:47 +0300 (IDT) Date: Mon, 26 Apr 2010 15:16:47 +0300 From: Sasha Khapyorsky To: linux-rdma Cc: Eli Dorfman , Alex Netes Subject: [PATCH] opensm/osm_lid_mgr: fix couple of duplicate LIDs bugs Message-ID: <20100426121647.GU23994@me> References: <20100426104838.GS23994@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100426104838.GS23994@me> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 26 Apr 2010 12:16:29 +0000 (UTC) diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c index 84f3508..08d54f0 100644 --- a/opensm/opensm/osm_lid_mgr.c +++ b/opensm/opensm/osm_lid_mgr.c @@ -319,6 +319,7 @@ static int lid_mgr_init_sweep(IN osm_lid_mgr_t * p_mgr) "ERR 0306: " "Error restoring Guid-to-Lid " "persistent database. Ignoring it\n"); + lid_mgr_validate_db(p_mgr); } } @@ -710,7 +711,7 @@ static int lid_mgr_get_port_lid(IN osm_lid_mgr_t * p_mgr, /* we still need to send the setting to the target port */ lid_changed = 1; } - goto Exit; + goto NewLidSet; } else OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG, "0x%016" PRIx64 " has no persistent lid assigned\n", @@ -764,7 +765,6 @@ NewLidSet: for (lid = *p_min_lid; lid <= *p_max_lid; lid++) p_mgr->used_lids[lid] = 1; -Exit: /* make sure the assigned lids are marked in port_lid_tbl */ for (lid = *p_min_lid; lid <= *p_max_lid; lid++) cl_ptr_vector_set(&p_mgr->p_subn->port_lid_tbl, lid, p_port);