[openib-general] [PATCH] OpenSM: Support SMKey command line option
Hal Rosenstock
halr at voltaire.com
Tue Nov 8 13:01:30 PST 2005
OpenSM: Support SMKey command line option
IBA requires (in C14-37.1.1) an out of band method to set SM_Key. A
command line option is added for this. (There already is an option for
SM_Priority.
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: main.c
===================================================================
--- main.c (revision 3991)
+++ main.c (working copy)
@@ -118,6 +118,9 @@ show_usage(void)
" This option specifies the SM's PRIORITY.\n"
" This will effect the handover cases, where master\n"
" is chosen by priority and GUID.\n" );
+ printf( "-smkey <SM_Key>\n"
+ " This option specifies the SM's SM_Key (64 bits).\n"
+ " This will effect SM authentication.\n" );
printf( "-r\n"
"--reassign_lids\n"
" This option causes OpenSM to reassign LIDs to all\n"
@@ -443,6 +446,7 @@ main(
{
osm_subn_opt_t opt;
ib_net64_t guid = 0;
+ ib_net64_t sm_key = 0;
ib_api_status_t status;
uint32_t log_flags = OSM_LOG_DEFAULT_LEVEL;
uint32_t temp, dbg_lvl;
@@ -484,6 +488,7 @@ main(
{ "once", 0, NULL, 'o'},
{ "reassign_lids", 0, NULL, 'r'},
{ "priority", 1, NULL, 'p'},
+ { "smkey", 1, NULL, 'k'},
{ "updn", 0, NULL, 'u'},
{ "add_guid_file", 1, NULL, 'a'},
{ "cache-options", 0, NULL, 'c'},
@@ -681,6 +686,12 @@ main(
printf(" Priority = %d\n", temp);
break;
+ case 'k':
+ sm_key = cl_hton64( strtoull( optarg, NULL, 16 ));
+ printf(" SM Key <0x%"PRIx64">\n", cl_hton64( sm_key ));
+ opt.sm_key = sm_key;
+ break;
+
case 'u':
opt.updn_activate = TRUE;
printf(" Activate UPDN algorithm\n");
More information about the general
mailing list