From patchwork Fri Oct 23 22:00:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 55644 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9NLwPwQ016285 for ; Fri, 23 Oct 2009 21:58:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750756AbZJWV6s (ORCPT ); Fri, 23 Oct 2009 17:58:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751385AbZJWV6s (ORCPT ); Fri, 23 Oct 2009 17:58:48 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]:46044 "EHLO mail-ew0-f208.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbZJWV6s (ORCPT ); Fri, 23 Oct 2009 17:58:48 -0400 Received: by ewy4 with SMTP id 4so2059843ewy.37 for ; Fri, 23 Oct 2009 14:58:52 -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=NTufD71jMTNYKUKki299Up8x8BCqLZlUV36Jfrfgktk=; b=aTImp+8akMJUJAfNBa+gdA/SMv+C8Vnt79PUVgMfXi3vJkcwlTcvk1zurHx5GBwOf+ db/JjVRurHV3wMuV1fiCGNR6t6PQE1+t+MG8fkuRsLVerIuUBKUQVet7T/cpWBPj332S Ym5Vjcf96uH9KJUp1FmaUDR/tr4fWSBDOOmfw= 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=fqUDUFH+NHvAoqqcbwNW56AyPD9PfilSU7U+8wkJRBSUfhZ0e9FSAk+7xCvHUtI6Yk gxr1LYQrX7GiQUWC96c/TYFrW5el3RIPv5dYQkbmQs4sSImCVyGtjKi9UBfWb+jfyGVr WesVab2Tkb82EVtUUETFZggth5dIl5QyDke6U= Received: by 10.211.161.22 with SMTP id n22mr1162559ebo.83.1256335132093; Fri, 23 Oct 2009 14:58:52 -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 28sm3938595eyg.6.2009.10.23.14.58.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Oct 2009 14:58:51 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id 693CB11F05; Sat, 24 Oct 2009 00:00:55 +0200 (IST) Date: Sat, 24 Oct 2009 00:00:55 +0200 From: Sasha Khapyorsky To: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm: make subnet's max mlid update implementation independent Message-ID: <20091023220055.GG5764@me> References: <20091016182834.GA26292@comcast.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091016182834.GA26292@comcast.net> 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 diff --git a/opensm/opensm/osm_sw_info_rcv.c b/opensm/opensm/osm_sw_info_rcv.c index ad75fd4..f32adc5 100644 --- a/opensm/opensm/osm_sw_info_rcv.c +++ b/opensm/opensm/osm_sw_info_rcv.c @@ -220,10 +220,10 @@ static void si_rcv_process_new(IN osm_sm_t * sm, IN osm_node_t * p_node, } /* set subnet max mlid to the minimum MulticastFDBCap of all switches */ - if (p_sw->mcast_tbl.num_entries < sm->p_subn->max_mcast_lid_ho - - IB_LID_MCAST_START_HO + 1) { - sm->p_subn->max_mcast_lid_ho = p_sw->mcast_tbl.num_entries + - IB_LID_MCAST_START_HO - 1; + if (cl_ntoh16(p_si->mcast_cap) + IB_LID_MCAST_START_HO - 1 < + sm->p_subn->max_mcast_lid_ho) { + sm->p_subn->max_mcast_lid_ho = cl_ntoh16(p_si->mcast_cap) + + IB_LID_MCAST_START_HO - 1; OSM_LOG(sm->p_log, OSM_LOG_VERBOSE, "Subnet max multicast lid is 0x%X\n", sm->p_subn->max_mcast_lid_ho);