From patchwork Tue Nov 17 19:08:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 60768 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 nAHJGFfO002825 for ; Tue, 17 Nov 2009 19:16:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753587AbZKQTQH (ORCPT ); Tue, 17 Nov 2009 14:16:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754610AbZKQTQH (ORCPT ); Tue, 17 Nov 2009 14:16:07 -0500 Received: from qmta02.westchester.pa.mail.comcast.net ([76.96.62.24]:45806 "EHLO QMTA02.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753587AbZKQTQH (ORCPT ); Tue, 17 Nov 2009 14:16:07 -0500 Received: from OMTA22.westchester.pa.mail.comcast.net ([76.96.62.73]) by QMTA02.westchester.pa.mail.comcast.net with comcast id 6E9h1d01R1ap0As52KGCDc; Tue, 17 Nov 2009 19:16:12 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA22.westchester.pa.mail.comcast.net with comcast id 6KN91d00T0hNrtn3iKNA95; Tue, 17 Nov 2009 19:22:10 +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 nAHJE6WP025308; Tue, 17 Nov 2009 14:14:11 -0500 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id nAHJ8dl4023890; Tue, 17 Nov 2009 14:08:39 -0500 Date: Tue, 17 Nov 2009 14:08:38 -0500 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_sm_mad_ctrl.c: Fix qp0_mads_accounting Message-ID: <20091117190838.GA23887@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_sm_mad_ctrl.c b/opensm/opensm/osm_sm_mad_ctrl.c index a4f488d..74beb1c 100644 --- a/opensm/opensm/osm_sm_mad_ctrl.c +++ b/opensm/opensm/osm_sm_mad_ctrl.c @@ -552,6 +552,7 @@ static void sm_mad_ctrl_process_trap_repress(IN osm_sm_mad_ctrl_t * p_ctrl, */ switch (p_smp->attr_id) { case IB_MAD_ATTR_NOTICE: + sm_mad_ctrl_retire_trans_mad(p_ctrl, p_madw); break; default: cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown); @@ -559,11 +560,10 @@ static void sm_mad_ctrl_process_trap_repress(IN osm_sm_mad_ctrl_t * p_ctrl, "Unsupported attribute 0x%X\n", cl_ntoh16(p_smp->attr_id)); osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_ERROR); + osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw); break; } - osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw); - OSM_LOG_EXIT(p_ctrl->p_log); }