[openib-general] [PATCH] opensm: verbose message about fallback to default routing engine.
Sasha Khapyorsky
sashak at voltaire.com
Wed Oct 4 12:34:36 PDT 2006
This provides verbose message for cases then specified routing engine
(with -R) was not found or this setup was failed.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
osm/opensm/osm_opensm.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/osm/opensm/osm_opensm.c b/osm/opensm/osm_opensm.c
index 0c5450d..00cb0f6 100644
--- a/osm/opensm/osm_opensm.c
+++ b/osm/opensm/osm_opensm.c
@@ -92,8 +92,12 @@ static int setup_routing_engine(osm_open
for (r = routing_modules; r->name && *r->name; r++) {
if(!strcmp(r->name, name)) {
p_osm->routing_engine.name = r->name;
- if (r->setup(p_osm))
- break;
+ if (r->setup(p_osm)) {
+ osm_log(&p_osm->log, OSM_LOG_VERBOSE,
+ "setup of routing engine \'%s\'"
+ " failed\n", name);
+ return -2;
+ }
osm_log (&p_osm->log, OSM_LOG_DEBUG,
"setup_routing_engine: "
"\'%s\' routing engine set up\n",
@@ -299,8 +303,13 @@ #endif
goto Exit;
if( p_opt->routing_engine_name &&
- setup_routing_engine(p_osm, p_opt->routing_engine_name))
+ setup_routing_engine(p_osm, p_opt->routing_engine_name)) {
+ osm_log( &p_osm->log, OSM_LOG_VERBOSE,
+ "osm_opensm_init: cannot find or setup routing engine"
+ " \'%s\'. Default will be used instead.\n",
+ p_opt->routing_engine_name);
goto Exit;
+ }
Exit:
osm_log( &p_osm->log, OSM_LOG_FUNCS, "osm_opensm_init: ]\n" ); /* Format Waived */
More information about the general
mailing list