]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[WinOF] IBSDK
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Dec 2007 20:40:31 +0000 (20:40 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 10 Dec 2007 20:40:31 +0000 (20:40 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@916 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/WinOF/WIX/SDK_Samples/VS/Makefile.x64 [new file with mode: 0644]
branches/WinOF/WIX/SDK_Samples/VS/Makefile.x86 [new file with mode: 0644]
branches/WinOF/WIX/SDK_Samples/VS/README.txt

diff --git a/branches/WinOF/WIX/SDK_Samples/VS/Makefile.x64 b/branches/WinOF/WIX/SDK_Samples/VS/Makefile.x64
new file mode 100644 (file)
index 0000000..0bc70cc
--- /dev/null
@@ -0,0 +1,97 @@
+#\r
+#*********************************************************************\r
+# \r
+# NMAKE Options (passed as macro) \r
+#\r
+# Select a Visual Studio 2005 command window from the start menu\r
+# vcvarsall X64         - sets X64 processor compilation env, X86 | IA64\r
+#\r
+#*********************************************************************/\r
+\r
+\r
+#*********************************************************************\r
+# \r
+# Dot Directives\r
+#\r
+#*********************************************************************/\r
+\r
+.SUFFIXES :            # clear the .SUFFIXES list\r
+.SUFFIXES : .c                 # initialize .SUFFIXES list\r
+\r
+\r
+#*********************************************************************\r
+# \r
+# Macros\r
+#\r
+#*********************************************************************/\r
+\r
+SRC=cmtest\r
+\r
+LIB_PATH=C:\IBSDK\Lib\r
+INC_PATH=C:\IBSDK\Inc\r
+\r
+IB_LIBS=ibal.lib complib.lib\r
+\r
+DEFS= /D_WIN64 /D_X64_ /D_AMD64_\r
+\r
+ARCH=x64\r
+\r
+OBJS = $(SRC).obj\r
+EXEC = $(SRC).exe\r
+\r
+#\r
+# Compiler \r
+#\r
+\r
+CC = cl\r
+\r
+INC_FLAGS = /I $(INC_PATH)\r
+\r
+UNUSED_CL=/Zp1 /Od\r
+UNUSED_LINKER= /DEBUG /incremental:no\r
+\r
+CC_FLAGS= /nologo /Gy /W3 /Gm- \\r
+       /GR- /GF  /O2 /Oi /Oy- /D_CRT_SECURE_NO_WARNINGS \\r
+       $(DEFS) $(INC_FLAGS)\r
+\r
+#\r
+# Linker\r
+#\r
+\r
+LINK = link\r
+\r
+LIBS =         ws2_32.lib advapi32.lib User32.lib bufferoverflowU.lib\r
+\r
+LINK_FLAGS = /nologo /subsystem:console /machine:$(ARCH) $(LIBS) \\r
+               /libpath:$(LIB_PATH) $(IB_LIBS)\r
+\r
+#\r
+# System Utilities\r
+#\r
+\r
+RM = del /Q\r
+\r
+\r
+#*********************************************************************\r
+# Inference Rules\r
+#\r
+#*********************************************************************/\r
+\r
+.c.obj:\r
+       $(CC) $(CC_FLAGS) /Fo$@ /c $< \r
+\r
+\r
+#*********************************************************************\r
+#\r
+# Description Blocks\r
+#\r
+#*********************************************************************/\r
+\r
+all : $(EXEC)\r
+\r
+\r
+$(EXEC) : $(OBJS) $0\r
+       $(LINK) $(LINK_FLAGS) /out:$(EXEC) $(OBJS)\r
+\r
+clean: \r
+       -$(RM) *.exe *.pdb *.obj\r
diff --git a/branches/WinOF/WIX/SDK_Samples/VS/Makefile.x86 b/branches/WinOF/WIX/SDK_Samples/VS/Makefile.x86
new file mode 100644 (file)
index 0000000..6407076
--- /dev/null
@@ -0,0 +1,97 @@
+#\r
+#*********************************************************************\r
+# \r
+# NMAKE Options (passed as macro) \r
+#\r
+# Select a Visual Studio command window from the start menu\r
+# vcvarsall X86         - sets X86 processor compilation env, X64 | IA64\r
+#\r
+#*********************************************************************/\r
+\r
+\r
+#*********************************************************************\r
+# \r
+# Dot Directives\r
+#\r
+#*********************************************************************/\r
+\r
+.SUFFIXES :            # clear the .SUFFIXES list\r
+.SUFFIXES : .c                 # initialize .SUFFIXES list\r
+\r
+\r
+#*********************************************************************\r
+# \r
+# Macros\r
+#\r
+#*********************************************************************/\r
+\r
+SRC=cmtest\r
+\r
+LIB_PATH=C:\IBSDK\Lib\r
+INC_PATH=C:\IBSDK\Inc\r
+\r
+IB_LIBS=ibal.lib complib.lib\r
+\r
+DEFS= /D_WIN32 \r
+\r
+ARCH=x86\r
+\r
+OBJS = $(SRC).obj\r
+EXEC = $(SRC).exe\r
+\r
+#\r
+# Compiler \r
+#\r
+\r
+CC = cl\r
+\r
+INC_FLAGS = /I $(INC_PATH)\r
+\r
+UNUSED_CL=/Zp1 /Od\r
+UNUSED_LINKER= /DEBUG /incremental:no\r
+\r
+CC_FLAGS= /nologo /Gy /W3 /Gm- \\r
+       /GR- /GF  /O2 /Oi /Oy- /D_CRT_SECURE_NO_WARNINGS \\r
+       $(DEFS) $(INC_FLAGS)\r
+\r
+#\r
+# Linker\r
+#\r
+\r
+LINK = link\r
+\r
+LIBS =         ws2_32.lib advapi32.lib User32.lib bufferoverflowU.lib\r
+\r
+LINK_FLAGS = /nologo /subsystem:console /machine:$(ARCH) $(LIBS) \\r
+               /libpath:$(LIB_PATH) $(IB_LIBS)\r
+\r
+#\r
+# System Utilities\r
+#\r
+\r
+RM = del /Q\r
+\r
+\r
+#*********************************************************************\r
+# Inference Rules\r
+#\r
+#*********************************************************************/\r
+\r
+.c.obj:\r
+       $(CC) $(CC_FLAGS) /Fo$@ /c $< \r
+\r
+\r
+#*********************************************************************\r
+#\r
+# Description Blocks\r
+#\r
+#*********************************************************************/\r
+\r
+all : $(EXEC)\r
+\r
+\r
+$(EXEC) : $(OBJS) $0\r
+       $(LINK) $(LINK_FLAGS) /out:$(EXEC) $(OBJS)\r
+\r
+clean: \r
+       -$(RM) *.exe *.pdb *.obj\r
index 8eccc330fede3c1c02ffc573429a9581cc9ff6ce..99d41736186871195acbab054269e47f2f7f62aa 100644 (file)
@@ -4,6 +4,20 @@ Visual Studio 8/5.0 (C++) Build Environment [12-06-07]
 \r
 Install Microsoft Visual Studio 8/5.0 (C++ env)\r
 \r
+\r
+**** WARNING - win32 application building ****\r
+\r
+The Visual Studio default calling convention is '__cdecl' (/Gd).\r
+The 32-bit versions of ibal32.lib & complib32.lib are built using '__stdcall'\r
+as the default calling convention (AL_API & CL_API).\r
+Make _sure_ 'all' user-defined ibal and complib callback routines match the\r
+callback function declaration [AL_API or CL_API calling conventions].\r
+The VS compiler will note a C-style cast is required if the calling conventions\r
+do not match.\r
+The other option is to force __stdcall (/Gz) as the 'default' calling\r
+convention for your 'win32' InfiniBand application.\r
+\r
+\r
 Building CM test example\r
 ------------------------\r
 \r
@@ -22,11 +36,7 @@ vcvarsall X64         - sets X64 processor compilation env, X86 | IA64
 nmake -f Makefile.x64\r
 \r
 If building a win32 application on a 64-bit platform then link with\r
-lbal32.lib & complib32.libs.\r
-\r
-Make _sure_ you specify __stdcall (/Gz) as the 'default' calling convention for\r
-'win32' InfiniBand applications!!!\r
-\r
+lbal32[d].lib & complib32[d].lib.\r
 \r
 \r
 \r
@@ -42,17 +52,20 @@ Salient Solution points:
   compile as a C program\r
   set additional Include path as C:\IBSDK\Inc\r
   set additional Resource Include path as C:\IBSDK\Inc\r
-  Set additional Library path as C:\IBSDK\Lib\r
-  Link with additional libraries ibal.lib & complib.lib\r
-  If building a win32 application on a 64-bit platform then link with lbal32.lib & complib32.lib\r
-  Make _sure_ (__stdcall /Gz) is set for win32 InfiniBand application builds!\r
+  Set additional Library path as C:\IBSDK\Lib .\r
+  Link with additional libraries ibal.lib & complib.lib .\r
+  If building a win32 application on a 64-bit platform then link with\r
+  lbal32[d].lib & complib32[d].lib\r
   \r
 \r
 Executing cmtest.exe\r
 --------------------\r
 \r
-cmtest.exe passes messages between the server and client over a reliable IB queue-pair connection (RC).\r
-Connection end-points (hosts) are identified by IB port LID (hex integer, as displayed by the vstat command).\r
+cmtest.exe passes messages between the server and client over a reliable\r
+IB queue-pair connection (RC).\r
+Connection end-points (hosts) are identified by IB port LID (hex integer,\r
+as displayed by the vstat command).\r
+\r
 Note: <spaces> are not allowed between command line switch and it's argument.\r
 \r
 Server side:    cmtest -s -l0xlll -r0xrrr -m1024 -n100\r
@@ -61,8 +74,38 @@ Client side: cmtest.exe -l0xlll -r0xrrr -m1024 -n100
 \r
 where:\r
   lll == local port lid as displayed by vstat command.\r
-  rrr == Remote port lid as displayed by vstat; lll == rrr for local loopback operation.\r
+  rrr == Remote port lid as displayed by vstat; lll == rrr for local loopback\r
+         operation.\r
   -m  == bytes per message\r
   -n  == number of messages to send.\r
   -c  == number of connections (default is -c1)\r
   cmtest -h reveals all...\r
+\r
+Example cmtest invocation: local loopback test\r
+\r
+cmdWin> vstat\r
+\r
+        hca_idx=0\r
+        uplink={BUS=UNRECOGNIZED (33)}\r
+        vendor_id=0x02c9\r
+        vendor_part_id=0x6278\r
+        hw_ver=0xa0\r
+        fw_ver=4.08.0200\r
+        PSID=_00A0000001\r
+        node_guid=0002:c902:0020:1d74\r
+        num_phys_ports=2\r
+                port=1\r
+                port_state=PORT_ACTIVE (4)     <==== Must be active!\r
+                link_speed=2.5Gbps (1)\r
+                link_width=4x (2)\r
+                rate=10\r
+                sm_lid=0x0001\r
+                port_lid=0x0020                        <=== -l0x20\r
+                port_lmc=0x0\r
+                max_mtu=2048 (4)\r
+\r
+\r
+Separate processes for server & client (different cmd windows).\r
+\r
+server:    cmtest -s -l0x20 -r0x20 -m8192 -n400\r
+client:    cmtest    -l0x20 -r0x20 -m8192 -n400\r