[ofw] RE: x86 XP env - WSD & installsp fail to build, IPoIB fails to install.

Tzachi Dar tzachid at mellanox.co.il
Wed May 28 02:24:06 PDT 2008


After some more thinking of this problem it seems that we can replace
the missing apis in other that will work on windows XP as well.

On the other hand, replacing the interlocked functions will result in
somewhat lower performance.

The bottom line will always be: WSD doesn't work on XP.

One simple way to by pass these problems is to remove the usage of this
functions from the code (using ifdef) when building for windows xp. This
has one drawback that binaries that are built for xp will not be 100%
compatible with the ones that run on server 2003.

I have created a patch that implements that for installsp.exe.

If this solution is fine with everyone I'll check that in. If anyone has
another solution I'll be also happy to hear.

Thanks
Tzachi

Index: installsp.c
===================================================================
--- installsp.c	(revision 1169)
+++ installsp.c	(working copy)
@@ -370,8 +370,10 @@
 static LONG
 _IBSPPerfmonDeregisterKeys( void )
 {
-	LONG	reg_status;
+	LONG	reg_status = 0;
 
+#ifndef WINXP_BUILD
+
 	reg_status = RegDeleteKeyEx( HKEY_LOCAL_MACHINE,
 		IBSP_PM_REGISTRY_PATH IBSP_PM_SUBKEY_PERF,
 		(KEY_WOW64_32KEY | KEY_WOW64_64KEY), 0 );
@@ -402,7 +404,7 @@
 			"_IBSPPerfmonRegisterKeys Remove SubKey failed
with %d\n",
 			GetLastError() );
 	}
-
+#endif
 	return reg_status;
 }
 
@@ -691,6 +693,11 @@
 {
 	WSADATA wsd;
 
+#ifdef WINXP_BUILD
+	printf("WSD doesn't run on windows XP\n");
+	return 1;
+#endif
+
 	/* Load Winsock */
 	if (WSAStartup (MAKEWORD (2, 2), &wsd) != 0) {
 		printf ("InstallSP: Unable to load Winsock: %d\n",
GetLastError ());
Index: SOURCES
===================================================================
--- SOURCES	(revision 1169)
+++ SOURCES	(working copy)
@@ -21,3 +21,8 @@
 MSC_WARNING_LEVEL= /W3
 
 LINKER_FLAGS=$(LINKER_FLAGS)
+
+!if "$(DDK_TARGET_OS)"=="WinXP"
+USER_C_FLAGS=$(USER_C_FLAGS) -DWINXP_BUILD
+!endif
+


> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
> Sent: Wednesday, May 28, 2008 12:09 AM
> To: Smith, Stan
> Cc: ofw at lists.openfabrics.org
> Subject: [ofw] RE: x86 XP env - WSD & installsp fail to 
> build,IPoIB fails to install.
> 
> Hi
> 
> I still don't have an answer to your question but here are a 
> few notes:
> 
> 1) It is strange we haven't seen this before (on the DDK builds).
> 2) WSD doesn't work on XP (32/64) so there is no real issue 
> here. We would like to get things to compile in any case.
> 3) The function RegDeleteKeyEx doesn't exist on XP32 so we 
> will have to replace it /remove it.
> 4) The function  InterlockedIncrement64 also doesn't exist on 
> xp. (see 1 again). It also seems to compile on checked xp build.
> 
> Due to this reasons I'll look for a way to removing this from 
> our build.
> 
> By the way, this might mean that we will not be able to build 
> for xp and run on server 2003.
> 
> Thanks
> Tzachi
> 
> > -----Original Message-----
> > From: Smith, Stan [mailto:stan.smith at intel.com]
> > Sent: Tuesday, May 27, 2008 10:32 PM
> > To: Tzachi Dar
> > Cc: ofw at lists.openfabrics.org
> > Subject: x86 XP env - WSD & installsp fail to build, IPoIB fails to 
> > install.
> > 
> > Hello Tzachi,
> >   As the listed maintainer of WinSock Direct (WSD), I'm 
> seeking your 
> > advise as how to solve three WSD problems.
> > 
> >  set _DDK=C:\WinDDK\6001.18001
> >  %_DDK%\bin\setenv.bat %_DDK% fre x86 WXP
> >  
> > 
> > 1) When building using WDK, the x86 WXP builds for WSD fails in 2 
> > places
> > 
> > Compiling - user\ibsp_iblow.c
> > errors in directory 
> d:\openib-windows-svn\1207\gen1\trunk\ulp\wsd\user
> > 
> d:\openib-windows-svn\1207\gen1\trunk\ulp\wsd\user\ibsp_iblow.c(118) :
> > error C40
> > 13: 'InterlockedIncrement64' undefined; assuming extern 
> returning int
> > 
> d:\openib-windows-svn\1207\gen1\trunk\ulp\wsd\user\ibsp_iblow.c(119) :
> > error C40
> > 13: 'InterlockedExchangeAdd64' undefined; assuming extern returning 
> > int
> > 
> > 
> > Linking Executable -
> > d:\openib-windows-svn\1207\gen1\trunk\bin\user\objfre_wxp_x
> > 86\i386\installsp.exe
> > errors in directory
> > d:\openib-windows-svn\1207\gen1\trunk\tools\wsdinstall\user
> > d:\openib-windows-svn\1207\gen1\trunk\tools\wsdinstall\user\in
> > stallsp.ob
> > j : erro
> > r LNK2019: unresolved external symbol
> > __imp__RegDeleteKeyExA at 16 referenced in fu nction 
> > __IBSPPerfmonDeregisterKeys at 0 
> > d:\openib-windows-svn\1207\gen1\trunk\bin\user\objfre_wxp_x86\
> > i386\insta
> > llsp.exe
> >  : error LNK1120: 1 unresolved externals
> > 
> > 
> > 2) IPoIB install for x86 WXP fails due to the netipoib.inf 
> reference 
> > to ibwsd.dll which doesn't exist for x86 XP builds.
> > 
> > What would be your recommended solutions to these problems?
> > 
> > Thanks,
> > 
> > Stan.
> > 
> > 
> > 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 



More information about the ofw mailing list