From patchwork Wed Jun 5 11:14:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Line Holen X-Patchwork-Id: 2668791 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6DECF40077 for ; Wed, 5 Jun 2013 11:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318Ab3FELPE (ORCPT ); Wed, 5 Jun 2013 07:15:04 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:50138 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751803Ab3FELPD convert rfc822-to-8bit (ORCPT ); Wed, 5 Jun 2013 07:15:03 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r55BF1tC002331 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Jun 2013 11:15:02 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r55BF0wh006201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Jun 2013 11:15:01 GMT Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r55BF00B023779; Wed, 5 Jun 2013 11:15:00 GMT MIME-Version: 1.0 Message-ID: <8f3f5ded-fc8b-4632-a71a-ef566da9ef91@default> Date: Wed, 5 Jun 2013 04:14:59 -0700 (PDT) From: Line Holen To: Cc: Subject: [PATCH] Log changes related to event subscription and forwarding X-Mailer: Zimbra on Oracle Beehive Content-Disposition: inline X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Line Holen --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/opensm/osm_inform.c b/opensm/osm_inform.c index 19bbe72..ef51953 100644 --- a/opensm/osm_inform.c +++ b/opensm/osm_inform.c @@ -305,10 +305,12 @@ static ib_api_status_t send_report(IN osm_infr_t * p_infr_rec, /* the informinfo /* HACK: who switches or uses the src and dest GIDs in the grh_info ?? */ /* it is better to use LIDs since the GIDs might not be there for SMI traps */ - OSM_LOG(p_log, OSM_LOG_DEBUG, "Forwarding Notice Event from LID:%u" - " to InformInfo LID:%u TID:0x%X\n", + OSM_LOG(p_log, OSM_LOG_VERBOSE, "Forwarding Notice Event from LID %u" + " to InformInfo LID %u GUID 0x%" PRIx64 ", TID 0x%X\n", cl_ntoh16(p_ntc->issuer_lid), - cl_ntoh16(p_infr_rec->report_addr.dest_lid), trap_fwd_trans_id); + cl_ntoh16(p_infr_rec->report_addr.dest_lid), + cl_ntoh64(p_infr_rec->inform_record.subscriber_gid.unicast.interface_id), + trap_fwd_trans_id); /* get the MAD to send */ p_report_madw = osm_mad_pool_get(p_infr_rec->sa->p_mad_pool, diff --git a/opensm/osm_sa_informinfo.c b/opensm/osm_sa_informinfo.c index 0b3e1f8..f32b88b 100644 --- a/opensm/osm_sa_informinfo.c +++ b/opensm/osm_sa_informinfo.c @@ -3,6 +3,7 @@ * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. + * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -544,6 +545,10 @@ static void infr_rcv_process_set_method(osm_sa_t * sa, IN osm_madw_t * p_madw) goto Exit; } + OSM_LOG(sa->p_log, OSM_LOG_VERBOSE, + "Adding event subscription for port 0x%" PRIx64 "\n", + cl_ntoh64(inform_info_rec.inform_record.subscriber_gid.unicast.interface_id)); + /* Add this new osm_infr_t object to subnet object */ osm_infr_insert_to_db(sa->p_subn, sa->p_log, p_infr); } else @@ -561,9 +566,13 @@ static void infr_rcv_process_set_method(osm_sa_t * sa, IN osm_madw_t * p_madw) p_recvd_inform_info->subscribe = 0; osm_sa_send_error(sa, p_madw, IB_SA_MAD_STATUS_REQ_INVALID); goto Exit; - } else + } else { /* Delete this object from the subnet list of informs */ + OSM_LOG(sa->p_log, OSM_LOG_VERBOSE, + "Removing event subscription for port 0x%" PRIx64 "\n", + cl_ntoh64(inform_info_rec.inform_record.subscriber_gid.unicast.interface_id)); osm_infr_remove_from_db(sa->p_subn, sa->p_log, p_infr); + } cl_plock_release(sa->p_lock);