[ofa-general] [PATCH 2/2] OpenSM: Add support for making SM inactive

Hal Rosenstock halr at voltaire.com
Tue Mar 27 18:22:15 PDT 2007


OpenSM: Add support for making SM inactive

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

diff --git a/osm/man/opensm.8 b/osm/man/opensm.8
index 4d1e45b..5e8a1bd 100644
--- a/osm/man/opensm.8
+++ b/osm/man/opensm.8
@@ -5,7 +5,7 @@ opensm \- InfiniBand subnet manager and
 
 .SH SYNOPSIS
 .B opensm
-[\-c(ache-options)] [\-g(uid)[=]<GUID in hex>] [\-l(mc) <LMC>] [\-p(riority) <PRIORITY>] [\-smkey <SM_Key>] [\-r(eassign_lids)] [\-R <engine name> | \-routing_engine <engine name>] [\-M <file name> | \-lid_matrix_file <file name>] [\-U <file name> | \-ucast_file <file name>] [\-S | \-\-sadb_file <file name>] [\-a(dd_guid_file) <path to file>] [\-o(nce)] [\-s(weep) <interval>] [\-t(imeout) <milliseconds>] [\-maxsmps <number>] [\-console [off | local | socket]] [\-console-port <port>] [\-i(gnore-guids) <equalize-ignore-guids-file>] [\-f | \-\-log_file] [\-L | \-\-log_limit <size in MB>] [\-e(rase_log_file)] [\-P(config)] [\-Q | \-qos] [\-N | \-no_part_enforce] [\-y | \-stay_on_fatal] [\-B | \-daemon] [\-v(erbose)] [\-V] [\-D <flags>] [\-d(ebug) <number>] [\-h(elp)] [\-?]
+[\-c(ache-options)] [\-g(uid)[=]<GUID in hex>] [\-l(mc) <LMC>] [\-p(riority) <PRIORITY>] [\-smkey <SM_Key>] [\-r(eassign_lids)] [\-R <engine name> | \-routing_engine <engine name>] [\-M <file name> | \-lid_matrix_file <file name>] [\-U <file name> | \-ucast_file <file name>] [\-S | \-\-sadb_file <file name>] [\-a(dd_guid_file) <path to file>] [\-o(nce)] [\-s(weep) <interval>] [\-t(imeout) <milliseconds>] [\-maxsmps <number>] [\-console [off | local | socket]] [\-console-port <port>] [\-i(gnore-guids) <equalize-ignore-guids-file>] [\-f | \-\-log_file] [\-L | \-\-log_limit <size in MB>] [\-e(rase_log_file)] [\-P(config)] [\-Q | \-qos] [\-N | \-no_part_enforce] [\-y | \-stay_on_fatal] [\-B | \-daemon] [\-I | \-inactive] [\-v(erbose)] [\-V] [\-D <flags>] [\-d(ebug) <number>] [\-h(elp)] [\-?]
 
 .SH DESCRIPTION
 .PP
@@ -185,6 +185,9 @@ By default, the SM will exit on these er
 \fB\-B\fR, \fB\-\-daemon\fR
 Run in daemon mode - OpenSM will run in the background.
 .TP
+\fB\-I\fR, \fB\-\-inactive\fR
+Start SM in inactive rather than normal init SM state.
+.TP
 \fB\-v\fR, \fB\-\-verbose\fR
 This option increases the log verbosity level.
 The -v option may be specified multiple times
diff --git a/osm/opensm/main.c b/osm/opensm/main.c
index 77ca343..a3f892b 100644
--- a/osm/opensm/main.c
+++ b/osm/opensm/main.c
@@ -270,6 +270,9 @@ show_usage(void)
   printf( "-B\n"
           "--daemon\n"
           "          Run in daemon mode - OpenSM will run in the background.\n\n");
+  printf("-I\n"
+         "--inactive\n"
+         "           Start SM in inactive rather than normal init SM state.\n\n");
   printf( "-v\n"
           "--verbose\n"
           "          This option increases the log verbosity level.\n"
@@ -582,7 +585,7 @@ main(
   boolean_t             cache_options = FALSE;
   char                 *ignore_guids_file_name = NULL;
   uint32_t              val;
-  const char * const    short_option = "i:f:ed:g:l:L:s:t:a:R:M:U:S:P:NBQvVhorcyx";
+  const char * const    short_option = "i:f:ed:g:l:L:s:t:a:R:M:U:S:P:NBIQvVhorcyx";
 
   /*
     In the array below, the 2nd parameter specifies the number
@@ -627,6 +630,7 @@ main(
       {  "console-port",  1, NULL, 'C'},
 #endif
       {  "daemon",        0, NULL, 'B'},
+      {  "inactive",      0, NULL, 'I'},
       {  NULL,            0, NULL,  0 }  /* Required at the end of the array */
     };
 
@@ -895,7 +899,12 @@ main(
 
     case 'B':
       opt.daemon = TRUE;
-      printf (" Daemon mode.\n");
+      printf (" Daemon mode\n");
+      break;
+
+    case 'I':
+      opt.sm_inactive = TRUE;
+      printf(" SM started in inactive state\n");
       break;
 
     case 'h':






More information about the general mailing list