From patchwork Thu Oct 29 19:19:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 56506 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 n9TJHiWH002731 for ; Thu, 29 Oct 2009 19:17:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755466AbZJ2TRi (ORCPT ); Thu, 29 Oct 2009 15:17:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755502AbZJ2TRi (ORCPT ); Thu, 29 Oct 2009 15:17:38 -0400 Received: from gv-out-0910.google.com ([216.239.58.185]:23958 "EHLO gv-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755466AbZJ2TRi (ORCPT ); Thu, 29 Oct 2009 15:17:38 -0400 Received: by gv-out-0910.google.com with SMTP id r4so371345gve.37 for ; Thu, 29 Oct 2009 12:17:42 -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=jL8su/NLZOPvQEB/1fIbajmXM9EJ3nWtkTeiukOwNdo=; b=qUjEhaF9BeFlRV9ycNqoQ0ugyqkAIHirOcMFm4tNq4RalfTwIVb646vT6OeWgAxeDM YyaH6HnHITqL5qsFEfryX1yz6vB1b5BuFW4zdbvVi8OMQuzOdNbulph1Cb1NIGocZcb4 Kvpz9M40tMHMRZAW4FtPN0JwTqTCLKtHdp6UU= 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=q6qQvxONDkL6vFa07yly4va1W8VrMwEkw2Yub4jNzp+4FWjD/Jv4mMPAB53fRqyd8q i52FwHrFYg+A1b9eUwJ5HwNjnIVl8LcsB6NpKycy4h1hf8mxsaoad6IHdoQn4p8zRmE4 /bgq3VQV3gPobwFlIFnYE3/xeMZVjNeIJBJU4= Received: by 10.103.78.22 with SMTP id f22mr209130mul.14.1256843862150; Thu, 29 Oct 2009 12:17:42 -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 n7sm174285mue.57.2009.10.29.12.17.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Oct 2009 12:17:41 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id 5DA3511E89; Thu, 29 Oct 2009 21:19:45 +0200 (IST) Date: Thu, 29 Oct 2009 21:19:45 +0200 From: Sasha Khapyorsky To: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/mcast_tbl: set max_mlid_ho as actually configured mlid Message-ID: <20091029191945.GE20136@me> References: <20091023234856.GA1482@comcast.net> <20091029191732.GB20136@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091029191732.GB20136@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 diff --git a/opensm/opensm/osm_mcast_tbl.c b/opensm/opensm/osm_mcast_tbl.c index b5ae6f2..eee9290 100644 --- a/opensm/opensm/osm_mcast_tbl.c +++ b/opensm/opensm/osm_mcast_tbl.c @@ -122,7 +122,7 @@ int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset) uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX]; if (mlid_offset < p_tbl->mft_depth) - return 0; + goto done; /* The number of bytes needed in the mask table is: @@ -144,7 +144,8 @@ int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset) size - p_tbl->mft_depth * (IB_MCAST_POSITION_MAX + 1) * IB_MCAST_MASK_SIZE / 8); p_tbl->p_mask_tbl = p_mask_tbl; p_tbl->mft_depth = mft_depth; - p_tbl->max_mlid_ho = mft_depth + IB_LID_MCAST_START_HO - 1; +done: + p_tbl->max_mlid_ho = mlid_offset + IB_LID_MCAST_START_HO - 1; return 0; }