<!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:x = 
"urn:schemas-microsoft-com:office:excel" xmlns:p = 
"urn:schemas-microsoft-com:office:powerpoint" xmlns:a = 
"urn:schemas-microsoft-com:office:access" xmlns:dt = 
"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s = 
"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs = 
"urn:schemas-microsoft-com:rowset" xmlns:z = "#RowsetSchema" xmlns:b = 
"urn:schemas-microsoft-com:office:publisher" xmlns:ss = 
"urn:schemas-microsoft-com:office:spreadsheet" xmlns:c = 
"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa = 
"urn:schemas-microsoft-com:office:activation" xmlns:html = 
"http://www.w3.org/TR/REC-html40" xmlns:q = 
"http://schemas.xmlsoap.org/soap/envelope/" XMLNS:D = "DAV:" xmlns:x2 = 
"http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois = 
"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir = 
"http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds = 
"http://www.w3.org/2000/09/xmldsig#" xmlns:dsp = 
"http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc = 
"http://schemas.microsoft.com/data/udc" xmlns:xsd = 
"http://www.w3.org/2001/XMLSchema" xmlns:sub = 
"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec = 
"http://www.w3.org/2001/04/xmlenc#" xmlns:sp = 
"http://schemas.microsoft.com/sharepoint/" xmlns:sps = 
"http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi = 
"http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf = 
"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf = 
"http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver = 
"http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m = 
"http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels = 
"http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t = 
"http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m = 
"http://schemas.microsoft.com/exchange/services/2006/messages" XMLNS:Z = 
"urn:schemas-microsoft-com:"><HEAD><TITLE>RE: [ofw] WDK build environment migration thoughts</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
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
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman","serif"; mso-style-priority: 99; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
        COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</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]-->
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=980472316-01052008><FONT face=Arial color=#0000ff 
size=2>Applied in 1106</FONT></SPAN></DIV>
<DIV><SPAN class=980472316-01052008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=980472316-01052008><FONT face=Arial color=#0000ff size=2>Thanks 
Fab and XaleX</FONT></SPAN></DIV>
<DIV><SPAN class=980472316-01052008><FONT face=Arial color=#0000ff 
size=2>Tzachi</FONT></SPAN></DIV>
<DIV><SPAN class=980472316-01052008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> ofw-bounces@lists.openfabrics.org 
  [mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Alex 
  Naslednikov<BR><B>Sent:</B> Thursday, May 01, 2008 2:28 PM<BR><B>To:</B> Fab 
  Tillier; Smith, Stan; Ishai Rabinovitz<BR><B>Cc:</B> 
  ofw@lists.openfabrics.org<BR><B>Subject:</B> RE: [ofw] WDK build environment 
  migration thoughts<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><SPAN class=147112011-01052008><FONT face=Arial color=#0000ff size=2>You 
  are right.</FONT></SPAN></DIV>
  <DIV><SPAN class=147112011-01052008><FONT face=Arial color=#0000ff size=2>Our 
  guideline was to initialize EVERY ioctl struct before ioctl call in order 
  to avoid possible bugs</FONT></SPAN></DIV>
  <DIV><SPAN class=147112011-01052008><FONT face=Arial color=#0000ff 
  size=2>So I suppose there are other cases were this memclr is 
  unnecessary, but we can be sure we covered all such 
places.</FONT></SPAN></DIV>
  <DIV><SPAN class=147112011-01052008><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=147112011-01052008><FONT face=Arial color=#0000ff 
  size=2>XaleX.</FONT></SPAN></DIV><BR>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Fab Tillier 
  [mailto:ftillier@windows.microsoft.com] <BR><B>Sent:</B> Thursday, May 01, 
  2008 1:00 AM<BR><B>To:</B> Alex Naslednikov; Smith, Stan; Ishai 
  Rabinovitz<BR><B>Cc:</B> ofw@lists.openfabrics.org<BR><B>Subject:</B> RE: 
  [ofw] WDK build environment migration thoughts<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D? 
  Calibri?,?sans-serif?;>cl_memclr added in ulp\wsd\user\ibsp_ip.c, line 100, is 
  unnecessary – all fields of the input structure are initialized, no need to 
  clear them.<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D? 
  Calibri?,?sans-serif?;><o:p> </o:p></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D? 
  Calibri?,?sans-serif?;>-Fab<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D? 
  Calibri?,?sans-serif?;><o:p> </o:p></SPAN></P>
  <DIV>
  <DIV 
  style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
  <P class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>From:</SPAN></B><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " Tahoma?,?sans-serif??> 
  ofw-bounces@lists.openfabrics.org [mailto:ofw-bounces@lists.openfabrics.org] 
  <B>On Behalf Of </B>Alex Naslednikov<BR><B>Sent:</B> Wednesday, April 30, 2008 
  1:20 AM<BR><B>To:</B> Alex Naslednikov; Smith, Stan; Ishai 
  Rabinovitz<BR><B>Cc:</B> ofw@lists.openfabrics.org<BR><B>Subject:</B> RE: 
  [ofw] WDK build environment migration 
  thoughts<o:p></o:p></SPAN></P></DIV></DIV>
  <P class=MsoNormal><o:p> </o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>Hello,</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>I committed our WDK and __ptr64 patch into 
  WinOF trunk, and WinOF and WinIB trunks were synchronized 
  again.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>You can find below some further explanations 
  :</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>1. IBAL compiles now with WDK6001.18001. 
  According to Microsoft, it should be the last and official 
  release.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>We preserved the backward compatibility with 
  DDK, but some intermediate versions of WDK may be 
  incompatible</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>2. Please, be aware that one has to change 
  WinOF modules that aren't in WinIB stack (like additional ulps : udapl, vnic 
  etc.) according to new methodology</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>Also, I'd like to point your attention, that 
  these modules will work as is on homogeneous systems (x86, x64), but not on 
  mixed systems (x86 application on x64 kernel)</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>In addition, Microsoft fixed an internal 
  compiler bug when compiling modules with long (__ptr64) pointers on functions 
  (occurred only in x86 CHECKED environment).</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>So, you should not have problem with 
  compilation after adjusting makefiles</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>3. This revision 
  contains:</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?> 3.1. All bugfixes from WinOF trunk, from 
  rev. 939 to 1067</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?> 3.2. Mellanox __ptr64 solution and WDK 
  poring, starting from rev. 2164</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?> 3.3. All bugfixes and patches from 
  connectx branches (both Mellanox and WinOF)</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>It was a large amount of code to be merged 
  from 4 different svn trees (trunk and connectx branch in WinOF, and trunk and 
  connectx branch in WinIB).</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>We will appreciate your code review, just to 
  be sure that we didn't forget to insert any minor patch or bug 
  fix.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>4. I carefully tested new trunk inside 
  Mellanox, on different platforms, both with DDK and WDK compilers. Please, 
  update us about every minor problem during your testing.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif?;color:blue?>Thanks,</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Naslednikov Alexander (a.k.a 
  XaleX)</SPAN></B><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Windows Team</SPAN></B><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Mellanox Technologies </SPAN></B><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>_____________________________________________ 
  </SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>From:  </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>Alex 
  Naslednikov  </SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>Sent:  </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>Monday, April 
  21, 2008 7:15 PM</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>To:    </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>Alex 
  Naslednikov; 'Smith, Stan'; Ishai Rabinovitz</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>Cc:    </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>'ofw@lists.openfabrics.org'</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>Subject:       </SPAN></B> 
  <SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>RE: [ofw] 
  WDK build environment migration thoughts</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Hi 
  all,<BR>I would like to repost my previous message, because I haven't received 
  yet your comments.<BR>Our regression seems to be stable, so we are going to 
  commit the change into WinOF trunk the nearest time.<BR>For you convenience, I 
  also provide some typical changes as a patch (attached to this mail). Please, 
  read the explanation below before - it will help you a lot.<BR>Be aware that 
  all the modules not contained in Mellanox WinIB stack (like udapl, vnic) 
  should be also changed according to this methodology.<BR><BR>It is very large 
  change, so I'll appreciate your time and effort while reviewing the 
  methodology and the patch itself.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Thanks,<BR></SPAN><BR><B>Naslednikov Alexander (a.k.a 
  XaleX)<BR>Windows Team<BR>Mellanox Technologies</B><o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>_____________________________________________ 
  </SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>From:  </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>Alex 
  Naslednikov  </SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>Sent:  </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>Thursday, April 
  10, 2008 4:09 PM</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>To:    </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>'Smith, Stan'; 
  Ishai Rabinovitz</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>Cc:    </SPAN></B> <SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>ofw@lists.openfabrics.org</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " 
  Tahoma?,?sans-serif??>Subject:       </SPAN></B> 
  <SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: " Tahoma?,?sans-serif??>RE: [ofw] 
  WDK build environment migration thoughts</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Hi 
  all,</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>It's a 
  good idea to clarify some points before announcing Mellanox patch for WDK 
  porting and __ptr64 problems.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Hope, 
  these explanations will be informative enough and not so 
  long.</SPAN><o:p></o:p></P>
  <P><B><U><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>1. 
  __ptr64 problem</SPAN></U></B><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Briefly 
  speaking, this problem arises when copying 32bit len pointer into 64bit len 
  pointer. In this case,</SPAN><U> </U><U><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>signed pointer 
  extension</SPAN></U> <SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>will take place.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>How it's 
  applicable to WinOF ?  A lot of pointer were declared to be __ptr64 
  (i.e., to be always "long", even in 32bit kernel systems), that's to preserve 
  on unique size of structs used in IOCTL calls.  The main problem it will 
  cause is between 32bit user applications and 64bit kernel 
  application.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>When user 
  code do operation like </SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>s_ptr = 
  &my_struct;</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>my_type* 
  __ptr64 ptr = s_ptr;</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Than 
  kernel will receive ptr with invalid upper bits data (4 bytes 
  FF).</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>To avoid 
  signed pointer extension, PtrToPtr64() function should be 
  used.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Also, I 
  found some other places where dangerous signed pointer extension took place, 
  even on 32bit kernel.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Yet 
  another problem that arises with __ptr64 attribute is internal compiler error 
  (C1001)  in WDK when using __ptr64 pointer to function 
  (callback)</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>This 
  problem was described in ofw discussion, you can see also 
  :</SPAN><o:p></o:p></P>
  <P><A 
  href="http://blogs.msdn.com/texblog/archive/2005/10/31/487436.aspx"><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>http://blogs.msdn.com/texblog/archive/2005/10/31/487436.aspx</SPAN></A><o:p></o:p></P>
  <P><A 
  href="http://lists.openfabrics.org/pipermail/ofw/2007-July/001613.html"><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>http://lists.openfabrics.org/pipermail/ofw/2007-July/001613.html</SPAN></A><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??> (posted by Jan 
  from OFW)</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Our 
  solution:</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>1. 
  Initially, we decided to remove all __ptr64 attributes except those ones 
  inside IOCTL structures. After, put PtrToPtr64() conversion on every 
  assignment to long pointer.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>(like 
  my_type* __ptr64 ptr = PtrToPtr64(s_ptr);  )</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>During 
  this solution, we changed a huge amount of code, so patch became unreadable. 
  And it was difficult to validate that all long pointer (with __ptr64 
  attribute) were used in a proper manner</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>2. So, we 
  decided about another solution:</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??> All 
  __ptr64 occurrences were replaced by either:</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??> i) 
  TO_LONG_PTR(type, field) macro, when occurred inside 
  structure</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>ii) 
  VOID_PTR64 macro otherwise (defined as void macro)</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>#define 
  CONCAT(str1, str2) str1##str2</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>#define 
  TO_LONG_PTR(type,member_name) \</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>    union { type member_name;  
  uint64_t CONCAT(member_name,_padding) ; }</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Thus, we 
  can both preserve on a uniform shapes of structs in user and kernel and to 
  avoid unsafe pointer arithmetic !</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>The patch 
  now is much more readable, but it sill consist of thousands 
  lines.</SPAN><o:p></o:p></P>
  <P><B><U><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>2. 
  Migration to WDK</SPAN></U></B><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Main 
  issue here was to preserve on backward compatibility with 
  DDK</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>We were 
  able to compile our stack with WDK, while the main problems we found were 
  :</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>1. WDK 
  uses newer version of SDK (SDK Vista). So, when using 2 or more versions of 
  SDK on the same build machine, one has to update </SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>PLATFORM_SDK_PATH variable to point on the proper version 
  of SDK (for example, 
  PLATFORM_SDK_PATH=%sysdrive%:\PROGRA~1\MI2578~1\windows\v6.1)</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>2.verify.src script in WDK (new add-on) checks if your 
  SOURCES file is in appropriate format.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>For 
  example, you can't set implicitly path to system .dll in TARGETLIBS, but to 
  use USE_<MODULE_NAME> =1 macro</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Example:</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Old code 
  : </SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??> ....</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>TARGETLIBS= \</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>   
  $(CRT_LIB_PATH)\msvcprt.lib\</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>   
  $(SDK_LIB_PATH)\Ws2_32.lib\</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>   
  $(TARGETPATH)\*\mtcr.lib</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??> </SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>New code 
  :</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>USE_MSVCRT=1</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>USE_NTDLL=1</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??> </SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>TARGETLIBS= \</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>   
  $(SDK_LIB_PATH)\Ws2_32.lib\</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>   
  $(TARGETPATH)\*\mtcr.lib</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>3. Some 
  other problems, like mulitple includes error in .rc files, or problem with 
  substituing more than one symbol constant into string in Makefiles (some 
  version of WDK)</SPAN><o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Currently, we continue testing and will advertise these 
  patches right after the testing will finish</SPAN><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Naslednikov Alexander (a.k.a 
  XaleX)</SPAN></B><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Windows Team</SPAN></B><o:p></o:p></P>
  <P><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Mellanox Technologies</SPAN></B> <o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>-----Original Message-----</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>From: 
  ofw-bounces@lists.openfabrics.org [</SPAN><A 
  href="mailto:ofw-bounces@lists.openfabrics.org"><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>mailto:ofw-bounces@lists.openfabrics.org</SPAN></A><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>] On Behalf Of 
  Smith, Stan</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Sent: 
  Tuesday, April 08, 2008 4:10 PM</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>To: Ishai 
  Rabinovitz</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Cc: 
  ofw@lists.openfabrics.org</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Subject: 
  [ofw] WDK build environment migration thoughts</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Hello,</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>  I 
  strongly believe it would help the WinOF community in transitioning to the WDK 
  build environment if the connectX branch</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>(svn:gen1\branches\ConnectX) was used as a WDK build 
  environment staging grounds prior to merging the WDK modifications into the 
  mainline trunk.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>This has 
  been talked about before although it still (as of last Friday) does not build 
  using the latest WDK version.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??> </SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>One week 
  prior to merging the WDK fixes into the mainline trunk, if you were to push 
  all the WDK fixes into the ConnectX branch and then advertise on the ofw 
  mailing list the availability of a WDK build branch along 
  with</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>  1) 
  how to build in the WDK environment,</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>     which version of the WDK is 
  required + a URL link where to get the WDK.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>  2) 
  An explanation of why and how the __ptr64 attributes were removed along with 
  how</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>     others should correct their 
  codes containing __ptr64 attributes.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>  3) 
  updates to the WinOF wiki page describing how to build in the WDK 
  env.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Let this 
  branch exist for one week, receiving feedback from the list and then merge 
  into the mainline trunk.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Using 
  this approach is certainly community friendly and may prevent developer 
  surprises.</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>ConnectX 
  branch availability dates plus when the actual WDK fixes would be merged into 
  the mainline trunk would be published beforehand.</SPAN><o:p></o:p></P>
  <P class=MsoNormal><o:p> </o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>Thanks 
  for your consideration,</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>Stan.</SPAN><o:p></o:p></P>
  <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><o:p> </o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>_______________________________________________</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " Arial?,?sans-serif??>ofw 
  mailing list</SPAN><o:p></o:p></P>
  <P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>ofw@lists.openfabrics.org</SPAN><o:p></o:p></P>
  <P><A href="http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw"><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: " 
  Arial?,?sans-serif??>http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw</SPAN></A><o:p></o:p></P></DIV></BLOCKQUOTE></BODY></HTML>