[openib-general] [PATCH] OPENSM identify failure cases uniquely

Grant Grundler iod00d at hp.com
Sat Dec 10 20:42:31 PST 2005


Hi,
When tracking down the opensm "can't open port" failure described
in previous email, I added log output for each of the failure cases
in osm_vendor_open_port().

The "ERR" numbers need to be compared to some "master list" that
I don't know about and replaced.
I just picked sequential numbers not used in that routine.

thanks,
grant

Signed-off-by: Grant Grundler <iod00d at hp.com>

Index: src/userspace/management/osm/libvendor/osm_vendor_ibumad.c
===================================================================
--- src/userspace/management/osm/libvendor/osm_vendor_ibumad.c	(revision 4371)
+++ src/userspace/management/osm/libvendor/osm_vendor_ibumad.c	(working copy)
@@ -715,14 +715,26 @@ osm_vendor_open_port(
 	}
 
 	/* Port found, try to open it */
-	if (umad_get_ca(p_vend->ca_names[ca], &p_vend->umad_ca) < 0)
+	if (umad_get_ca(p_vend->ca_names[ca], &p_vend->umad_ca) < 0) {
+		osm_log( p_vend->p_log, OSM_LOG_ERROR,
+				"osm_vendor_open_port: ERR 5423: "
+				"umad_get_ca() failed\n" );
 		goto Exit;
+	}
 
-	if (umad_get_port(p_vend->ca_names[ca], i, &p_vend->umad_port) < 0)
+	if (umad_get_port(p_vend->ca_names[ca], i, &p_vend->umad_port) < 0) {
+		osm_log( p_vend->p_log, OSM_LOG_ERROR,
+				"osm_vendor_open_port: ERR 5424: "
+				"umad_get_port() failed\n" );
 		goto Exit;
+	}
 
-	if ((umad_port_id = umad_open_port(p_vend->ca_names[ca], i)) < 0)
+	if ((umad_port_id = umad_open_port(p_vend->ca_names[ca], i)) < 0) {
+		osm_log( p_vend->p_log, OSM_LOG_ERROR,
+				"osm_vendor_open_port: ERR 5425: "
+				"umad_open_port() failed\n" );
 		goto Exit;
+	}
 
 	p_vend->umad_port_id = umad_port_id;
 



More information about the general mailing list