Hey Sasha,

lfts_file would be fine as well.  I just wanted to make it consistent
throughout.  Patch is attached.

Note, I tweaked a lot of documentation because of this.  Wherever it
stated "dump file", I changed to "lfts file" or just "file" as
appropriate.

Al

On Tue, 2008-07-29 at 01:48 +0300, Sasha Khapyorsky wrote:
> Hi Al,
> 
> On 13:59 Mon 28 Jul     , Al Chu wrote:
> > 
> > Simple patch.  Just change the command line option for consistency to
> > the config file, variable name, etc.  
> > 
> > Alternately, we could rename everything else from ucast_dump_file to
> > ucast_file.
> 
> I think it would be better because this is not a dump file, but *input*
> LFTs file. Probably it is even better to rename it to 'lfts_file' or so.
> What do you think?
> 
> Sasha
-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
>From 95840d4310fd873ac239e9502b8058f67e0fa0c2 Mon Sep 17 00:00:00 2001
From: Albert L. Chu <[EMAIL PROTECTED]>
Date: Tue, 29 Jul 2008 10:17:16 -0700
Subject: [PATCH] rename ucast_file and ucast_dump_file to lft_file


Signed-off-by: Albert L. Chu <[EMAIL PROTECTED]>
---
 opensm/doc/modular-routing.txt     |   22 +++++++++++-----------
 opensm/include/opensm/osm_subnet.h |    6 +++---
 opensm/man/opensm.8.in             |   24 ++++++++++++------------
 opensm/opensm/main.c               |   10 +++++-----
 opensm/opensm/osm_subnet.c         |   10 +++++-----
 opensm/opensm/osm_ucast_file.c     |    4 ++--
 6 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/opensm/doc/modular-routing.txt b/opensm/doc/modular-routing.txt
index a531c5a..3f2174b 100644
--- a/opensm/doc/modular-routing.txt
+++ b/opensm/doc/modular-routing.txt
@@ -13,24 +13,24 @@ General usage is:
 $ opensm -R 'module-name'
 
 There is also a trivial routing module which is able
-to load LFT tables from a dump file.
+to load LFT tables from a file.
 
 Main features:
 
 - this will load switch LFTs and/or LID matrices (min hops tables)
 - this will load switch LFTs according to the path entries introduced in
-  the dump file
+  the file
 - no additional checks will be performed (such as "is port connected", etc.)
 - in case when fabric LIDs were changed this will try to reconstruct LFTs
-  correctly if endport GUIDs are represented in the dump file (in order
-  to disable this GUIDs may be removed from the dump file or zeroed)
+  correctly if endport GUIDs are represented in the file (in order
+  to disable this GUIDs may be removed from the file or zeroed)
 
-The dump file format is compatible with output of 'ibroute' util and for
+The file format is compatible with output of 'ibroute' util and for
 whole fabric may be generated with script like this:
 
   for sw_lid in `ibswitches | awk '{print $NF}'` ; do
 	ibroute $sw_lid
-  done > /path/to/dump_file
+  done > /path/to/lfts_file
 
 , or using DR paths:
 
