From: Stan Smith Date: Wed, 14 Apr 2010 00:25:03 +0000 (+0000) Subject: [OFED\WIX] add winverbs+rdma_cm example to OFED SDK feature. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0d0435f448ebcd03cfa50b4694378cc24a6844b5;p=~shefty%2Frdma-win.git [OFED\WIX] add winverbs+rdma_cm example to OFED SDK feature. git-svn-id: svn://openib.tc.cornell.edu/gen1@2781 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/OFED/WIX/SDK_Samples/rdma_bw/Makefile.x64 b/trunk/OFED/WIX/SDK_Samples/rdma_bw/Makefile.x64 new file mode 100644 index 00000000..e6bcf08f --- /dev/null +++ b/trunk/OFED/WIX/SDK_Samples/rdma_bw/Makefile.x64 @@ -0,0 +1,101 @@ +# +#********************************************************************* +# +# NMAKE Options (passed as macro) +# +# Select a Visual Studio command window from the start menu +# vcvarsall X64 - sets X64 processor compilation env, X86 | IA64 +# +#*********************************************************************/ + + +#********************************************************************* +# +# Dot Directives +# +#*********************************************************************/ + +.SUFFIXES : # clear the .SUFFIXES list +.SUFFIXES : .c .rc # initialize .SUFFIXES list + + +#********************************************************************* +# +# Macros +# +#*********************************************************************/ + +PGM=ibv_rdma_bw + +LIB_PATH=%SystemDrive%\OFED_SDK\Lib +INC_PATH=%SystemDrive%\OFED_SDK\Inc + +IB_LIBS=libibverbs.lib librdmacm.lib + +DEFS= /D_WIN64 /D_X64_ /D_AMD64_ + +ARCH=x64 + +OBJS = rdma_bw.obj perftest.obj rdma_bw.res +EXEC = $(PGM).exe + +# +# Compiler +# + +CC = cl + +INC_FLAGS = /I $(INC_PATH) +RFLAGS=/r /i $(INC_PATH) + +UNUSED_CL=/Zp1 /Od +UNUSED_LINKER= /DEBUG /incremental:no + +CC_FLAGS= /nologo /Gy /W3 /Gm- \ + /GR- /GF /O2 /Oi /Oy- /D_CRT_SECURE_NO_WARNINGS \ + $(DEFS) $(INC_FLAGS) + +# +# Linker +# + +LINK = link + +LIBS = ws2_32.lib advapi32.lib User32.lib + +LINK_FLAGS = /nologo /subsystem:console /machine:$(ARCH) $(LIBS) \ + /libpath:$(LIB_PATH) $(IB_LIBS) + +# +# System Utilities +# + +RM = del /Q + + +#********************************************************************* +# Inference Rules +# +#*********************************************************************/ + +.c.obj: + $(CC) $(CC_FLAGS) /Fo$@ /c $< + +.rc.res: + $(RC) $(RFLAGS) $< + + +#********************************************************************* +# +# Description Blocks +# +#*********************************************************************/ + +all : $(EXEC) + + +$(EXEC) : $(OBJS) $0 + $(LINK) $(LINK_FLAGS) /out:$(EXEC) $(OBJS) + +clean: + -$(RM) *.exe *.pdb *.obj *.res diff --git a/trunk/OFED/WIX/SDK_Samples/rdma_bw/Makefile.x86 b/trunk/OFED/WIX/SDK_Samples/rdma_bw/Makefile.x86 new file mode 100644 index 00000000..f4ce61db --- /dev/null +++ b/trunk/OFED/WIX/SDK_Samples/rdma_bw/Makefile.x86 @@ -0,0 +1,101 @@ +# +#********************************************************************* +# +# NMAKE Options (passed as macro) +# +# Select a Visual Studio command window from the start menu +# vcvarsall X64 - sets X64 processor compilation env, X86 | IA64 +# +#*********************************************************************/ + + +#********************************************************************* +# +# Dot Directives +# +#*********************************************************************/ + +.SUFFIXES : # clear the .SUFFIXES list +.SUFFIXES : .c .rc # initialize .SUFFIXES list + + +#********************************************************************* +# +# Macros +# +#*********************************************************************/ + +PGM=ibv_rdma_bw + +LIB_PATH=%SystemDrive%\OFED_SDK\Lib +INC_PATH=%SystemDrive%\OFED_SDK\Inc + +IB_LIBS=libibverbs.lib librdmacm.lib + +DEFS= /D_WIN32 + +ARCH=x86 + +OBJS = rdma_bw.obj perftest.obj rdma_bw.res +EXEC = $(PGM).exe + +# +# Compiler +# + +CC = cl + +INC_FLAGS = /I $(INC_PATH) +RFLAGS=/r /i $(INC_PATH) + +UNUSED_CL=/Zp1 /Od +UNUSED_LINKER= /DEBUG /incremental:no + +CC_FLAGS= /nologo /Gy /W3 /Gm- \ + /GR- /GF /O2 /Oi /Oy- /D_CRT_SECURE_NO_WARNINGS \ + $(DEFS) $(INC_FLAGS) + +# +# Linker +# + +LINK = link + +LIBS = ws2_32.lib advapi32.lib User32.lib + +LINK_FLAGS = /nologo /subsystem:console /machine:$(ARCH) $(LIBS) \ + /libpath:$(LIB_PATH) $(IB_LIBS) + +# +# System Utilities +# + +RM = del /Q + + +#********************************************************************* +# Inference Rules +# +#*********************************************************************/ + +.c.obj: + $(CC) $(CC_FLAGS) /Fo$@ /c $< + +.rc.res: + $(RC) $(RFLAGS) $< + + +#********************************************************************* +# +# Description Blocks +# +#*********************************************************************/ + +all : $(EXEC) + + +$(EXEC) : $(OBJS) $0 + $(LINK) $(LINK_FLAGS) /out:$(EXEC) $(OBJS) + +clean: + -$(RM) *.exe *.pdb *.obj *.res diff --git a/trunk/OFED/WIX/SDK_Samples/rdma_bw/README.txt b/trunk/OFED/WIX/SDK_Samples/rdma_bw/README.txt new file mode 100644 index 00000000..dd49aa0a --- /dev/null +++ b/trunk/OFED/WIX/SDK_Samples/rdma_bw/README.txt @@ -0,0 +1,60 @@ + +Visual Studio (C++) Build Environment [4-07-10] +----------------------------------------------------------------- + +Install Microsoft Visual Studio 10 (C++ env) + + +**** WARNING - win32 application building **** + +Disregard if building x64 application. + +The Visual Studio default x86 calling convention is '__cdecl' (/Gd). +The 32-bit versions of ibal32.lib & complib32.lib are built using '__stdcall' +as the default calling convention (AL_API & CL_API). +Make _sure_ 'all' user-defined ibal and complib callback routines match the +callback function declaration [AL_API or CL_API calling conventions]. +The VS compiler will note a C-style cast is required if the calling conventions +do not match. +The other option is to force __stdcall (/Gz) as the 'default' calling +convention for your 'win32' InfiniBand application. + + +Building rdma_bw test example from a cmd.exe window +---------------------------------------------- + + +cd to %SystemDrive%\OFED_SDK\Samples\rdma_bw + + +Makefile Solution +----------------- + +Assuming Visual Studio is installed, select a Visual Studio x64 command +window from the start menu. + +nmake -f Makefile.x64 + +If building a win32 application on a 64-bit platform then link with +lbal32[d].lib & complib32[d].lib. + + +Executing ibv_rdma_bw.exe +-------------------- + + 'ibv_rdma_bw -h' tells the story... + +Example ibv_rdma_bw invocation: local loopback test + + +Separate processes for server & client (different cmd windows). + +server: ibv_rdma_bw +client: ibv_rdma_bw -h + + +Example using rdma_cm over IPoIB interface + +server: ibv_rdma_bw -c +client: ibv_rdma_bw -c -h IPoIB-IF-IPv4-address + diff --git a/trunk/OFED/WIX/SDK_Samples/rdma_bw/rdma_bw.rc b/trunk/OFED/WIX/SDK_Samples/rdma_bw/rdma_bw.rc new file mode 100644 index 00000000..9badd598 --- /dev/null +++ b/trunk/OFED/WIX/SDK_Samples/rdma_bw/rdma_bw.rc @@ -0,0 +1,48 @@ +/* + * This software is available to you under the OpenFabrics Alliance BSD license + * below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#define VER_FILEMAJORVERSION 2 +#define VER_FILEMINORVERSION 2 +#define VER_FILEBUILD 1 +#define VER_FILEREV 1 +#define IB_COMPANYNAME "OpenFabrics Alliance" +#define IB_PRODUCTNAME "OpenFabrics\x20Windows" + +#include + +#define VER_FILETYPE VFT_APP +#define VER_FILESUBTYPE VFT2_UNKNOWN + +#ifdef DBG +#define VER_FILEDESCRIPTION_STR "winverbs - RDMA Bandwidth Test (Debug)" +#else +#define VER_FILEDESCRIPTION_STR "winverbs - RDMA Bandwidth Test " +#endif + +#define VER_INTERNALNAME_STR "ibv_rdma_bw.exe" +#define VER_ORIGINALFILENAME_STR "ibv_rdma_bw.exe" + diff --git a/trunk/OFED/WIX/common/ib_sdk.inc b/trunk/OFED/WIX/common/ib_sdk.inc index db82561c..3df02487 100644 --- a/trunk/OFED/WIX/common/ib_sdk.inc +++ b/trunk/OFED/WIX/common/ib_sdk.inc @@ -445,8 +445,8 @@ - - + + Source="..\..\SDK_Samples\WDK\cmtest.rc" /> + Source="..\..\SDK_Samples\WDK\makefile" /> + Source="..\..\SDK_Samples\WDK\SOURCES" /> + Source="..\..\SDK_Samples\WDK\README.txt" /> - + - - + + Source="..\..\SDK_Samples\cmtest\cmtest.rc" /> + Source="..\..\SDK_Samples\cmtest\README.txt" /> - + - + - + + + + + + + + + + + + + + + + + + diff --git a/trunk/OFED/WIX/common/std_features.inc b/trunk/OFED/WIX/common/std_features.inc index 97958a91..d0543fcb 100644 --- a/trunk/OFED/WIX/common/std_features.inc +++ b/trunk/OFED/WIX/common/std_features.inc @@ -151,8 +151,9 @@ - - + + +