From patchwork Fri Oct 30 21:32:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 56701 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 n9ULTNFn022901 for ; Fri, 30 Oct 2009 21:29:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932917AbZJ3V3w (ORCPT ); Fri, 30 Oct 2009 17:29:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932918AbZJ3V3w (ORCPT ); Fri, 30 Oct 2009 17:29:52 -0400 Received: from mail-ew0-f228.google.com ([209.85.219.228]:42279 "EHLO mail-ew0-f228.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932917AbZJ3V3v (ORCPT ); Fri, 30 Oct 2009 17:29:51 -0400 Received: by ewy28 with SMTP id 28so3457662ewy.18 for ; Fri, 30 Oct 2009 14:29:55 -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=BRHjB3/hRAJIpJd265vFb+Vrv3OvTCsLGS/Cwb2DMO4=; b=hth9lBQXnhejaMJAVL3NUtt8czXRVNn4ApfU5o1C+VWhZKCcF2CwfCZfjirm9lrDDt Ohko/4UP15k/K/V2taT8BGVq2SiQ7qBM6LvZNOayuCo/CV5CMQCofYRiqsSPsFBOtaUM hMqLFVeXzzwAHfLmnWubroZM86+8dOp0eoPr0= 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=mApKXO6KVhqgVgi4Vd0COSndkJxglJjxgqz7XFs3RIwLTm+XQXoT3o7bjIUsOpKUSh 479VIDR9Xddl6unELDmIwYdpcDkCv/hP+29h6CdQ/hrVCEThpZ6mVnmU35TZ2gbANBlk NETIEwd/rwVKzcTU3Qnt3dsIN1RW796xLAVRg= Received: by 10.216.89.139 with SMTP id c11mr809712wef.198.1256938195504; Fri, 30 Oct 2009 14:29:55 -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 7sm9617356eyb.0.2009.10.30.14.29.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Oct 2009 14:29:55 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id 0AF7D11F87; Fri, 30 Oct 2009 23:32:01 +0200 (IST) Date: Fri, 30 Oct 2009 23:32:01 +0200 From: Sasha Khapyorsky To: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_mcast_tbl: fix mlid removal Message-ID: <20091030213201.GF5829@me> References: <4AEAEA86.8080309@systemfabricworks.com> <20091030200620.GB5829@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091030200620.GB5829@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 0a45904..8136c37 100644 --- a/opensm/opensm/osm_mcast_tbl.c +++ b/opensm/opensm/osm_mcast_tbl.c @@ -245,11 +245,10 @@ void osm_mcast_tbl_clear_mlid(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho) CL_ASSERT(p_tbl); CL_ASSERT(mlid_ho >= IB_LID_MCAST_START_HO); - if (p_tbl->p_mask_tbl && mlid_ho <= p_tbl->max_mlid_ho) { - mlid_offset = mlid_ho - IB_LID_MCAST_START_HO; + mlid_offset = mlid_ho - IB_LID_MCAST_START_HO; + if (p_tbl->p_mask_tbl && mlid_offset < p_tbl->mft_depth) for (i = 0; i <= p_tbl->max_position; i++) (*p_tbl->p_mask_tbl)[mlid_offset][i] = 0; - } } /**********************************************************************