From patchwork Fri Nov 6 15:59:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 58063 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 nA6FxwG7010540 for ; Fri, 6 Nov 2009 15:59:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759375AbZKFP7v (ORCPT ); Fri, 6 Nov 2009 10:59:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758465AbZKFP7v (ORCPT ); Fri, 6 Nov 2009 10:59:51 -0500 Received: from qmta10.westchester.pa.mail.comcast.net ([76.96.62.17]:43834 "EHLO QMTA10.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759362AbZKFP7u (ORCPT ); Fri, 6 Nov 2009 10:59:50 -0500 Received: from OMTA24.westchester.pa.mail.comcast.net ([76.96.62.76]) by QMTA10.westchester.pa.mail.comcast.net with comcast id 1oQe1d0031ei1Bg5Arzxi8; Fri, 06 Nov 2009 15:59:57 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA24.westchester.pa.mail.comcast.net with comcast id 1s7a1d00H0hNrtn3ks7aws; Fri, 06 Nov 2009 16:07:35 +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 nA6FxDsD019986; Fri, 6 Nov 2009 10:59:17 -0500 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id nA6Fx0xO019954; Fri, 6 Nov 2009 10:59:00 -0500 Date: Fri, 6 Nov 2009 10:59:00 -0500 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] infiniband-diags/ibsendtrap.c: Add support for SysImageGuid changed trap (145) Message-ID: <20091106155900.GA19950@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/infiniband-diags/src/ibsendtrap.c b/infiniband-diags/src/ibsendtrap.c index 2bbc0f9..1b91595 100644 --- a/infiniband-diags/src/ibsendtrap.c +++ b/infiniband-diags/src/ibsendtrap.c @@ -73,6 +73,15 @@ static uint32_t get_cap_mask(ib_portid_t * port) return cap_mask; } +static void build_trap145(ib_mad_notice_attr_t * n, ib_portid_t * port) +{ + n->generic_type = 0x80 | IB_NOTICE_TYPE_INFO; + n->g_or_v.generic.prod_type_lsb = cl_hton16(get_node_type(port)); + n->g_or_v.generic.trap_num = cl_hton16(145); + n->issuer_lid = cl_hton16((uint16_t) port->lid); + n->data_details.ntc_145.new_sys_guid = cl_hton64(0x1234567812345678); +} + static void build_trap144_local(ib_mad_notice_attr_t * n, ib_portid_t * port) { n->generic_type = 0x80 | IB_NOTICE_TYPE_INFO; @@ -149,6 +158,7 @@ static const trap_def_t traps[] = { {"node_desc_change", build_trap144_nodedesc}, {"link_speed_enabled_change", build_trap144_linkspeed}, {"local_link_integrity", build_trap129}, + {"sys_image_guid_change", build_trap145}, {NULL, NULL} };