<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Yes, I know about the suggestion on NTDEV,
I was the person who started the thread.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The workaround is fine for my trivial test
example, but unfortunately, it would take changing the IB stack sources in many
places to use this workaround. If we could find a workaround that only needed
to change the structure declaration (like explicitly adding a pad field on
32-bit builds) it would be much easier. Changing EVERY call point is a lot of
changes. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>- Jan<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Tzachi Dar
[mailto:tzachid@mellanox.co.il] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Saturday, May 26, 2007 1:32
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Jan Bottorff; Mirko Benz;
ofw@lists.openfabrics.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [ofw] <st1:place
w:st="on">Vista</st1:place> supported?</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hi,<br>
<br>
As far as for the compiler bugs it seems that it has a simple workaround, see
bellow for ideas that I have.<br>
<br>
The main issue that I currently see is that we are getting close to a new
release, and replacing the compiler so close to a release is not that good
idea. As you said, for now we can continue based on the binary computability of
vista.<br>
<br>
Thanks<br>
Tzachi<br>
<br>
2 ways in order to work around the compiler bugs:<br>
As remembered the problem is because we have to make sure that we reserve 64
bit for a pointer even on 32 bit systems. The obvious way to do this is to use
__ptr64 that doesn't work on new builds.<br>
1) As was suggested in the OSR forum, one can simply change the struct to use a
union of the pointer and some 64 bits value.<br>
2) one can use the same struct as before but do some other thing:<br>
void test(long val)<br>
{<br>
if (val == 0)<br>
return;<br>
<br>
// the following line crashes the
6000/6001 WDK 32-bit compiler with<br>
// error C1001: An internal error
has occurred in the compiler.<br>
//var1->funcPtr(0);<br>
<font color=red><span style='color:red'>
var2 = var1->funcPtr;<br>
var2(0); // Very ugly but Compiles
well<br>
</span></font>}<br>
</span></font><font size=2><span style='font-size:10.0pt'><br>
<br>
> -----Original Message-----<br>
> From: ofw-bounces@lists.openfabrics.org<br>
> [<a href="mailto:ofw-bounces@lists.openfabrics.org">mailto:ofw-bounces@lists.openfabrics.org</a>]
On Behalf Of Jan Bottorff<br>
> Sent: Friday, May 25, 2007 10:21 PM<br>
> To: Mirko Benz; ofw@lists.openfabrics.org<br>
> Subject: RE: [ofw] <st1:place w:st="on">Vista</st1:place> supported?<br>
><br>
> I know the WinIB source tree will not compile with the <st1:place w:st="on">Vista</st1:place><br>
> (or later) WDK (at least will not compile for checked 32-bit<br>
> platforms). The problem is the compiler aborts when<br>
> processing __ptr64 pointers inside a structure. The WinIB<br>
> stack uses this in LOTS of places.<br>
><br>
> I'm not super optimistic about Microsoft fixing the compiler<br>
> anytime soon, because I also see compiler bugs in the code<br>
> generation for InterlockedAnd (and other Interlocked<br>
> functions) that have been know for more than a year, are not<br>
> fixed. The most recent WDK betas seems to have a fix for<br>
> InterlockedAnd in the debug build, but the free build still<br>
> gets it wrong.<br>
><br>
> The following will reproduce the __ptr64 bug:<br>
><br>
> ---------------------------------------------------------------<br>
> #include <ntddk.h><br>
><br>
> struct {<br>
> void (* __ptr64 funcPtr)(long val); }
*var1;<br>
><br>
><br>
><br>
><br>
> void test(long val)<br>
> {<br>
> if (val == 0)<br>
>
return;<br>
><br>
> // the following line crashes the 6000/6001
WDK 32-bit<br>
> compiler with<br>
> // error C1001: An internal error has
occurred in the compiler.<br>
> var1->funcPtr(0);<br>
> }<br>
><br>
> NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING<br>
> RegistryPath)<br>
> {<br>
> var1->funcPtr = &test;<br>
> test(1);<br>
> return STATUS_SUCCESS;<br>
> }<br>
> --------------------------------------------------------------<br>
><br>
> The InterlockedAnd bug shows up in code like:<br>
><br>
> // atomic test and clear<br>
> If (InterlockedAnd(&flag, 0)) {<br>
> // this code never executes<br>
> // InterlockedAnd is documented to return
the old value<br>
> // but actually returns the modified value
}<br>
><br>
> Binaries compiled using the W2k3 SP1 DDK can run on <st1:place w:st="on">Vista</st1:place>,<br>
> but doing development on the latest tools is a serious<br>
> problem. I view it a Microsoft problem, since it was<br>
> something in the <st1:place w:st="on">Vista</st1:place> (and later) WDK
compiler that broke.<br>
><br>
> - Jan<br>
><br>
><br>
> -----Original Message-----<br>
> From: ofw-bounces@lists.openfabrics.org<br>
> [<a href="mailto:ofw-bounces@lists.openfabrics.org">mailto:ofw-bounces@lists.openfabrics.org</a>]
On Behalf Of Mirko Benz<br>
> Sent: Friday, May 25, 2007 1:38 AM<br>
> To: ofw@lists.openfabrics.org<br>
> Subject: [ofw] <st1:place w:st="on">Vista</st1:place> supported?<br>
><br>
> Hi,<br>
><br>
> What is the status of support for <st1:place w:st="on">Vista</st1:place>?
Should SRP work?<br>
><br>
> Regards,<br>
> Mirko<br>
> _______________________________________________<br>
> ofw mailing list<br>
> ofw@lists.openfabrics.org<br>
> <a href="http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw">http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw</a><br>
> _______________________________________________<br>
> ofw mailing list<br>
> ofw@lists.openfabrics.org<br>
> <a href="http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw">http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw</a><br>
> </span></font><o:p></o:p></p>
</div>
</body>
</html>