<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928">
<STYLE>@font-face {
font-family: Cambria Math;
}
@font-face {
font-family: Calibri;
}
@page WordSection1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
LI.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
DIV.MsoNormal {
MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"; FONT-SIZE: 11pt
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle17 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: windowtext; mso-style-type: personal
}
SPAN.EmailStyle18 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal
}
SPAN.EmailStyle19 {
FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal-reply
}
.MsoChpDefault {
FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.WordSection1 {
page: WordSection1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US link=blue vLink=purple>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>Hello,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial> Although this is a nice enhancement, the patch needs to
be sent to the IB management maintainer for his approval (Sasha
Khapyorsky).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>The windows opensm code is based on OFED Linux management
source base releases in order to take advantage of all the people working on the
code (new features and bug fixes).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>When opensm is ported to Windows, a snapshot of the OFED
management git tree is ported into the Windows environment with as little change
as possible.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>Windows code changes are then returned to Sasha for his
approval/incorporation back into the OFED management source.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>When submitting patches to Sasha, please cc <A
href="mailto:linux-rdma@vger.kernel.org">linux-rdma@vger.kernel.org</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>If you use MS outlook as your mailer, be aware of how outlook
will clobber your patch text if not inserted as 'text'; copy-n-paste does not
work!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>Additionally, you need to set Outlook send characteristics to
a very long line length (133+) so Outlook will not add additional
<newline> chars.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>Finally, attaching a patch file is not acceptable within the
Linux community for submitting patches.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010></SPAN><SPAN
class=139571317-13092010><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial>stan.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=139571317-13092010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Irena
Gannon<BR><B>Sent:</B> Sunday, September 12, 2010 3:07 AM<BR><B>To:</B>
ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] [patch] osmtest - creating
and deleting the inventory file<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=WordSection1>
<P class=MsoNormal>The patch creates an inventory file, if it did not exist
before, when creating the DB and deletes this file if it was created during the
run.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Index:
D:/Windows/MLNX_VPI_2_1_2/ulp/opensm/user/osmtest/osmtest.c<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>---
D:/Windows/MLNX_VPI_2_1_2/ulp/opensm/user/osmtest/osmtest.c
(revision 6412)<o:p></o:p></P>
<P class=MsoNormal>+++
D:/Windows/MLNX_VPI_2_1_2/ulp/opensm/user/osmtest/osmtest.c
(revision 6455)<o:p></o:p></P>
<P class=MsoNormal>@@ -7089,11 +7089,28 @@<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
fh = fopen(p_osmt->opt.file_name, "r");<o:p></o:p></P>
<P
class=MsoNormal>
if (fh == NULL) {<o:p></o:p></P>
<P
class=MsoNormal>-
OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0130: "<o:p></o:p></P>
<P
class=MsoNormal>-
"Unable to open inventory file (%s)\n",<o:p></o:p></P>
<P
class=MsoNormal>-
p_osmt->opt.file_name);<o:p></o:p></P>
<P
class=MsoNormal>-
status = IB_ERROR;<o:p></o:p></P>
<P
class=MsoNormal>-
goto Exit;<o:p></o:p></P>
<P
class=MsoNormal>+
OSM_LOG(&p_osmt->log, OSM_LOG_DEBUG, "Inventory file (%s) doesn't exist.
"<o:p></o:p></P>
<P
class=MsoNormal>+
"The file will be created.\n", p_osmt->opt.file_name);<o:p></o:p></P>
<P
class=MsoNormal>+
<o:p></o:p></P>
<P
class=MsoNormal>+
/*<o:p></o:p></P>
<P
class=MsoNormal>+
* Creating an inventory file with all nodes, ports and paths<o:p></o:p></P>
<P
class=MsoNormal>+
*/<o:p></o:p></P>
<P
class=MsoNormal>+
status = osmtest_create_inventory_file(p_osmt);<o:p></o:p></P>
<P
class=MsoNormal>+
if (status != IB_SUCCESS) {<o:p></o:p></P>
<P
class=MsoNormal>+
OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0139: "<o:p></o:p></P>
<P
class=MsoNormal>+
"Inventory file create failed (%s)\n",<o:p></o:p></P>
<P
class=MsoNormal>+
ib_get_err_str(status));<o:p></o:p></P>
<P
class=MsoNormal>+
goto Exit;<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P class=MsoNormal>+<o:p></o:p></P>
<P
class=MsoNormal>+
fh = fopen(p_osmt->opt.file_name, "r");<o:p></o:p></P>
<P
class=MsoNormal>+
if (fh == NULL) {<o:p></o:p></P>
<P
class=MsoNormal>+
OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0130: "<o:p></o:p></P>
<P
class=MsoNormal>+
"Unable to open inventory file (%s)\n",<o:p></o:p></P>
<P
class=MsoNormal>+
p_osmt->opt.file_name);<o:p></o:p></P>
<P
class=MsoNormal>+
status = IB_ERROR;<o:p></o:p></P>
<P
class=MsoNormal>+
goto Exit;<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
/*<o:p></o:p></P>
<P class=MsoNormal>Index:
D:/Windows/MLNX_VPI_2_1_2/ulp/opensm/user/osmtest/main.c<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>---
D:/Windows/MLNX_VPI_2_1_2/ulp/opensm/user/osmtest/main.c (revision
6412)<o:p></o:p></P>
<P class=MsoNormal>+++
D:/Windows/MLNX_VPI_2_1_2/ulp/opensm/user/osmtest/main.c
(revision 6455)<o:p></o:p></P>
<P class=MsoNormal>@@ -291,7 +291,7 @@<o:p></o:p></P>
<P class=MsoNormal> #else<o:p></o:p></P>
<P
class=MsoNormal>
const char *const short_option = "f:l:m:M:d:g:s:t:i:pcvVh";<o:p></o:p></P>
<P class=MsoNormal> #endif<o:p></o:p></P>
<P class=MsoNormal>-<o:p></o:p></P>
<P
class=MsoNormal>+
FILE* inventoryExists = NULL;<o:p></o:p></P>
<P
class=MsoNormal>
/*<o:p></o:p></P>
<P
class=MsoNormal>
* In the array below, the 2nd parameter specified the
number<o:p></o:p></P>
<P
class=MsoNormal>
* of arguments as follows:<o:p></o:p></P>
<P class=MsoNormal>@@ -344,6 +344,9 @@<o:p></o:p></P>
<P
class=MsoNormal>
opt.flow = OSMT_FLOW_ALL; /* run all validation tests
*/<o:p></o:p></P>
<P
class=MsoNormal>
strcpy(flow_name, "All Validations");<o:p></o:p></P>
<P
class=MsoNormal>
strcpy(opt.file_name, "osmtest.dat");<o:p></o:p></P>
<P
class=MsoNormal>+
inventoryExists = (fopen(opt.file_name,"r"));<o:p></o:p></P>
<P
class=MsoNormal>+
if (inventoryExists)<o:p></o:p></P>
<P
class=MsoNormal>+
fclose(inventoryExists);<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
printf("\nCommand Line Arguments\n");<o:p></o:p></P>
<P
class=MsoNormal>
do {<o:p></o:p></P>
<P class=MsoNormal>@@ -597,7 +600,7 @@<o:p></o:p></P>
<P
class=MsoNormal>
if (cl_hton64(guid) == cl_hton64(INVALID_GUID)) {<o:p></o:p></P>
<P
class=MsoNormal>
print_all_guids(&osm_test);<o:p></o:p></P>
<P
class=MsoNormal>
complib_exit();<o:p></o:p></P>
<P
class=MsoNormal>-
return (status);<o:p></o:p></P>
<P
class=MsoNormal>+
goto Exit;<o:p></o:p></P>
<P
class=MsoNormal>
}<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
/*<o:p></o:p></P>
<P class=MsoNormal>@@ -615,7 +618,7 @@<o:p></o:p></P>
<P
class=MsoNormal>
*/<o:p></o:p></P>
<P
class=MsoNormal>
status = osmtest_bind(&osm_test, max_lid, guid);<o:p></o:p></P>
<P
class=MsoNormal>
if (status != IB_SUCCESS)<o:p></o:p></P>
<P
class=MsoNormal>-
exit(status);<o:p></o:p></P>
<P
class=MsoNormal>+
goto Exit;<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P
class=MsoNormal>
status = osmtest_run(&osm_test);<o:p></o:p></P>
<P
class=MsoNormal>
if (status != IB_SUCCESS) {<o:p></o:p></P>
<P class=MsoNormal>@@ -628,5 +631,18 @@<o:p></o:p></P>
<P
class=MsoNormal>
complib_exit();<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal> Exit:<o:p></o:p></P>
<P
class=MsoNormal>+
if (!inventoryExists) //The file did
not exist in the begging of the run<o:p></o:p></P>
<P
class=MsoNormal>+
{<o:p></o:p></P>
<P
class=MsoNormal>+
inventoryExists = (fopen(opt.file_name,"r")); <o:p></o:p></P>
<P
class=MsoNormal>+
if (inventoryExists) //If the file exists after the run - we created
it<o:p></o:p></P>
<P
class=MsoNormal>+
{<o:p></o:p></P>
<P
class=MsoNormal>+
fclose(inventoryExists);<o:p></o:p></P>
<P
class=MsoNormal>+
if (system("del osmtest.dat"))<o:p></o:p></P>
<P
class=MsoNormal>+
{<o:p></o:p></P>
<P
class=MsoNormal>+
printf("Warning: Inventory file cleanup failed\n");<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P
class=MsoNormal>+
}<o:p></o:p></P>
<P class=MsoNormal>+<o:p></o:p></P>
<P
class=MsoNormal>
return (status);<o:p></o:p></P>
<P class=MsoNormal> }<o:p></o:p></P></DIV></BODY></HTML>