<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: Re:[PATCH] Osmtest - update command option + vapi fix</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Hi , Hal .</FONT>
<BR><FONT SIZE=2>PLS see below , search for [LS]</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Hal Rosenstock [<A HREF="mailto:halr@voltaire.com">mailto:halr@voltaire.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Wednesday, November 02, 2005 3:55 PM</FONT>
<BR><FONT SIZE=2>To: Liran Sorani</FONT>
<BR><FONT SIZE=2>Cc: openib-general@openib.org</FONT>
<BR><FONT SIZE=2>Subject: Re: Re:[PATCH] Osmtest - update command option + vapi fix</FONT>
</P>
<BR>
<P><FONT SIZE=2>Hi Liran,</FONT>
</P>
<P><FONT SIZE=2>On Tue, 2005-11-01 at 08:38, Liran Sorani wrote:</FONT>
<BR><FONT SIZE=2>> Hi Hal,</FONT>
<BR><FONT SIZE=2>> 1. Regarding the osmtest_SOURCES , it works both ways (i.e compile all files required) , </FONT>
<BR><FONT SIZE=2>> still the correct one is +=</FONT>
</P>
<P><FONT SIZE=2>I understand. You only had = not += in your patch for this. I changed it</FONT>
<BR><FONT SIZE=2>so that it works and doesn't override osmtest_SOURCES but adds to it</FONT>
<BR><FONT SIZE=2>when VAPI is being built.</FONT>
</P>
<P><FONT SIZE=2>> 2. Following is the patch for main.c :</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Index: main.c</FONT>
<BR><FONT SIZE=2>> ===================================================================</FONT>
<BR><FONT SIZE=2>> --- main.c (revision 3928)</FONT>
<BR><FONT SIZE=2>> +++ main.c (working copy)</FONT>
<BR><FONT SIZE=2>> @@ -128,9 +128,11 @@</FONT>
<BR><FONT SIZE=2>> "--guid <GUID in hex>\n"</FONT>
<BR><FONT SIZE=2>> " This option specifies the local port GUID value\n"</FONT>
<BR><FONT SIZE=2>> " with which osmtest should bind. osmtest may be\n"</FONT>
<BR><FONT SIZE=2>> - " bound to 1 port at a time.\n"</FONT>
<BR><FONT SIZE=2>> - " Without -g, osmtest displays a menu of possible\n"</FONT>
<BR><FONT SIZE=2>> - " port GUIDs and waits for user input.\n\n" );</FONT>
<BR><FONT SIZE=2>> + " bound to 1 port at a time.\n\n");</FONT>
<BR><FONT SIZE=2>> + printf( "-p \n"</FONT>
<BR><FONT SIZE=2>> + "--port\n"</FONT>
<BR><FONT SIZE=2>> + " This option display menu of possible local port GUID values\n"</FONT>
<BR><FONT SIZE=2>> + " with which osmtest could bind.\n\n");</FONT>
<BR><FONT SIZE=2>> printf( "-h\n"</FONT>
<BR><FONT SIZE=2>> "--help\n" " Display this usage info then exit.\n\n" );</FONT>
<BR><FONT SIZE=2>> printf( "-i <filename>\n"</FONT>
<BR><FONT SIZE=2>> @@ -160,9 +162,9 @@</FONT>
<BR><FONT SIZE=2>> " --- -----------------\n"</FONT>
<BR><FONT SIZE=2>> " -M1 - Short Multicast Flow (default) - single mode.\n"</FONT>
<BR><FONT SIZE=2>> " -M2 - Short Multicast Flow - multiple mode.\n"</FONT>
<BR><FONT SIZE=2>> - " -M3 - Long Multicast Flow - single mode.\n"</FONT>
<BR><FONT SIZE=2>> - " -M4 - Long Multicast Flow - mutiple mode.\n"</FONT>
<BR><FONT SIZE=2>> - " Single mode - Osmtest is tested alone, with no other\n"</FONT>
<BR><FONT SIZE=2>> + " -M3 - Long MultiCast Flow - single mode.\n"</FONT>
<BR><FONT SIZE=2>> + " -M4 - Long MultiCast Flow - mutiple mode.\n"</FONT>
</P>
<P><FONT SIZE=2>Should it be MultiCast or Multicast ?</FONT>
<BR><FONT SIZE=2>[LS] Lets set it to Multicast.</FONT>
<BR><FONT SIZE=2>-- Hal</FONT>
</P>
<P><FONT SIZE=2>> + " Single mode - Osmtest is tested alone , with no other \n"</FONT>
<BR><FONT SIZE=2>> " apps that interact vs. OpenSM MC.\n"</FONT>
<BR><FONT SIZE=2>> " Multiple mode - Could be run with other apps using MC vs.\n"</FONT>
<BR><FONT SIZE=2>> " OpenSM."</FONT>
<BR><FONT SIZE=2>> @@ -305,7 +307,7 @@</FONT>
<BR><FONT SIZE=2>> char flow_name[64];</FONT>
<BR><FONT SIZE=2>> boolean_t mem_track = FALSE;</FONT>
<BR><FONT SIZE=2>> uint32_t next_option;</FONT>
<BR><FONT SIZE=2>> - const char *const short_option = "f:l:m:M:d:g::s:t:i:cvVh";</FONT>
<BR><FONT SIZE=2>> + const char *const short_option = "f:l:m:M:d:g:s:t:i:pcvVh";</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> /*</FONT>
<BR><FONT SIZE=2>> * In the array below, the 2nd parameter specified the number</FONT>
<BR><FONT SIZE=2>> @@ -322,9 +324,10 @@</FONT>
<BR><FONT SIZE=2>> {"inventory", 1, NULL, 'i'},</FONT>
<BR><FONT SIZE=2>> {"max_lid", 1, NULL, 'm'},</FONT>
<BR><FONT SIZE=2>> {"guid", 2, NULL, 'g'},</FONT>
<BR><FONT SIZE=2>> + {"port", 0, NULL, 'p'},</FONT>
<BR><FONT SIZE=2>> {"help", 0, NULL, 'h'},</FONT>
<BR><FONT SIZE=2>> {"stress", 1, NULL, 's'},</FONT>
<BR><FONT SIZE=2>> - {"Multicast_Mode", 1, NULL, 'M'},</FONT>
<BR><FONT SIZE=2>> + {"MultiCast_Mode", 1, NULL, 'M'},</FONT>
<BR><FONT SIZE=2>> {"timeout", 1, NULL, 't'},</FONT>
<BR><FONT SIZE=2>> {"verbose", 0, NULL, 'v'},</FONT>
<BR><FONT SIZE=2>> {"log_file", 1, NULL, 'l'},</FONT>
<BR><FONT SIZE=2>> @@ -363,7 +366,6 @@</FONT>
<BR><FONT SIZE=2>> {</FONT>
<BR><FONT SIZE=2>> next_option = getopt_long_only( argc, argv, short_option,</FONT>
<BR><FONT SIZE=2>> long_option, NULL );</FONT>
<BR><FONT SIZE=2>> -</FONT>
<BR><FONT SIZE=2>> switch ( next_option )</FONT>
<BR><FONT SIZE=2>> {</FONT>
<BR><FONT SIZE=2>> case 'c':</FONT>
<BR><FONT SIZE=2>> @@ -446,28 +448,30 @@</FONT>
<BR><FONT SIZE=2>> break;</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> case 'g':</FONT>
<BR><FONT SIZE=2>> - /*</FONT>
<BR><FONT SIZE=2>> - Specifies port guid with which to bind.</FONT>
<BR><FONT SIZE=2>> - */</FONT>
<BR><FONT SIZE=2>> - if (optarg) {</FONT>
<BR><FONT SIZE=2>> - guid = cl_hton64( strtoull( optarg, NULL, 16 ));</FONT>
<BR><FONT SIZE=2>> - printf(" Guid <0x%"PRIx64">\n", cl_hton64( guid ));</FONT>
<BR><FONT SIZE=2>> - } else</FONT>
<BR><FONT SIZE=2>> - guid = INVALID_GUID;</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> -</FONT>
<BR><FONT SIZE=2>> + /*</FONT>
<BR><FONT SIZE=2>> + * Specifies port guid with which to bind.</FONT>
<BR><FONT SIZE=2>> + */</FONT>
<BR><FONT SIZE=2>> + guid = cl_hton64( strtoull( optarg, NULL, 16 ));</FONT>
<BR><FONT SIZE=2>> + printf(" Guid <0x%"PRIx64">\n", cl_hton64( guid ));</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> + case 'p':</FONT>
<BR><FONT SIZE=2>> + /*</FONT>
<BR><FONT SIZE=2>> + * Display current port guids</FONT>
<BR><FONT SIZE=2>> + */</FONT>
<BR><FONT SIZE=2>> + guid = INVALID_GUID;</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> case 't':</FONT>
<BR><FONT SIZE=2>> - /*</FONT>
<BR><FONT SIZE=2>> + /*</FONT>
<BR><FONT SIZE=2>> * Specifies transaction timeout.</FONT>
<BR><FONT SIZE=2>> - */</FONT>
<BR><FONT SIZE=2>> - opt.transaction_timeout = strtol( optarg, NULL, 0 );</FONT>
<BR><FONT SIZE=2>> - printf( "\tTransaction timeout = %d\n", opt.transaction_timeout );</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> + */</FONT>
<BR><FONT SIZE=2>> + opt.transaction_timeout = strtol( optarg, NULL, 0 );</FONT>
<BR><FONT SIZE=2>> + printf( "\tTransaction timeout = %d\n", opt.transaction_timeout );</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> case 'l':</FONT>
<BR><FONT SIZE=2>> - opt.log_file = optarg;</FONT>
<BR><FONT SIZE=2>> - printf("\tLog <A HREF="File:%s\n" TARGET="_blank">File:%s\n</A>", opt.log_file );</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> + opt.log_file = optarg;</FONT>
<BR><FONT SIZE=2>> + printf("\tLog <A HREF="File:%s\n" TARGET="_blank">File:%s\n</A>", opt.log_file );</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> case 'v':</FONT>
<BR><FONT SIZE=2>> /*</FONT>
<BR><FONT SIZE=2>> @@ -510,32 +514,32 @@</FONT>
<BR><FONT SIZE=2>> }</FONT>
<BR><FONT SIZE=2>> break;</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> - case 'M':</FONT>
<BR><FONT SIZE=2>> - /*</FONT>
<BR><FONT SIZE=2>> - * Perform stress test.</FONT>
<BR><FONT SIZE=2>> - */</FONT>
<BR><FONT SIZE=2>> - opt.mmode = strtol( optarg, NULL, 0 );</FONT>
<BR><FONT SIZE=2>> - printf( "\tMulticast test enabled: " );</FONT>
<BR><FONT SIZE=2>> - switch ( opt.mmode )</FONT>
<BR><FONT SIZE=2>> - {</FONT>
<BR><FONT SIZE=2>> - case 1:</FONT>
<BR><FONT SIZE=2>> - printf( "Short MC Flow - single mode (default)\n" );</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> - case 2:</FONT>
<BR><FONT SIZE=2>> - printf( "Short MC Flow - mutiple mode\n" );</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> - case 3:</FONT>
<BR><FONT SIZE=2>> - printf( "Long MC Flow - single mode\n" );</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> - case 4:</FONT>
<BR><FONT SIZE=2>> - printf( "Long MC Flow - mutiple mode\n" );</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> - default:</FONT>
<BR><FONT SIZE=2>> - printf( "Unknown value %u (ignored)\n", opt.stress );</FONT>
<BR><FONT SIZE=2>> - opt.mmode = 0;</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> - }</FONT>
<BR><FONT SIZE=2>> - break;</FONT>
<BR><FONT SIZE=2>> + case 'M':</FONT>
<BR><FONT SIZE=2>> + /*</FONT>
<BR><FONT SIZE=2>> + * Perform stress test.</FONT>
<BR><FONT SIZE=2>> + */</FONT>
<BR><FONT SIZE=2>> + opt.mmode = strtol( optarg, NULL, 0 );</FONT>
<BR><FONT SIZE=2>> + printf( "\tMultiCast test enabled: " );</FONT>
<BR><FONT SIZE=2>> + switch ( opt.mmode )</FONT>
<BR><FONT SIZE=2>> + {</FONT>
<BR><FONT SIZE=2>> + case 1:</FONT>
<BR><FONT SIZE=2>> + printf( "Short MC Flow - single mode (default)\n" );</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> + case 2:</FONT>
<BR><FONT SIZE=2>> + printf( "Short MC Flow - mutiple mode\n" );</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> + case 3:</FONT>
<BR><FONT SIZE=2>> + printf( "Long MC Flow - single mode\n" );</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> + case 4:</FONT>
<BR><FONT SIZE=2>> + printf( "Long MC Flow - mutiple mode\n" );</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> + default:</FONT>
<BR><FONT SIZE=2>> + printf( "Unknown value %u (ignored)\n", opt.stress );</FONT>
<BR><FONT SIZE=2>> + opt.mmode = 0;</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> + }</FONT>
<BR><FONT SIZE=2>> + break;</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> case 'd':</FONT>
<BR><FONT SIZE=2>> /*</FONT>
<BR><FONT SIZE=2>> </FONT>
</P>
</BODY>
</HTML>