@@ -39,21 +39,21 @@ whole fabric may be generated with script like this:
 		| sed -e 's/\]\[/,/g' \
 		| sort -u` ; do
 	ibroute -D ${sw_dr}
-  done > /path/to/dump_file
+  done > /path/to/lfts_file
 
 This script is dump_lfts.sh
 
 In order to activate new module use:
 
-  opensm -R file -U /path/to/dump_file
+  opensm -R file -U /path/to/lfts_file
 
-If the dump_file is not found or is in error, the default routing
+If the lfts_file is not found or is in error, the default routing
 algorithm is utilized.
 
 The ability to dump switch lid matrices (aka min hops tables) to file and
 later to load these is also supported.
 
-The usage is similar to unicast forwarding tables loading from dump
+The usage is similar to unicast forwarding tables loading from a lfts
 file (introduced by 'file' routing engine), but new lid matrix file
 name should be specified by -M or --lid_matrix_file option. For example:
 
@@ -63,7 +63,7 @@ The dump file is named 'opensm-lid-matrix.dump' and will be generated in
 standard opensm dump directory (/var/log by default) when
 OSM_LOG_ROUTING logging flag is set.
 
-When routing engine 'file' is activated, but dump file is not specified
+When routing engine 'file' is activated, but the lfts file is not specified
 or cannot be opened, the default lid matrix algorithm will be used.
 
 There is also a switch forwarding tables dumper which generates
diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
index 289684b..c72d2fb 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -185,7 +185,7 @@ typedef struct osm_subn_opt {
 	char *routing_engine_name;
 	boolean_t connect_roots;
 	char *lid_matrix_dump_file;
-	char *ucast_dump_file;
+	char *lfts_file;
 	char *root_guid_file;
 	char *cn_guid_file;
 	char *ids_guid_file;
@@ -366,8 +366,8 @@ typedef struct osm_subn_opt {
 *		Name of the lid matrix dump file from where switch
 *		lid matrices (min hops tables) will be loaded
 *
-*	ucast_dump_file
-*		Name of the unicast routing dump file from where switch
+*	lfts_file
+*		Name of the unicast LFTs routing file from where switch
 *		forwarding tables will be loaded
 *
 *	root_guid_file
diff --git a/opensm/man/opensm.8.in b/opensm/man/opensm.8.in
index a14b5b5..1a10f7b 100644
--- a/opensm/man/opensm.8.in
+++ b/opensm/man/opensm.8.in
@@ -12,7 +12,7 @@ opensm \- InfiniBand subnet manager and administration (SM/SA)
 [\-R <engine name> | \-\-routing_engine <engine name>]
 [\-z | \-\-connect_roots]
 [\-M <file name> | \-\-lid_matrix_file <file name>]
-[\-U <file name> | \-\-ucast_file <file name>]
+[\-U <file name> | \-\-lfts_file <file name>]
 [\-S | \-\-sadb_file <file name>] [\-a | \-\-root_guid_file <path to file>]
 [\-u | \-\-cn_guid_file <path to file>]
 [\-X | \-\-guid_routing_order_file <path to file>]
@@ -131,8 +131,8 @@ This option specifies the name of the lid matrix dump file
 from where switch lid matrices (min hops tables will be
 loaded.
 .TP
-\fB\-U\fR, \fB\-\-ucast_file\fR
-This option specifies the name of the unicast dump file
+\fB\-U\fR, \fB\-\-lfts_file\fR
+This option specifies the name of the LFTs file
 from where switch forwarding tables will be loaded.
 .TP
 \fB\-S\fR, \fB\-\-sadb_file\fR
@@ -898,34 +898,34 @@ General usage is:
 $ opensm -R 'module-name'
 
 There is also a trivial routing module which is able
-to load LFT tables from a dump file.
+to load LFT tables from a file.
 
 Main features:
 
  - this will load switch LFTs and/or LID matrices (min hops tables)
  - this will load switch LFTs according to the path entries introduced
-   in the dump file
+   in the file
  - no additional checks will be performed (such as "is port connected",
    etc.)
  - in case when fabric LIDs were changed this will try to reconstruct
-   LFTs correctly if endport GUIDs are represented in the dump file
-   (in order to disable this, GUIDs may be removed from the dump file
+   LFTs correctly if endport GUIDs are represented in the file
+   (in order to disable this, GUIDs may be removed from the file
     or zeroed)
 
-The dump file format is compatible with output of 'ibroute' util and for
+The file format is compatible with output of 'ibroute' util and for
 whole fabric can be generated with dump_lfts.sh script.
 
 To activate file based routing module, use:
 
-  opensm -R file -U /path/to/dump_file
+  opensm -R file -U /path/to/lfts_file
 
-If the dump_file is not found or is in error, the default routing
+If the lfts_file is not found or is in error, the default routing
 algorithm is utilized.
 
 The ability to dump switch lid matrices (aka min hops tables) to file and
 later to load these is also supported.
 
-The usage is similar to unicast forwarding tables loading from dump
+The usage is similar to unicast forwarding tables loading from a lfts
 file (introduced by 'file' routing engine), but new lid matrix file
 name should be specified by -M or --lid_matrix_file option. For example:
 
@@ -935,7 +935,7 @@ The dump file is named \'opensm-lid-matrix.dump\' and will be generated
 in standard opensm dump directory (/var/log by default) when
 OSM_LOG_ROUTING logging flag is set.
 
-When routing engine 'file' is activated, but dump file is not specified
+When routing engine 'file' is activated, but the lfts file is not specified
 or not cannot be open default lid matrix algorithm will be used.
 
 There is also a switch forwarding tables dumper which generates
diff --git a/opensm/opensm/main.c b/opensm/opensm/main.c
index 8edce33..e32f539 100644
--- a/opensm/opensm/main.c
+++ b/opensm/opensm/main.c
@@ -193,8 +193,8 @@ static void show_usage(void)
 	       "          from where switch lid matrices (min hops tables will be\n"
 	       "          loaded.\n\n");
 	printf("-U\n"
-	       "--ucast_file <file name>\n"
-	       "          This option specifies the name of the unicast dump file\n"
+	       "--lfts_file <file name>\n"
+	       "          This option specifies the name of the LFTs file\n"
 	       "          from where switch forwarding tables will be loaded.\n\n");
 	printf("-S\n"
 	       "--sadb_file <file name>\n"
@@ -579,7 +579,7 @@ int main(int argc, char *argv[])
 		{"routing_engine", 1, NULL, 'R'},
 		{"connect_roots", 0, NULL, 'z'},
 		{"lid_matrix_file", 1, NULL, 'M'},
-		{"ucast_file", 1, NULL, 'U'},
+		{"lfts_file", 1, NULL, 'U'},
 		{"sadb_file", 1, NULL, 'S'},
 		{"root_guid_file", 1, NULL, 'a'},
 		{"cn_guid_file", 1, NULL, 'u'},
@@ -862,8 +862,8 @@ int main(int argc, char *argv[])
 			break;
 
 		case 'U':
-			opt.ucast_dump_file = optarg;
-			printf(" Ucast dump file is \'%s\'\n", optarg);
+			opt.lfts_file = optarg;
+			printf(" LFTs file is \'%s\'\n", optarg);
 			break;
 
 		case 'S':
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 19351d1..1fc2d67 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -445,7 +445,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * const p_opt)
 	p_opt->routing_engine_name = NULL;
 	p_opt->connect_roots = FALSE;
 	p_opt->lid_matrix_dump_file = NULL;
-	p_opt->ucast_dump_file = NULL;
+	p_opt->lfts_file = NULL;
 	p_opt->root_guid_file = NULL;
 	p_opt->cn_guid_file = NULL;
 	p_opt->ids_guid_file = NULL;
@@ -1295,8 +1295,8 @@ int osm_subn_parse_conf_file(char *file_name, osm_subn_opt_t * const p_opts)
 		opts_unpack_charp("lid_matrix_dump_file",
 				  p_key, p_val, &p_opts->lid_matrix_dump_file);
 
-		opts_unpack_charp("ucast_dump_file",
-				  p_key, p_val, &p_opts->ucast_dump_file);
+		opts_unpack_charp("lfts_file",
+				  p_key, p_val, &p_opts->lfts_file);
 
 		opts_unpack_charp("root_guid_file",
 				  p_key, p_val, &p_opts->root_guid_file);
@@ -1536,8 +1536,8 @@ int osm_subn_write_conf_file(char *file_name, IN osm_subn_opt_t *const p_opts)
 		p_opts->lid_matrix_dump_file : null_str);
 
 	fprintf(opts_file,
-		"# Ucast dump file name\nucast_dump_file %s\n\n",
-		p_opts->ucast_dump_file ? p_opts->ucast_dump_file : null_str);
+		"# LFTs file name\nlfts_file %s\n\n",
+		p_opts->lfts_file ? p_opts->lfts_file : null_str);
 
 	fprintf(opts_file,
 		"# The file holding the root node guids (for fat-tree or Up/Down)\n"
diff --git a/opensm/opensm/osm_ucast_file.c b/opensm/opensm/osm_ucast_file.c
index dee0e01..3d00cb2 100644
--- a/opensm/opensm/osm_ucast_file.c
+++ b/opensm/opensm/osm_ucast_file.c
@@ -130,10 +130,10 @@ static int do_ucast_file_load(void *context)
 	uint8_t port_num;
 	unsigned lineno;
 
-	file_name = p_osm->subn.opt.ucast_dump_file;
+	file_name = p_osm->subn.opt.lfts_file;
 	if (!file_name) {
 		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
-			"ucast dump file name is not given; "
+			"LFTs file name is not given; "
 			"using default routing algorithm\n");
 		return -1;
 	}
-- 
1.5.4.5

_______________________________________________
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

Reply via email to