[openib-general] [PATCH] opensm: setup function for 'null' routing engine

Sasha Khapyorsky sashak at voltaire.com
Wed Oct 4 12:18:34 PDT 2006


This defines setup function for 'null' routing engine. Currently there
is only log message and fallback to default behavior, so the function
is needed to prevent opensm crash when '-R null' is used.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---

 osm/opensm/osm_opensm.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/osm/opensm/osm_opensm.c b/osm/opensm/osm_opensm.c
index ac9d462..0c5450d 100644
--- a/osm/opensm/osm_opensm.c
+++ b/osm/opensm/osm_opensm.c
@@ -76,8 +76,10 @@ struct routing_engine_module {
 extern int osm_ucast_updn_setup(osm_opensm_t *p_osm);
 extern int osm_ucast_file_setup(osm_opensm_t *p_osm);
 
+static int osm_ucast_null_setup(osm_opensm_t *p_osm);
+
 const static struct routing_engine_module routing_modules[] = {
-	{ "null", NULL },
+	{ "null", osm_ucast_null_setup },
 	{ "updn", osm_ucast_updn_setup },
 	{ "file", osm_ucast_file_setup },
 	{ NULL, NULL }
@@ -102,6 +104,14 @@ static int setup_routing_engine(osm_open
 	return -1;
 }
 
+static int osm_ucast_null_setup(osm_opensm_t *p_osm)
+{
+	osm_log(&p_osm->log, OSM_LOG_VERBOSE,
+		"osm_ucast_null_setup: nothing yet - "
+		"will use default routing engine\n");
+	return 0;
+}
+
 /**********************************************************************
  **********************************************************************/
 void




More information about the general mailing list