From patchwork Tue Feb 2 14:13:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eli Dorfman (Voltaire)" X-Patchwork-Id: 76378 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o12E1QEe003222 for ; Tue, 2 Feb 2010 14:01:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756084Ab0BBOBZ (ORCPT ); Tue, 2 Feb 2010 09:01:25 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:36537 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756056Ab0BBOBY (ORCPT ); Tue, 2 Feb 2010 09:01:24 -0500 Received: from [172.25.1.69] ([172.25.1.69]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Feb 2010 16:01:22 +0200 Message-ID: <4B6832F8.9090200@gmail.com> Date: Tue, 02 Feb 2010 16:13:12 +0200 From: "Eli Dorfman (Voltaire)" User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Sasha Khapyorsky CC: linux-rdma , Vladimir Koushnir Subject: [PATCH] opensm: bug in trap report for MC create(66) and delete(67) traps X-OriginalArrivalTime: 02 Feb 2010 14:01:22.0285 (UTC) FILETIME=[336F61D0:01CAA410] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 02 Feb 2010 14:01:26 +0000 (UTC) diff --git a/opensm/opensm/osm_inform.c b/opensm/opensm/osm_inform.c index 8108213..5f48376 100644 --- a/opensm/opensm/osm_inform.c +++ b/opensm/opensm/osm_inform.c @@ -460,18 +460,16 @@ static void match_notice_to_inf_rec(IN cl_list_item_t * p_list_item, } } - /* Check if there is a pkey match. o13-17.1.1 */ - /* Check if the issuer of the trap is the SM. If it is, then the gid + /* In case of GID IN(64) or GID OUT(65) traps the source gid comparison should be done on the trap source (saved as the gid in the data details field). - If the issuer gid is not the SM - then it is the guid of the trap - source */ - if ((cl_ntoh64(p_ntc->issuer_gid.unicast.prefix) == - p_subn->opt.subnet_prefix) - && (cl_ntoh64(p_ntc->issuer_gid.unicast.interface_id) == - p_subn->sm_port_guid)) - /* The issuer is the SM then this is trap 64-67 - compare the gid - with the gid saved on the data details */ + In all other cases the issuer gis is the trap source. + This is also the case for MC CREATE(66) and MC DELETE(67) where the + data details gid is MGID */ + if (p_ntc->g_or_v.generic.trap_num == 64 || + p_ntc->g_or_v.generic.trap_num == 65 ) + /* The issuer of these traps is the SM so source_gid + is the gid saved on the data details */ source_gid = p_ntc->data_details.ntc_64_67.gid; else source_gid = p_ntc->issuer_gid; @@ -495,6 +493,7 @@ static void match_notice_to_inf_rec(IN cl_list_item_t * p_list_item, goto Exit; } + /* Check if there is a pkey match. o13-17.1.1 */ if (osm_port_share_pkey(p_log, p_src_port, p_dest_port) == FALSE) { OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by Pkey\n"); /* According to o13-17.1.2 - If this informInfo does not have