shefty [Wed, 11 Mar 2009 21:39:31 +0000 (21:39 +0000)]
etc/comp_channel: add completion channel abstraction for scalability
Add a new abstraction, the completion channel, capable of de-multiplexing
overlapped completion events among multiple queues.
The completion abstraction consists of 3 main components:
COMP_MANAGER
Maps to an IOCP. The completion manager tracks all completions on any
of its associated channels. This allows a user to 'poll' the completion
manager to receive notification when a completion event occurs on any
of the channels, similar to polling a set of fd's.
COMP_CHANNEL
Maps to a queue of completed requests. A user can 'poll' a single channel
for completions if they are only interest in processing events on that
channel. Internally, polling on a channel will poll the manager for
completions, but only process those associated with the specified channel.
COMP_EVENT
Maps to an overlapped structure. Operations needing a completion event
reference this structure. When the event occurs, it is queued to the
correct channel.
The implementation assumes that only one or a very small number of threads
will ever be trying to process events at any one time. (Based on existing
applications, this is true.) The abstraction itself is threadless.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2024 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Mon, 9 Mar 2009 08:36:31 +0000 (08:36 +0000)]
[CORE,HW,TESTS] remove registration HCA with IBAL.
This patch removes registration HCA with IBAL, being done upon loading of IBBUS driver.
Instead of it IBBUS requests the upper HCA interface (GUID_RDMA_INTERFACE_VERBS) from HCA and then registers HCA itself.
On unloading it derigesters it back.
shefty [Fri, 6 Mar 2009 22:35:47 +0000 (22:35 +0000)]
ib-diags/ibstat: undo work-around reporting too many ports
A change was made to libibumad to change the index from 0 to 1 in the port array where port information is stored. We need to undo previous change to ibstat to display all ports now.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2015 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Fri, 6 Mar 2009 22:33:11 +0000 (22:33 +0000)]
libibumad: match behavior of OFED libibumad wrt ca ports
The OFED version of libibumad stores a list of ports associated with a umad_ca_t differently based on whether the CA is on a host or is part of a switch. On a host, the port information is maintained in the port array starting at index 1, not 0. In this case, umad_ca_t:port[0] is NULL. Update the WinOF version of libibumad to behave the same. This fixes an issue with ibstat reporting 1 too many ports.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2014 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Thu, 5 Mar 2009 22:36:58 +0000 (22:36 +0000)]
[DAPL2] DAPL Counters & 2.0.3 extensions to support counter retrieval.
dt-cli.bat - return error codes from script, use for() loop in regression test.
SOURCES - debug version get counters by default.
shefty [Tue, 3 Mar 2009 01:05:53 +0000 (01:05 +0000)]
getopt: return '?' if user wants an arg, but none is provided
If the user specifies that an argument is required, but none is provided, return '?' as the option, rather than NULL as the optarg. This fixes an issue if the last option specified in the option list requires an argument, but none is provided.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2000 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Tue, 3 Mar 2009 00:18:25 +0000 (00:18 +0000)]
infiniband-diags: replace ib-diags with latest
Replace the infiniband_diags port of ib-diags with a version that is in sync with the main management.git tree. The infiniband-diags tree is current with
git commit 1f5fdf3dfc69733a427520198bcbdd03645bb326. All executable ib-diags are supported. (Perl scripts that parse the output are not ported.)
The infiniband-diags directory is a mirror of the infiniband-diags directory of my ib-mgmt.git tree. This is a clone of the management.git tree, with a 1 line patch added to complete the port from Linux to Windows.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1998 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 2 Mar 2009 22:58:48 +0000 (22:58 +0000)]
ib_types: update SA attribute definitions
To support a direct port of the ib-diags (and eventually opensm), update ib_types.h so that the relevant definitions used by the diags match between OFED and WinOF. The affected attributes are:
Users of the attributes are updated accordingly. In several cases, static inline accessor functions were provided in the ib_types.h header files that were not called by anything. Rather than update all 29 of those functions, I simply deleted them.
The updates moved the path record attribute to match the 1.2.1 spec version. The inform info attribute was updated to make it easier to use the structure.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1996 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 2 Mar 2009 22:10:14 +0000 (22:10 +0000)]
complib: add cl_nodenamemap
The ib-diags (and possible future opensm port) make use of a 'node name map' that was added to the OFED version of complib. Add cl_nodenamemap to the WinOF version of complib.
This patch relies on the linux compatibility header patch. The imported code is basically a direct import of the OFED code, with an include file change.
This changes complib to using the MSV CRT DLL, rather than NT DLL.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1995 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 2 Mar 2009 21:25:03 +0000 (21:25 +0000)]
libibverbs/librdmacm: update calls to winverbs pkey interfaces
Fixup calls to QueryPkey and FindPkey, which now take a UINT16 as the pkey index, rather than a DWORD. Fixes a build warning for libibverbs and a build error for librdmacm.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1994 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Sat, 28 Feb 2009 18:50:05 +0000 (18:50 +0000)]
etc: add generic linux compatibility code
To support the porting of OFED code, such as the infiniband-diags, provide a
set of linux compatible include files and functions.
This adds a set of header files under inc/user/linux so #include statements
in code will find them. In some cases, the header files are blank, but in
others, they contain mappings between the linux calls and equivalent windows
calls.
Where more complex functionality is needed, source files are added under
etc/user to provide it, similar to what was done for getopt.
These headers and source files are used to support the OFED infiniband-diags
in the WinOF build environment.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1993 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Sat, 28 Feb 2009 17:50:43 +0000 (17:50 +0000)]
perftest: adjust performance counters for ridiculously long Vista time stamping
Adjust time stamping to account for lengthy time stamps. Only keep performance
data on the client side to avoid server time stamping overhead. Extract out
common performance code into a new module that's included by all the perftests.
Problem was reported by Leonid.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1992 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Tue, 24 Feb 2009 23:58:21 +0000 (23:58 +0000)]
winverbs/winmad: fix GetOverlappedResult return value
The GetOverlappedResults methods are supposed to return an HRESULT, but are returning a BOOL. This makes GetOverlappedResults return WV_SUCCESS when the underlying ::GetOverlappedResults failed.
This patch returns the NTSTATUS results (not the Win32 conversion thereof) so that the WV_STATUS values are returned (since these map to NTSTATUS values.)
Applied similar fix to winmad. (-SH)
Signed-off-by: Fab Tillier <ftillier@microsoft.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1987 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Tue, 24 Feb 2009 23:17:49 +0000 (23:17 +0000)]
winverbs/winmad: allow clients to use IOCPs
This patch allows clients to use IOCPs. It sets the lower bit of the event used for synchronous IOCTLs to prevent their completion from being reported to the IOCP.
Signed-off-by: Fab Tillier <ftillier@microsoft.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1986 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Tue, 24 Feb 2009 23:13:41 +0000 (23:13 +0000)]
winverbs: remove dependency on CRT
This patch removes the dependency on the CRT, avoiding any potential issues with mismatched CRTs (say a client app uses the single-threaded static version of the CRT while WinVerbs uses the multi-threaded DLL version.)
Signed-off-by: Fab Tillier <ftillier@microsoft.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1985 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Tue, 24 Feb 2009 23:04:49 +0000 (23:04 +0000)]
winmad: fix crash and handle mads > 256 correctly
Fix crash if driver is loaded, but does not go active (power D0) before being unloaded. Also handle mads > 256 bytes by checking against STATUS_SUCCESS, rather than for a successful status. STATUS_MORE_ENTRIES is a successful status, but not what we're interested in.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1983 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Tue, 17 Feb 2009 18:40:59 +0000 (18:40 +0000)]
[WinOF] additional WHQL patches from trunk (svn.commit #)
1765 [ipoib] Don't put multicast entries in the dlid lists.
1770 [MLX4] Fixed QP memory leak, inserted in 1288 fix.
1771 [MLX4] Fixed QP memory leak, inserted in 1288 fix.
1772 [MLX4] fixed application crash in case of IOCTL failure.[mlnx:3498]
1774 [IBBUS] workaround for some problems with WHQL PnP test over IPoIB.
[mlnx: 3535]
1788 [IPoIB]: Fill in service level in MAC_TO_PATH output.
1966 [IBAL,WinVerbs] fix ib_get_err_str. The addition of
IB_INVALID_GUID_MASK wasn't reflected in the string conversion.
This causes all text representations of error values greater than
IB_INVALID_GUID_MASK to be wrong.
WIX src updates for 2.0.2 release
leonidk [Mon, 16 Feb 2009 12:06:19 +0000 (12:06 +0000)]
[IBAL] Fix WPP trace previx for AL_PRINT
The AL_PRINT WPP prefix adds a space before the colon. This makes output look funny if you use AL_PRINT instead of AL_ENTER to create a more detailed entry message (with parameter values, for example), as the colon won't align. This makes it hard to search a file for function entry.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1967 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Mon, 16 Feb 2009 11:50:20 +0000 (11:50 +0000)]
[IBAL,WinVerbs] fix ib_get_err_str
The addition of IB_INVALID_GUID_MASK wasn't reflected in the string conversion. This causes all text representations of error values greater than IB_INVALID_GUID_MASK to be wrong.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1966 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Mon, 16 Feb 2009 10:13:45 +0000 (10:13 +0000)]
[IBBUS] added support for creating vendor defined devices.
It replaces creating devices on built-in base.
Devices, created by this patch: IPoIB and XsigoBus.
The parameters, describing the devices to be created, are defined in mlx4_hca and mthca inf files, but they are placed into Registry under ibbus\parameters key.
Signed-off-by: James Yang
git-svn-id: svn://openib.tc.cornell.edu/gen1@1965 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Fri, 13 Feb 2009 22:33:59 +0000 (22:33 +0000)]
ib-diags: re-porting of ib diag utilities
A new port of the ib diag utilities that is in sync with the main management.git tree. This code mirrors git://git.openfabrics.org/~shefty/scm/ib-mgmt.git, which is a clone of Sasha's management.git tree, plus pending patches for windows support.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1960 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Fri, 13 Feb 2009 19:55:22 +0000 (19:55 +0000)]
[WinOF] CustomActions.vbs - remove /S switch from dpinst cmd-line as it suppresses the required unknown SW Publisher dialogue box during HCA driver install; for a system which has never seen WinOF SW. Side effect of checking the trust unknown SW publisher is an OFA certificate is placed in the trusted publishers cert store.
Install dpinst.xml file so dpinst.exe doesn't complain about not having one.