From patchwork Tue Nov 3 12:00:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 57295 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 nA3C3YCJ006695 for ; Tue, 3 Nov 2009 12:03:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753000AbZKCMAr (ORCPT ); Tue, 3 Nov 2009 07:00:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752917AbZKCMAr (ORCPT ); Tue, 3 Nov 2009 07:00:47 -0500 Received: from qmta02.westchester.pa.mail.comcast.net ([76.96.62.24]:41273 "EHLO QMTA02.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635AbZKCMAq (ORCPT ); Tue, 3 Nov 2009 07:00:46 -0500 Received: from OMTA22.westchester.pa.mail.comcast.net ([76.96.62.73]) by QMTA02.westchester.pa.mail.comcast.net with comcast id 0bAi1d0031ap0As52c0spl; Tue, 03 Nov 2009 12:00:52 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA22.westchester.pa.mail.comcast.net with comcast id 0c6J1d00R0hNrtn3ic6JYu; Tue, 03 Nov 2009 12:06:19 +0000 Received: from hal.comcast.net (localhost.localdomain [127.0.0.1]) by hal.comcast.net (8.14.3/8.14.3) with ESMTP id nA3C1DB2031642; Tue, 3 Nov 2009 07:01:19 -0500 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id nA3C0xU1031609; Tue, 3 Nov 2009 07:00:59 -0500 Date: Tue, 3 Nov 2009 07:00:58 -0500 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_mcast_tbl.c: In osm_mcast_tbl_clear_mlid, use memset to clear port mask entry Message-ID: <20091103120058.GA31605@comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) 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 462d528..4c58102 100644 --- a/opensm/opensm/osm_mcast_tbl.c +++ b/opensm/opensm/osm_mcast_tbl.c @@ -231,8 +231,9 @@ void osm_mcast_tbl_clear_mlid(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_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; + memset((uint8_t *)p_tbl->p_mask_tbl + mlid_offset * (IB_MCAST_POSITION_MAX + 1) * IB_MCAST_MASK_SIZE / 8, + 0, + (IB_MCAST_POSITION_MAX + 1) * IB_MCAST_MASK_SIZE / 8); } boolean_t osm_mcast_tbl_get_block(IN osm_mcast_tbl_t * p_tbl,