Nothing too fancy in this patch. Just added the port_offsetting option,
config file option, manpage documentation, etc. Again, I welcome
comments on the text + the option name. "port_offsetting" was the best
name I could come up with :-)
Al
--
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
>From 8a48340513e75daf637de4c7e359ac5d6d0c5823 Mon Sep 17 00:00:00 2001
From: Albert L. Chu <[EMAIL PROTECTED]>
Date: Thu, 20 Mar 2008 16:23:01 -0700
Subject: [PATCH] add port_offsetting option
Signed-off-by: Albert L. Chu <[EMAIL PROTECTED]>
---
opensm/include/opensm/osm_subnet.h | 10 ++++++++++
opensm/man/opensm.8.in | 10 ++++++++++
opensm/opensm/main.c | 17 ++++++++++++++++-
opensm/opensm/osm_subnet.c | 9 +++++++++
4 files changed, 45 insertions(+), 1 deletions(-)
diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h
index b1dd659..c5ef3f3 100644
--- a/opensm/include/opensm/osm_subnet.h
+++ b/opensm/include/opensm/osm_subnet.h
@@ -256,6 +256,7 @@ typedef struct _osm_subn_opt {
boolean_t sweep_on_trap;
char *routing_engine_name;
boolean_t connect_roots;
+ boolean_t port_offsetting;
char *lid_matrix_dump_file;
char *ucast_dump_file;
char *root_guid_file;
@@ -441,6 +442,15 @@ typedef struct _osm_subn_opt {
* up/down routing engine (even if this violates "pure" deadlock
* free up/down algorithm)
*
+* port_offsetting
+* This option will support port offsetting when setting up
+* forwarding tables with minhop or updn routing. Under some scenarios
+* when LMC > 0, the base lid of multiple destinations can be
+* forwarded out the same port, leading to performance issues if
+* users use only one lid for sending IB data. This option will
+* attempt to 'offset' this issue by shifting port forwarding assignments
+* around to ensure base lids are not aligned on the same port.
+*
* lid_matrix_dump_file
* Name of the lid matrix dump file from where switch
* lid matrices (min hops tables) will be loaded
diff --git a/opensm/man/opensm.8.in b/opensm/man/opensm.8.in
index 1c47160..b3d5915 100644
--- a/opensm/man/opensm.8.in
+++ b/opensm/man/opensm.8.in
@@ -9,6 +9,7 @@ opensm \- InfiniBand subnet manager and administration (SM/SA)
[\-p(riority) <PRIORITY>] [\-smkey <SM_Key>] [\-r(eassign_lids)]
[\-R <engine name> | \-\-routing_engine <engine name>]
[\-z | \-\-connect_roots]
+[\-O | \-\-port_offsetting]
[\-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>]
@@ -117,6 +118,15 @@ only) to make connectivity between root switches and in
this way to be fully IBA complaint. In many cases this can
violate "pure" deadlock free algorithm, so use it carefully.
.TP
+\fB\-O\fR, \fB\-\-port_offsetting\fR
+This option will support port offsetting when setting up forwarding
+tables with minhop or updn routing. Under some scenarios with LMC > 0,
+the base lid of multiple destinations can be forwarded out the same port,
+leading to performance issues if users use only one lid for sending
+IB data. This option will attempt to 'offset' this issue by shifting port
+forwarding assignments around to ensure base lids are not aligned
+on the same port.
+.TP
\fB\-M\fR, \fB\-\-lid_matrix_file\fR
This option specifies the name of the lid matrix dump file
from where switch lid matrices (min hops tables will be
diff --git a/opensm/opensm/main.c b/opensm/opensm/main.c
index fb41d50..d3786ba 100644
--- a/opensm/opensm/main.c
+++ b/opensm/opensm/main.c
@@ -183,6 +183,15 @@ static void show_usage(void)
" and in this way be IBA compliant. In many cases,\n"
" this can violate \"pure\" deadlock free algorithm, so\n"
" use it carefully.\n\n");
+ printf("-O\n"
+ "--port_offsetting\n"
+ " This option will support port offsetting when setting up\n"
+ " forwarding tables with minhop or updn routing. Under some scenarios\n"
+ " when LMC > 0, the base lid of multiple destinations can be\n"
+ " forwarded out the same port, leading to performance issues\n"
+ " if users use only one lid for sending IB data. This option will\n"
+ " attempt to 'offset' this issue by shifting port forwarding assignments\n"
+ " around to ensure base lids are not aligned on the same port.\n\n");
printf("-M\n"
"--lid_matrix_file <file name>\n"
" This option specifies the name of the lid matrix dump file\n"
@@ -599,7 +608,7 @@ int main(int argc, char *argv[])
char *ignore_guids_file_name = NULL;
uint32_t val;
const char *const short_option =
- "i:f:ed:g:l:L:s:t:a:u:m:R:zM:U:S:P:Y:NBIQvVhorcyxp:n:q:k:C:";
+ "i:f:ed:g:l:L:s:t:a:u:m:R:zOM:U:S:P:Y:NBIQvVhorcyxp:n:q:k:C:";
/*
In the array below, the 2nd parameter specifies the number
@@ -634,6 +643,7 @@ int main(int argc, char *argv[])
{"smkey", 1, NULL, 'k'},
{"routing_engine", 1, NULL, 'R'},
{"connect_roots", 0, NULL, 'z'},
+ {"port_offsetting", 0, NULL, 'O'},
{"lid_matrix_file", 1, NULL, 'M'},
{"ucast_file", 1, NULL, 'U'},
{"sadb_file", 1, NULL, 'S'},
@@ -891,6 +901,11 @@ int main(int argc, char *argv[])
printf(" Connect roots option is on\n");
break;
+ case 'O':
+ opt.port_offsetting = TRUE;
+ printf(" Port offsetting option is on\n");
+ break;
+
case 'M':
opt.lid_matrix_dump_file = optarg;
printf(" Lid matrix dump file is \'%s\'\n", optarg);
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 47d735f..ea83987 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -461,6 +461,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * const p_opt)
p_opt->sweep_on_trap = TRUE;
p_opt->routing_engine_name = NULL;
p_opt->connect_roots = FALSE;
+ p_opt->port_offsetting = FALSE;
p_opt->lid_matrix_dump_file = NULL;
p_opt->ucast_dump_file = NULL;
p_opt->root_guid_file = NULL;
@@ -1290,6 +1291,9 @@ ib_api_status_t osm_subn_parse_conf_file(IN osm_subn_opt_t * const p_opts)
opts_unpack_boolean("connect_roots",
p_key, p_val, &p_opts->connect_roots);
+ opts_unpack_boolean("port_offsetting",
+ p_key, p_val, &p_opts->port_offsetting);
+
opts_unpack_charp("log_file", p_key, p_val, &p_opts->log_file);
opts_unpack_uint32("log_max_size",
@@ -1543,6 +1547,11 @@ ib_api_status_t osm_subn_write_conf_file(IN osm_subn_opt_t * const p_opts)
"# Connect roots (use FALSE if unsure)\n"
"connect_roots %s\n\n",
p_opts->connect_roots ? "TRUE" : "FALSE");
+ if (p_opts->port_offsetting)
+ fprintf(opts_file,
+ "# Port Offsetting when setting up forwarding tables\n"
+ "port_offsetting %s\n\n",
+ p_opts->port_offsetting ? "TRUE" : "FALSE");
if (p_opts->lid_matrix_dump_file)
fprintf(opts_file,
"# Lid matrix dump file name\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