linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jim Foraker <foraker1-i2BcT+NCU+M@public.gmane.org>
Subject: [PATCH] opensm/osm_subnet.c: Improve error messages in subn_validate_neighbor
Date: Mon, 03 Dec 2012 10:25:39 -0500	[thread overview]
Message-ID: <50BCC473.3060000@dev.mellanox.co.il> (raw)


Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 opensm/osm_subnet.c |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c
index a3fc0b5..c716839 100644
--- a/opensm/osm_subnet.c
+++ b/opensm/osm_subnet.c
@@ -946,7 +946,8 @@ static void subn_validate_neighbor(osm_subn_t *p_subn)
 		valid_entry = TRUE;
 
 		OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_DEBUG,
-			"Validating neighbor for 0x%016" PRIx64 ", port %d\n",
+			"Validating neighbor for guid:0x%016" PRIx64
+			", port %d\n",
 			p_item->guid, p_item->portnum);
 		if (p_item->guid == 0) {
 			OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR,
@@ -954,31 +955,40 @@ static void subn_validate_neighbor(osm_subn_t *p_subn)
 			valid_entry = FALSE;
 		} else if (p_item->portnum == 0) {
 			OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR,
-				"ERR 7514: found invalid zero port\n");
+				"ERR 7514: found invalid zero port for "
+				"guid: 0x%016" PRIx64 "\n",
+				p_item->guid);
 			valid_entry = FALSE;
 		} else if (osm_db_neighbor_get(p_subn->p_neighbor,
 					       p_item->guid, p_item->portnum,
 					       &guid, &port)) {
 			OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR,
 				"ERR 7515: could not find neighbor for "
-				"guid: 0x%016" PRIx64 "\n", p_item->guid);
+				"guid: 0x%016" PRIx64 ", port %d\n",
+				p_item->guid, p_item->portnum);
 			valid_entry = FALSE;
 		} else if (guid == 0) {
 			OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR,
 				"ERR 7516: found invalid neighbor "
-				"zero guid");
+				"zero guid for guid: 0x%016" PRIx64
+				", port %d\n",
+				p_item->guid, p_item->portnum);
 			valid_entry = FALSE;
 		} else if (port == 0) {
 			OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR,
 				"ERR 7517: found invalid neighbor "
-				"zero port\n");
+				"zero port for guid: 0x%016" PRIx64
+				", port %d\n",
+				p_item->guid, p_item->portnum);
 			valid_entry = FALSE;
 		} else if (osm_db_neighbor_get(p_subn->p_neighbor,
 					       guid, port, &guid, &port) ||
 			guid != p_item->guid || port != p_item->portnum) {
 			OSM_LOG(&(p_subn->p_osm->log), OSM_LOG_ERROR,
 				"ERR 7518: neighbor does not point "
-				"back at us\n");
+				"back at us (guid: 0x%016" PRIx64
+				", port %d)\n",
+				p_item->guid, p_item->portnum);
 			valid_entry = FALSE;
 		}
 
-- 
1.7.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2012-12-03 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 15:25 Hal Rosenstock [this message]
     [not found] ` <50BCC473.3060000-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-01-30 17:53   ` [PATCH] opensm/osm_subnet.c: Improve error messages in subn_validate_neighbor Alex Netes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BCC473.3060000@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=foraker1-i2BcT+NCU+M@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).