[ofa-general] [PATCH] opensm: add do_mesh_analysis configuration parameter

Sasha Khapyorsky sashak at voltaire.com
Sat Dec 20 12:14:40 PST 2008


Add do_mesh_analysis as configuration parameter loadable from OpenSM
config file.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/include/opensm/osm_subnet.h |    2 +-
 opensm/opensm/osm_subnet.c         |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
index 56b957f..8863e47 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -193,6 +193,7 @@ typedef struct osm_subn_opt {
 	char *ids_guid_file;
 	char *guid_routing_order_file;
 	char *sa_db_file;
+	boolean_t do_mesh_analysis;
 	boolean_t exit_on_fatal;
 	boolean_t honor_guid2lid_file;
 	boolean_t daemon;
@@ -216,7 +217,6 @@ typedef struct osm_subn_opt {
 	char *node_name_map_name;
 	char *prefix_routes_file;
 	boolean_t consolidate_ipv6_snm_req;
-	boolean_t do_mesh_analysis;
 } osm_subn_opt_t;
 /*
 * FIELDS
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 909c29e..122d4dd 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -413,6 +413,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * const p_opt)
 	p_opt->ids_guid_file = NULL;
 	p_opt->guid_routing_order_file = NULL;
 	p_opt->sa_db_file = NULL;
+	p_opt->do_mesh_analysis = FALSE;
 	p_opt->exit_on_fatal = TRUE;
 	p_opt->enable_quirks = FALSE;
 	p_opt->no_clients_rereg = FALSE;
@@ -1168,6 +1169,9 @@ int osm_subn_parse_conf_file(char *file_name, osm_subn_opt_t * const p_opts)
 		opts_unpack_charp("sa_db_file",
 				  p_key, p_val, &p_opts->sa_db_file);
 
+		opts_unpack_boolean("do_mesh_analysis",
+				    p_key, p_val, &p_opts->do_mesh_analysis);
+
 		opts_unpack_boolean("exit_on_fatal",
 				    p_key, p_val, &p_opts->exit_on_fatal);
 
@@ -1472,6 +1476,11 @@ int osm_subn_output_conf(FILE *out, IN osm_subn_opt_t *const p_opts)
 		p_opts->guid_routing_order_file ? p_opts->guid_routing_order_file : null_str);
 
 	fprintf(out,
+		"# Do mesh topology analysis (for LASH algorithm)\n"
+		"do_mesh_analysis %s\n\n",
+		p_opts->do_mesh_analysis ? "TRUE" : "FALSE");
+
+	fprintf(out,
 		"# SA database file name\nsa_db_file %s\n\n",
 		p_opts->sa_db_file ? p_opts->sa_db_file : null_str);
 
-- 
1.6.0.4.766.g6fc4a




More information about the general mailing list