From 36188c4023b536db6c8bfcc50f315f5406340998 Mon Sep 17 00:00:00 2001 From: stansmith Date: Tue, 10 Feb 2009 01:53:01 +0000 Subject: [PATCH] [IBDIAGS] adding ibtracert & ibroute to the build. git-svn-id: svn://openib.tc.cornell.edu/gen1@1936 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/tools/infiniband_diags/src/dirs | 4 +- trunk/tools/infiniband_diags/src/ibroute.c | 12 +++-- .../infiniband_diags/src/ibroute/SOURCES | 38 +++++++++++++++ .../infiniband_diags/src/ibroute/ibroute.rc | 47 +++++++++++++++++++ .../infiniband_diags/src/ibroute/makefile | 7 +++ trunk/tools/infiniband_diags/src/ibtracert.c | 10 ++-- .../infiniband_diags/src/ibtracert/SOURCES | 38 +++++++++++++++ .../src/ibtracert/ibtracert.rc | 47 +++++++++++++++++++ .../infiniband_diags/src/ibtracert/makefile | 7 +++ 9 files changed, 200 insertions(+), 10 deletions(-) create mode 100644 trunk/tools/infiniband_diags/src/ibroute/SOURCES create mode 100644 trunk/tools/infiniband_diags/src/ibroute/ibroute.rc create mode 100644 trunk/tools/infiniband_diags/src/ibroute/makefile create mode 100644 trunk/tools/infiniband_diags/src/ibtracert/SOURCES create mode 100644 trunk/tools/infiniband_diags/src/ibtracert/ibtracert.rc create mode 100644 trunk/tools/infiniband_diags/src/ibtracert/makefile diff --git a/trunk/tools/infiniband_diags/src/dirs b/trunk/tools/infiniband_diags/src/dirs index 3d4ce27f..13e1bf48 100644 --- a/trunk/tools/infiniband_diags/src/dirs +++ b/trunk/tools/infiniband_diags/src/dirs @@ -5,5 +5,7 @@ DIRS = \ ibaddr \ ibnetdiscover \ vendstat \ - ibportstate + ibportstate \ + ibroute \ + ibtracert diff --git a/trunk/tools/infiniband_diags/src/ibroute.c b/trunk/tools/infiniband_diags/src/ibroute.c index 83e2142f..f0bbc24b 100644 --- a/trunk/tools/infiniband_diags/src/ibroute.c +++ b/trunk/tools/infiniband_diags/src/ibroute.c @@ -41,12 +41,14 @@ #include #include #include +#if defined(_WIN32) +#else #include -#include #include +#endif +#include #include -#include #include #include #include @@ -336,7 +338,7 @@ dump_unicast_tables(ib_portid_t *portid, int startlid, int endlid) for (;i < e; i++) { unsigned outport = lft[i % IB_SMP_DATA_SIZE]; - unsigned valid = (outport <= nports); + unsigned valid = (outport <= (unsigned)nports); if (!valid && !dump_all) continue; @@ -379,7 +381,7 @@ usage(void) exit(-1); } -int +int _CDECL main(int argc, char **argv) { int mgmt_classes[3] = {IB_SMI_CLASS, IB_SMI_DIRECT_CLASS, IB_SA_CLASS}; @@ -407,7 +409,7 @@ main(int argc, char **argv) { "Version", 0, 0, 'V'}, { "help", 0, 0, 'h'}, { "usage", 0, 0, 'u'}, - { } + { 0 } }; argv0 = argv[0]; diff --git a/trunk/tools/infiniband_diags/src/ibroute/SOURCES b/trunk/tools/infiniband_diags/src/ibroute/SOURCES new file mode 100644 index 00000000..d3c07c68 --- /dev/null +++ b/trunk/tools/infiniband_diags/src/ibroute/SOURCES @@ -0,0 +1,38 @@ +TARGETNAME = ibroute +TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR) +TARGETTYPE = PROGRAM + +UMTYPE = console +UMENTRY = main + +USE_MSVCRT = 1 +USE_STL = 1 +USE_NATIVE_EH = 1 +USE_IOSTREAM = 1 + +SOURCES = ibroute.rc \ + ..\ibroute.c \ + ..\ibdiag_common.c \ + ..\cl_nodenamemap.c \ + ..\ibdiag_osd.c + +INCLUDES = ..;..\..\include;..\..\..\..\ulp\opensm\user\include;..\..\include\Infiniband;..\..\..\..\ulp\libibmad\include;..\..\..\..\ulp\libibumad\include;..\..\..\..\inc;..\..\..\..\inc\user; + +TARGETLIBS = \ + $(SDK_LIB_PATH)\kernel32.lib \ + $(SDK_LIB_PATH)\advapi32.lib \ + $(SDK_LIB_PATH)\user32.lib \ + $(SDK_LIB_PATH)\ole32.lib \ + $(SDK_LIB_PATH)\ws2_32.lib \ +!if $(FREEBUILD) + $(TARGETPATH)\*\libibmad.lib \ + $(TARGETPATH)\*\libibumad.lib \ + $(TARGETPATH)\*\complib.lib \ + $(TARGETPATH)\*\ibal.lib +!else + $(TARGETPATH)\*\libibmadd.lib \ + $(TARGETPATH)\*\libibumadd.lib \ + $(TARGETPATH)\*\complibd.lib \ + $(TARGETPATH)\*\ibald.lib +!endif + diff --git a/trunk/tools/infiniband_diags/src/ibroute/ibroute.rc b/trunk/tools/infiniband_diags/src/ibroute/ibroute.rc new file mode 100644 index 00000000..89b75157 --- /dev/null +++ b/trunk/tools/infiniband_diags/src/ibroute/ibroute.rc @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2009 Intel Corporation. All rights reserved. + * + * This software is available to you under the OpenIB.org 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. + * + * $Id$ + */ + + +#include + +#define VER_FILETYPE VFT_APP +#define VER_FILESUBTYPE VFT2_UNKNOWN + +#ifdef DBG +#define VER_FILEDESCRIPTION_STR "InfiniBand Route (Debug)" +#else +#define VER_FILEDESCRIPTION_STR "InfiniBand Route" +#endif + +#define VER_INTERNALNAME_STR "ibroute.exe" +#define VER_ORIGINALFILENAME_STR "ibroute.exe" + +#include diff --git a/trunk/tools/infiniband_diags/src/ibroute/makefile b/trunk/tools/infiniband_diags/src/ibroute/makefile new file mode 100644 index 00000000..a0c06273 --- /dev/null +++ b/trunk/tools/infiniband_diags/src/ibroute/makefile @@ -0,0 +1,7 @@ +# +# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source +# file to this component. This file merely indirects to the real make file +# that is shared by all the driver components of the OpenIB Windows project. +# + +!INCLUDE ..\..\..\..\inc\openib.def diff --git a/trunk/tools/infiniband_diags/src/ibtracert.c b/trunk/tools/infiniband_diags/src/ibtracert.c index 724ac807..f0894e82 100644 --- a/trunk/tools/infiniband_diags/src/ibtracert.c +++ b/trunk/tools/infiniband_diags/src/ibtracert.c @@ -42,11 +42,13 @@ #include #include #include +#if defined(_WIN32) +#else #include #include +#endif #include -#include #include #include #include @@ -186,7 +188,7 @@ extend_dpath(ib_dr_path_t *path, int nextport) if (path->cnt+2 >= sizeof(path->p)) return -1; ++path->cnt; - path->p[path->cnt] = nextport; + path->p[path->cnt] = (uint8_t)nextport; return path->cnt; } @@ -710,7 +712,7 @@ usage(void) exit(-1); } -int +int _CDECL main(int argc, char **argv) { int mgmt_classes[3] = {IB_SMI_CLASS, IB_SMI_DIRECT_CLASS, IB_SA_CLASS}; @@ -741,7 +743,7 @@ main(int argc, char **argv) { "help", 0, 0, 'h'}, { "usage", 0, 0, 'u'}, { "node-name-map", 1, 0, 1}, - { } + { 0 } }; argv0 = argv[0]; diff --git a/trunk/tools/infiniband_diags/src/ibtracert/SOURCES b/trunk/tools/infiniband_diags/src/ibtracert/SOURCES new file mode 100644 index 00000000..a3638715 --- /dev/null +++ b/trunk/tools/infiniband_diags/src/ibtracert/SOURCES @@ -0,0 +1,38 @@ +TARGETNAME = ibtracert +TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR) +TARGETTYPE = PROGRAM + +UMTYPE = console +UMENTRY = main + +USE_MSVCRT = 1 +USE_STL = 1 +USE_NATIVE_EH = 1 +USE_IOSTREAM = 1 + +SOURCES = ibtracert.rc \ + ..\ibtracert.c \ + ..\ibdiag_common.c \ + ..\cl_nodenamemap.c \ + ..\ibdiag_osd.c + +INCLUDES = ..;..\..\include;..\..\..\..\ulp\opensm\user\include;..\..\include\Infiniband;..\..\..\..\ulp\libibmad\include;..\..\..\..\ulp\libibumad\include;..\..\..\..\inc;..\..\..\..\inc\user; + +TARGETLIBS = \ + $(SDK_LIB_PATH)\kernel32.lib \ + $(SDK_LIB_PATH)\advapi32.lib \ + $(SDK_LIB_PATH)\user32.lib \ + $(SDK_LIB_PATH)\ole32.lib \ + $(SDK_LIB_PATH)\ws2_32.lib \ +!if $(FREEBUILD) + $(TARGETPATH)\*\libibmad.lib \ + $(TARGETPATH)\*\libibumad.lib \ + $(TARGETPATH)\*\complib.lib \ + $(TARGETPATH)\*\ibal.lib +!else + $(TARGETPATH)\*\libibmadd.lib \ + $(TARGETPATH)\*\libibumadd.lib \ + $(TARGETPATH)\*\complibd.lib \ + $(TARGETPATH)\*\ibald.lib +!endif + diff --git a/trunk/tools/infiniband_diags/src/ibtracert/ibtracert.rc b/trunk/tools/infiniband_diags/src/ibtracert/ibtracert.rc new file mode 100644 index 00000000..b470bef0 --- /dev/null +++ b/trunk/tools/infiniband_diags/src/ibtracert/ibtracert.rc @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2009 Intel Corporation. All rights reserved. + * + * This software is available to you under the OpenIB.org 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. + * + * $Id$ + */ + + +#include + +#define VER_FILETYPE VFT_APP +#define VER_FILESUBTYPE VFT2_UNKNOWN + +#ifdef DBG +#define VER_FILEDESCRIPTION_STR "InfiniBand Trace Route (Debug)" +#else +#define VER_FILEDESCRIPTION_STR "InfiniBand Trace Route" +#endif + +#define VER_INTERNALNAME_STR "ibtracert.exe" +#define VER_ORIGINALFILENAME_STR "ibtracert.exe" + +#include diff --git a/trunk/tools/infiniband_diags/src/ibtracert/makefile b/trunk/tools/infiniband_diags/src/ibtracert/makefile new file mode 100644 index 00000000..a0c06273 --- /dev/null +++ b/trunk/tools/infiniband_diags/src/ibtracert/makefile @@ -0,0 +1,7 @@ +# +# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source +# file to this component. This file merely indirects to the real make file +# that is shared by all the driver components of the OpenIB Windows project. +# + +!INCLUDE ..\..\..\..\inc\openib.def -- 2.41.0