From patchwork Tue Dec 1 13:12:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 63945 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 nB1DHItI032362 for ; Tue, 1 Dec 2009 13:17:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754033AbZLANRK (ORCPT ); Tue, 1 Dec 2009 08:17:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754070AbZLANRK (ORCPT ); Tue, 1 Dec 2009 08:17:10 -0500 Received: from qmta05.westchester.pa.mail.comcast.net ([76.96.62.48]:38966 "EHLO QMTA05.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754033AbZLANRJ (ORCPT ); Tue, 1 Dec 2009 08:17:09 -0500 Received: from OMTA01.westchester.pa.mail.comcast.net ([76.96.62.11]) by QMTA05.westchester.pa.mail.comcast.net with comcast id Bneo1d0070EZKEL55pHH8B; Tue, 01 Dec 2009 13:17:17 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA01.westchester.pa.mail.comcast.net with comcast id BpHF1d00S0hNrtn3MpHGBU; Tue, 01 Dec 2009 13:17:16 +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 nB1DFI8Q012798; Tue, 1 Dec 2009 08:15:24 -0500 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id nB1DCGIN012756; Tue, 1 Dec 2009 08:12:16 -0500 Date: Tue, 1 Dec 2009 08:12:15 -0500 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_trap_rcv.c: No need for heavy sweep when trap 144 indicates just NodeDescription change Message-ID: <20091201131215.GA12753@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_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c index 52f8832..9024a1f 100644 --- a/opensm/opensm/osm_trap_rcv.c +++ b/opensm/opensm/osm_trap_rcv.c @@ -509,6 +509,9 @@ static void trap_rcv_process_request(IN osm_sm_t * sm, CL_PLOCK_ACQUIRE(sm->p_lock); osm_req_get_node_desc(sm, p_physp); CL_PLOCK_RELEASE(sm->p_lock); + if (!(p_ntci->data_details.ntc_144.change_flgs & ~TRAP_144_MASK_NODE_DESCRIPTION_CHANGE) && + p_ntci->data_details.ntc_144.new_cap_mask == p_physp->port_info.capability_mask) + goto check_report; } else OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3812: No physical port found for " @@ -547,6 +550,7 @@ check_sweep: if (physp_change_trap == TRUE) goto Exit; +check_report: /* Add a call to osm_report_notice */ /* We are going to report the notice - so need to fix the IssuerGID accordingly. See IBA 1.2 p.739 or IBA 1.1 p.653 for details. */