[openib-general] [PATCH] Opensm - duplicated guids error message --text follows this line--
Yael Kalka
yael at mellanox.co.il
Tue Nov 29 05:04:27 PST 2005
Currently the error message generated if there are duplicated guids on
the subnet is not clear, and is devided to several error messages.
The following patch fixes the error message to be clearer.
Thanks,
Yael
Signed-off-by: Yael Kalka <yael at mellanox.co.il>
Index: opensm/osm_node_info_rcv.c
===================================================================
--- opensm/osm_node_info_rcv.c (revision 4198)
+++ opensm/osm_node_info_rcv.c (working copy)
@@ -133,43 +133,72 @@ __osm_ni_rcv_set_links(
{
/*
Uh oh...
+ This means that we found 2 nodes with the same guid,
+ or a 12x link with lane reversal that is not configured correctly.
*/
+ char buf[BUF_SIZE];
+ char line[BUF_SIZE];
+ char dr_new_path[BUF_SIZE];
+ char dr_old_path[BUF_SIZE];
+ uint32_t i;
+ osm_dr_path_t *p_path = NULL, *p_old_path = NULL;
+
+ p_physp = osm_node_get_physp_ptr( p_node, port_num );
+ sprintf(dr_new_path, "no_path_available");
+ if (p_physp)
+ {
+ p_path = osm_physp_get_dr_path_ptr( p_physp );
+ if ( p_path )
+ {
+ sprintf( dr_new_path, "new path:");
+ for (i = 0; i <= p_path->hop_count; i++ )
+ {
+ sprintf( line, "[%X]", p_path->path[i] );
+ strcat( dr_new_path, line );
+ }
+ }
+ }
+
p_old_neighbor_node = osm_node_get_remote_node(
p_node, port_num, &old_neighbor_port_num );
+ p_old_physp = osm_node_get_physp_ptr(
+ p_old_neighbor_node,
+ old_neighbor_port_num);
+ sprintf(dr_old_path, "no_path_available");
+ if (p_old_physp)
+ {
+ p_old_path = osm_physp_get_dr_path_ptr( p_old_physp );
+ if ( p_old_path )
+ {
+ sprintf( dr_old_path, "old_path:");
+ for (i = 0; i <= p_old_path->hop_count; i++ )
+ {
+ sprintf( line, "[%X]", p_old_path->path[i] );
+ strcat( dr_old_path, line );
+ }
+ }
+ }
osm_log( p_rcv->p_log, OSM_LOG_ERROR,
"__osm_ni_rcv_set_links: ERR 0D01: "
+ "Found duplicated guids or 12x link "
+ "with lane reversal badly configured.\n"
"Overriding existing link to:"
"node 0x%" PRIx64 ", port number 0x%X connected to:\n"
"\t\t\t\told node 0x%" PRIx64 ", "
- "port number 0x%X\n"
+ "port number 0x%X %s\n"
"\t\t\t\tnew node 0x%" PRIx64 ", "
- "port number 0x%X\n",
+ "port number 0x%X %s\n",
cl_ntoh64( osm_node_get_node_guid( p_node ) ),
port_num,
cl_ntoh64( osm_node_get_node_guid(
p_old_neighbor_node ) ),
old_neighbor_port_num ,
+ dr_old_path,
cl_ntoh64( p_ni_context->node_guid ),
- p_ni_context->port_num
+ p_ni_context->port_num,
+ dr_new_path
);
-
- if (osm_log_is_active(p_rcv->p_log, OSM_LOG_ERROR))
- {
- p_physp = osm_node_get_physp_ptr( p_node, port_num );
- if (p_physp)
- osm_dump_dr_path(p_rcv->p_log,
- osm_physp_get_dr_path_ptr( p_physp ),
- OSM_LOG_ERROR);
-
- p_old_physp = osm_node_get_physp_ptr(
- p_old_neighbor_node,
- old_neighbor_port_num);
- if (p_old_physp)
- osm_dump_dr_path(p_rcv->p_log,
- osm_physp_get_dr_path_ptr( p_old_physp ),
- OSM_LOG_ERROR);
- }
}
/*
More information about the general
mailing list