[IBAL] This patch fixes IBAL object destruction. It does the following:
1. Removes forcing synchronous destruction for user-mode exported objects. This isn't needed, and slows down cleanup of the object hierarchy.
2. Clears the user-mode exported handle from the handle table before invoking the 'destroying' callback of an object, so that all further reference on the object will fail. Currently, an IOCTL could take a reference on an object after the 'destroying' callback has returned.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1329 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] IBAL currently blows away all CEPs from its 'destroying' callback. This patch moves this so that any left over CEPs are cleaned up in the 'cleanup' callback, so that objects that 'own' a CEP have a chance to clean themselves up first. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1328 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] This patch renames 'que' to 'queue'. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1327 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] IBAL has two reserved CID values that it stores in the QPs - AL_INVALID_CID, meaning that there is no CEP associated with the QP but that one can be associated, and AL_RESERVED_CID, which means no CEP is associated, and none should be because the QP is being destroyed.
The code uses atomic operations to check for/set AL_INVALID_CID or AL_RESERVED_CID. Since there are two possible 'special' values, atomics can't be used reliably.
There has been a report of this related to SRP and BSODs.
Additionally, the code would provide the destroy callback when destroying the CEP. However, the CEP can be destroyed through different paths, and it's important to make sure the destroy callback is invoked always so that reference counts can be properly released.
This patch pushes all assignments and checks for special values into the CEP manager, protected by the CEP manager's lock that it holds when performing the CEP lookup. It also changes the semantics of creation/destruction of the CEPs to provide the destroy callback when the CEP is created or bound to an object (the binding path is for the passive side of a connection).
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1326 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] The current connection establishment code will return STATUS_HOST_UNREACHABLE when an SA operation times out. This patch returns STATUS_TIMEOUT if the SA query timed out, which tends to happen in larger clusters quite often. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1325 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] Use the CM protocol to exchange initiator depth and responder resources. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1324 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] The current ndi_dreq_cm function destroys the CEP after the QP is moved to the error state. The CEP should be destroyed first to send the DREQ before changing the QP state. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1323 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] The CEP manager currently keeps a separate field to store the initiator depth requested in a REQ. When the user sends the REP, the CEP stored the responder resources as the minimum of the requested depth or the CA's capabilities.
This change eliminates the separate field, and uses the responder resources to store the received REQ's initiator depth. This simplifies the code a bit.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1322 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] Convert ib_api_status_t to NTSTATUS for al_cep_get_pdata to make the IRP handling simpler. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1320 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] Add code to allow user-mode code to register memory via the existing IBAL IOCTLs, and if that succeeds, issue a no-op IOCTL that completes the user's overlapped request to their IOCP (or whatever mechanism they are using - the I/O manager will take care of it). Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1319 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] This patch changes when the private data is stored to when the CM MAD is received and processed. This makes the code more consistent and simpler. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1318 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] This patch adds a missing reference taken on a QP when delaying the QP modification for a received DREQ. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1317 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] This patch cancels all outstanding UAL_CEP_GET_REQ_CID IRPs queued in a CEP when the CEP is destroyed. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1316 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] Cleanup dead code in IBAL. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1315 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] This patch removes XXX_PTR64 and TO_ULONG_PTR macro use from IBAL. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1314 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[TESTS] This patch removes XXX_PTR64 and TO_ULONG_PTR macro use from interface files. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1313 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[TESTS] This patch removes XXX_PTR64 and TO_ULONG_PTR macro use from \tests. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1312 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[HW] improved memory allocation mechanism. (posix_memalign was implemented by VirtualAlloc, which, as it turned out, allocates 64KB instead of 4KB) [MLNX: 2601]
ftillier [Mon, 30 Jun 2008 17:15:54 +0000 (17:15 +0000)]
Make build scripts easier to use:
- bldwo.bat now accepts multiple build parameters, so you can separate them.
For example, bldwo chk x86 2008 -Ccwg is the same as bldwo chk x86 2008 -C -c -w -g.
- eliminate the need for the WINOF_PATH environment variable so it can be run
from any directory.
- bldwoall.bat now passes all extra parameters to bldwo.bat
- bldwoall.bat now picks up bldwo.bat from the same directory, rather than
the directory from which it was launched.
leonidk [Sun, 29 Jun 2008 17:53:30 +0000 (17:53 +0000)]
[IOU] This patch removes XXX_PTR64 and TO_ULONG_PTR macro usage in the IOU bus driver. It's a kernel driver and doesn't need any padding as it will always have the same pointer size as other kernel drivers. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1308 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Sun, 29 Jun 2008 16:45:16 +0000 (16:45 +0000)]
[IBBUS] This patch removes XXX_PTR64 and TO_ULONG_PTR macro use from IBBus. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1307 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Sun, 29 Jun 2008 16:21:53 +0000 (16:21 +0000)]
[SRP] This patch removes XXX_PTR64 and TO_ULONG_PTR macro use from SRP. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1306 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 21 Jun 2008 00:27:03 +0000 (00:27 +0000)]
[Core] fixed errant Default Data length when reading registry entry 'PartitionKey' and the key did not exist. Showed up as a BSOD crash when loading ibbus.sys on Server 2003 x86.
stansmith [Wed, 18 Jun 2008 21:54:54 +0000 (21:54 +0000)]
[WinOF] added common exit path with time stamp info (start & end times); curently takes about 15 minutes to compile, sign drivers and build installers on a 4P platform.
stansmith [Wed, 18 Jun 2008 00:09:56 +0000 (00:09 +0000)]
[WinOF]
buildrelease.bat - added WIX .msi creation only option; assumes drivers are signed
etc\makebin.bat - don't copy Mx tools which have been removed from the build/svn
etc\clean-build.bat - delete build generated files to ensure a clean build.
stansmith [Tue, 17 Jun 2008 23:24:18 +0000 (23:24 +0000)]
[WinOF]
missed x86\Command Window.lnk
WIX\bin removed, as it's now an OS flavor {wlh,wnet,wxp} specific item
wof.wxs - removed erroneous reference to mtcr.dll
leonidk [Tue, 17 Jun 2008 18:40:54 +0000 (18:40 +0000)]
[MTHCA] Fix possible data corruption for Sinai chip upon fmr_unmap
(In mthca_arbel_fmr_unmap(), the high bits of the key are masked off.
This gets rid of the effect of adjust_key(), which makes sure that
bits 3 and 23 of the key are equal when the Sinai throughput
optimization is enabled, and so it may happen that an FMR will end up
with bits 3 and 23 in the key being different. This causes data
corruption, because when enabling the throughput optimization, the
driver promises the HCA firmware that bits 3 and 23 of all memory keys
will always be equal.
Fix by re-applying adjust_key() after masking the key.
stansmith [Fri, 13 Jun 2008 00:00:03 +0000 (00:00 +0000)]
[DAPL2] Request extensions didn't allocate a cookie if the completion was suppressed, which resulted in segfault during provider post call. Provider's expect a *cookie in wr_id, even with surpressed completions, needed to handle events during errors.
stansmith [Thu, 12 Jun 2008 23:54:39 +0000 (23:54 +0000)]
[WinOF] v2.0 prep - WDK build env structure for multiple OS flavors: WLH, WNET & WXP.
scripts to build .cat files and Digitally sign drivers, given a certificate (.cer) file.
shefty [Thu, 5 Jun 2008 06:23:08 +0000 (06:23 +0000)]
winverbs: move reference counting back to WvBase and use virtual Delete call
Move AddRef and Release back into WvBase. Add a virtual function Delete() to WvBase that derived classes set to delete 'this'. This avoids the heap corruption issues without classes re-implementing Release.
This fixes an issue with the previous fix where heap corruption still would have occurred if a user released the QP interface after releasing the derived interface (such as the connected QP interface).
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1244 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Thu, 5 Jun 2008 03:03:58 +0000 (03:03 +0000)]
winverbs: do not inherit Release() calls
Release() tries to delete an object when its reference count reaches 0. Inheriting Release() from WvBase ends up corrupting the heap when WvBase tries to delete 'this'.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1242 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Thu, 5 Jun 2008 03:00:58 +0000 (03:00 +0000)]
winverbs: wait to create device on PnP power up (D0)
The hca drivers are not ready to handle query interface and function calls until the device enters the D0 power state. Delay initializing the RDMA device until winverbs sees the D0 power state for that device. This is only done the first time that the device enters the power state to avoid losing user context information just because the device enters a lower powered state.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1241 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Wed, 4 Jun 2008 04:59:06 +0000 (04:59 +0000)]
winverbs: track changes against trunk using patch files
Add patch directory with patches that can be applied. This simplifies tracking changes against the trunk, and makes it easier to update only affected patches with changes.
This will help when merging the changes into the trunk.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1239 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Wed, 4 Jun 2008 04:12:02 +0000 (04:12 +0000)]
winverbs: undo changes to files tracked in trunk
Undo any changes to files that exist in the trunk. All changes will be added as patches to make synchronizing changes in the winverb branch with the trunk easier. The patches will then be applied directly to the trunk when merging.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1238 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86