From patchwork Tue Jul 31 16:04:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 1260961 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 25C3FDF26F for ; Tue, 31 Jul 2012 16:09:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755432Ab2GaQJP (ORCPT ); Tue, 31 Jul 2012 12:09:15 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:39764 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755441Ab2GaQJO (ORCPT ); Tue, 31 Jul 2012 12:09:14 -0400 Received: by mail-vc0-f174.google.com with SMTP id fk26so5978255vcb.19 for ; Tue, 31 Jul 2012 09:09:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=wTz/vULLBXctfumMjMg5VIYZ2OhAYg+ttRvHa+Fd8e8=; b=TwnYqp9vqwzSsjS/pZCH+5KZR9j8PQGxTYKkshv9fC5c02Z1cA8BS+1tESxnjKJ1wF 7M1dfrIQW9WcP/a0Au8hDxbC1aWvvtEashLXm/1jlNs95NfK0C3yT8l40tusBdVFtxnh RPTmraK9Z7FGABbiykrWOVk3e2omtPoyId14oR3RQj7dqNPl8sHpfrOBPxpCZI9bL7vN h0eoGKRAcK8U5wnVG/HQ8wEoPcNQspsHHuuZDB6r6Wrv/ac5X5Tig9NK53rrA24H8CTa OsYk8kSRc8oFKZMXjUSbV48m9+b2cNTrrWgouLweQ2w5bCIYhU1okZwv0oskfnsU+WN/ LBsw== Received: by 10.220.152.67 with SMTP id f3mr14629404vcw.19.1343750954126; Tue, 31 Jul 2012 09:09:14 -0700 (PDT) Received: from localhost ([193.47.165.251]) by mx.google.com with ESMTPS id w8sm419789vdj.19.2012.07.31.09.09.12 (version=SSLv3 cipher=OTHER); Tue, 31 Jul 2012 09:09:13 -0700 (PDT) From: Alex Netes To: linux-rdma@vger.kernel.org Cc: Hal Rosenstock , Alex Netes Subject: [PATCH 17/27] opensm/osm_sa_mcmember_record.c: Log requester port GUID at DEBUG level Date: Tue, 31 Jul 2012 19:04:45 +0300 Message-Id: <1343750695-28063-17-git-send-email-alexne@mellanox.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1343750695-28063-1-git-send-email-alexne@mellanox.com> References: <1343750695-28063-1-git-send-email-alexne@mellanox.com> X-Gm-Message-State: ALoCoQmXUD5hmJjy1pkBUeIQgvPx4klOxFE9tA2uSK4YBF21XnOa6GpECzef6L5+YBv/vKCKm7V/ Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Hal Rosenstock Signed-off-by: Hal Rosenstock Signed-off-by: Alex Netes --- opensm/osm_sa_mcmember_record.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/opensm/osm_sa_mcmember_record.c b/opensm/osm_sa_mcmember_record.c index 79d99ea..c6069d6 100644 --- a/opensm/osm_sa_mcmember_record.c +++ b/opensm/osm_sa_mcmember_record.c @@ -913,6 +913,18 @@ static void mcmr_rcv_leave_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) mcmember_rec = *p_recvd_mcmember_rec; if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) { + osm_physp_t *p_req_physp; + + p_req_physp = osm_get_physp_by_mad_addr(sa->p_log, sa->p_subn, + osm_madw_get_mad_addr_ptr(p_madw)); + if (p_req_physp == NULL) { + OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B02: " + "Cannot find requester physical port\n"); + } else { + OSM_LOG(sa->p_log, OSM_LOG_DEBUG, + "Requester port GUID 0x%" PRIx64 "\n", + cl_ntoh64(osm_physp_get_port_guid(p_req_physp))); + } OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of record\n"); osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG); } @@ -988,6 +1000,18 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) mcmember_rec = *p_recvd_mcmember_rec; if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) { + osm_physp_t *p_req_physp; + + p_req_physp = osm_get_physp_by_mad_addr(sa->p_log, sa->p_subn, + osm_madw_get_mad_addr_ptr(p_madw)); + if (p_req_physp == NULL) { + OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B03: " + "Cannot find requester physical port\n"); + } else { + OSM_LOG(sa->p_log, OSM_LOG_DEBUG, + "Requester port GUID 0x%" PRIx64 "\n", + cl_ntoh64(osm_physp_get_port_guid(p_req_physp))); + } OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of incoming record\n"); osm_dump_mc_record_v2(sa->p_log, &mcmember_rec, FILE_ID, OSM_LOG_DEBUG); } @@ -1398,7 +1422,7 @@ static void mcmr_query_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) */ trusted_req = (p_rcvd_mad->sm_key != 0); - /* update the requester physical port. */ + /* update the requester physical port */ p_req_physp = osm_get_physp_by_mad_addr(sa->p_log, sa->p_subn, osm_madw_get_mad_addr_ptr (p_madw)); @@ -1409,6 +1433,9 @@ static void mcmr_query_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) } if (OSM_LOG_IS_ACTIVE_V2(sa->p_log, OSM_LOG_DEBUG)) { + OSM_LOG(sa->p_log, OSM_LOG_DEBUG, + "Requester port GUID 0x%" PRIx64 "\n", + cl_ntoh64(osm_physp_get_port_guid(p_req_physp))); OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of record\n"); osm_dump_mc_record(sa->p_log, p_rcvd_rec, OSM_LOG_DEBUG); }