Nothing fancy. manpage, cmdline options, config options, etc.
Al
--
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
>From 34dd390f201b3b58f4fb609499cf732494339333 Mon Sep 17 00:00:00 2001
From: Albert L. Chu <[EMAIL PROTECTED]>
Date: Wed, 18 Jun 2008 14:58:18 -0700
Subject: [PATCH] add guid_routing_order_file option
Signed-off-by: Albert L. Chu <[EMAIL PROTECTED]>
---
opensm/include/opensm/osm_subnet.h | 5 +++++
opensm/man/opensm.8.in | 9 ++++++++-
opensm/opensm/main.c | 14 +++++++++++++-
opensm/opensm/osm_subnet.c | 9 +++++++++
4 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
index cbc1596..3d31b7c 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -188,6 +188,7 @@ typedef struct osm_subn_opt {
char *root_guid_file;
char *cn_guid_file;
char *ids_guid_file;
+ char *guid_routing_order_file;
char *sa_db_file;
boolean_t exit_on_fatal;
boolean_t honor_guid2lid_file;
@@ -378,6 +379,10 @@ typedef struct osm_subn_opt {
* Name of the file that contains list of ids which should be
* used by Up/Down algorithm instead of node GUIDs
*
+* guid_routing_order_file
+* Name of the file that contains list of guids for routing order
+* that will be used by minhop and up/dn routing (provided by User).
+*
* sa_db_file
* Name of the SA database file.
*
diff --git a/opensm/man/opensm.8.in b/opensm/man/opensm.8.in
index b5ffd24..c863101 100644
--- a/opensm/man/opensm.8.in
+++ b/opensm/man/opensm.8.in
@@ -12,7 +12,9 @@ opensm \- InfiniBand subnet manager and administration (SM/SA)
[\-M <file name> | \-\-lid_matrix_file <file name>]
[\-U <file name> | \-\-ucast_file <file name>]
[\-S | \-\-sadb_file <file name>] [\-a | \-\-root_guid_file <path to file>]
-[\-u | \-\-cn_guid_file <path to file>] [\-m | \-\-ids_guid_file <path to file>]
+[\-u | \-\-cn_guid_file <path to file>]
+[\-X | \-\-guid_routing_order_file <path to file>]
+[\-m | \-\-ids_guid_file <path to file>]
[\-o(nce)] [\-s(weep) <interval>]
[\-t(imeout) <milliseconds>] [\-maxsmps <number>]
[\-console [off | local | socket | loopback]] [\-console-port <port>]
@@ -147,6 +149,11 @@ Name of the map file with set of the IDs which will be used
by Up/Down routing algorithm instead of node GUIDs
(format: <guid> <id> per line).
.TP
+\fB\-X\fR, \fB\-\-guid_routing_order_file\fR
+Set the order port guids will be routed for the MinHop
+and Up/Down routing algorithms to the guids provided in the
+given file (one to a line).
+.TP
\fB\-o\fR, \fB\-\-once\fR
This option causes OpenSM to configure the subnet
once, then exit. Ports remain in the ACTIVE state.
diff --git a/opensm/opensm/main.c b/opensm/opensm/main.c
index 48e9e47..505ef57 100644
--- a/opensm/opensm/main.c
+++ b/opensm/opensm/main.c
@@ -217,6 +217,11 @@ static void show_usage(void)
" Name of the map file with set of the IDs which will be used\n"
" by Up/Down routing algorithm instead of node GUIDs\n"
" (format: <guid> <id> per line)\n");
+ printf("-X\n"
+ "--guid_routing_order_file <path to file>\n"
+ " Set the order port guids will be routed for the MinHop\n"
+ " and Up/Down routing algorithms to the guids provided in the\n"
+ " given file (one to a line)\n\n");
printf("-o\n"
"--once\n"
" This option causes OpenSM to configure the subnet\n"
@@ -605,7 +610,7 @@ int main(int argc, char *argv[])
uint32_t val;
unsigned config_file_done = 0;
const char *const short_option =
- "F:i:f:ed:g:l:L:s:t:a:u:m:R:zM:U:S:P:Y:NBIQvVhorcyxp:n:q:k:C:";
+ "F:i:f:ed:g:l:L:s:t:a:u:m:X:R:zM:U:S:P:Y:NBIQvVhorcyxp:n:q:k:C:";
/*
In the array below, the 2nd parameter specifies the number
@@ -647,6 +652,7 @@ int main(int argc, char *argv[])
{"root_guid_file", 1, NULL, 'a'},
{"cn_guid_file", 1, NULL, 'u'},
{"ids_guid_file", 1, NULL, 'm'},
+ {"guid_routing_order_file", 1, NULL, 'X'},
{"cache-options", 0, NULL, 'c'},
{"stay_on_fatal", 0, NULL, 'y'},
{"honor_guid2lid", 0, NULL, 'x'},
@@ -949,6 +955,12 @@ int main(int argc, char *argv[])
printf(" IDs Guid File: %s\n", opt.ids_guid_file);
break;
+ case 'X':
+ /* Specifies guid routing order file */
+ opt.guid_routing_order_file = optarg;
+ printf(" GUID Routing Order File: %s\n", opt.guid_routing_order_file);
+ break;
+
case 'c':
cache_options = TRUE;
printf(" Caching command line options\n");
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 812b022..3de7ad6 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -454,6 +454,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * const p_opt)
p_opt->root_guid_file = NULL;
p_opt->cn_guid_file = NULL;
p_opt->ids_guid_file = NULL;
+ p_opt->guid_routing_order_file = NULL;
p_opt->sa_db_file = NULL;
p_opt->exit_on_fatal = TRUE;
p_opt->enable_quirks = FALSE;
@@ -1282,6 +1283,9 @@ int osm_subn_parse_conf_file(char *file_name, osm_subn_opt_t * const p_opts)
opts_unpack_charp("ids_guid_file",
p_key, p_val, &p_opts->ids_guid_file);
+ opts_unpack_charp("guid_routing_order_file",
+ p_key, p_val, &p_opts->guid_routing_order_file);
+
opts_unpack_charp("sa_db_file",
p_key, p_val, &p_opts->sa_db_file);
@@ -1526,6 +1530,11 @@ int osm_subn_write_conf_file(char *file_name, IN osm_subn_opt_t *const p_opts)
" Up/Down algorithm instead\n# of GUIDs (one guid and"
" id in each line)\nids_guid_file %s\n\n",
p_opts->ids_guid_file ? p_opts->ids_guid_file : null_str);
+
+ fprintf(opts_file,
+ "# The file holding guid routing order guids (for Up/Down)\n"
+ "guid_routing_order_file %s\n\n",
+ p_opts->guid_routing_order_file ? p_opts->guid_routing_order_file : null_str);
fprintf(opts_file,
"# SA database file name\nsa_db_file %s\n\n",
--
1.5.1
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general