Leonid Kelly [Tue, 14 Sep 2010 09:21:23 +0000 (09:21 +0000)]
[MLX4] Fix ioremap to use consistent caching attribute
When mapping Blue Flame registers to user-mode, the UAR page is first mapped from I/O space to kernel-mode, then from kernel-mode to user-mode. The mapping from I/O space uses the function ioremap, which is hard coded to use MmNonCached as the caching attribute. The subsequent mapping to user-mode specifies MmWriteCombined. On Windows Server 2008 R2, the memory manager catches the inconsistency and preserves the original MmNonCached attribute. This leads to a 200-400% regression in small message latencies due to not write combining when writing the request to the blue flame register.
The following patch adds a caching type as a parameter to ioremap, changes all previous callers to specify MmNonCached except in __map_memory_for_user, which already took a caching type, in which case it forwards the caching type to ioremap.
With this patch, small message latency is identical on Windows Server 2008 and Windows Server 2008 R2.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2921 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Thu, 9 Sep 2010 16:58:48 +0000 (16:58 +0000)]
winverbs: use export/import function appropriately
Winverbs defines WvGetObject that users must invoke to obtain the winverb provider interface. WvGetObject is defined in the header files as dllexport, but callers require dllimport. The winverbs sources file already defines EXPORT_WV_SYMBOLS that is intended to distinguish if we are really trying to export or import WvGetObject. Update winverbs.h to support dllimport for clients including
winverbs directly.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2905 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Thu, 9 Sep 2010 16:48:44 +0000 (16:48 +0000)]
winmad: check return value of read/writefile
When performing synchronous operation, we need to check the return value of ReadFile/WriteFile before calling GetOverlappedResult. Otherwise GetOverlappedResult can hang.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2904 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Stan Smith [Wed, 8 Sep 2010 23:14:12 +0000 (23:14 +0000)]
[WIX] install DAPL 32-bit binaries in SysWow64 on 64-bit systems.
Install DAPL UCM (Unreliable Datagram Connection Manager) as part of DAPL runtime package.
Tzachi Dar [Mon, 6 Sep 2010 15:21:18 +0000 (15:21 +0000)]
[IBBUS] fix BSOD during WHQL's "Pnpdtest with concurrent IO in parallel with DevPathExer" (mlnx 5186)
This test runs in parallel 3 tests: pnpdtest, pwrtest and devpathexer.
pwrtest unload/load the driver while pnpdtest send various requests.
BSOD was caused by Device Query Location PnP request to IpoIB PDO, which crashed, because bus_port_mgr has not yet managed acquire HCA.
Sean Hefty [Thu, 2 Sep 2010 18:48:33 +0000 (18:48 +0000)]
winmad: clear overlapped structures
Currently winmad does not support byte offset reads and writes. However, if we ever want to support that feature, than we need to specify an offset of 0 for current operations to avoid backwards compatibility issues.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2893 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Wed, 1 Sep 2010 21:15:13 +0000 (21:15 +0000)]
dapl: change ib_addr to rdma_ib_addr
The librdmacm changed the name of struct ib_addr to struct rdma_ib_addr. Update dapl to use the new name. This fixes a build issue if DAPL_DBG is enabled.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2885 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Tzachi Dar [Mon, 30 Aug 2010 12:30:19 +0000 (12:30 +0000)]
[ipoib] ipoib - recv processing takes too much time in DPC
When processing of receive packet, the function stays in DPC too much time. In win2008 the OS throws an assert warning that too much time is spent in DPC and it may affect the system.
The fix is to move the receive processing to a workitem. The IPOIB give-up after some time and return to process receive packet in workitem. that allows other DPCs and workitems too run in parallel.
commit 6315 in svn://mtls50/svn.wininf/branches/MLNX_WinOF-2_1_2
Stan Smith [Thu, 26 Aug 2010 22:22:58 +0000 (22:22 +0000)]
[IPOIB,IPOIB_NDIS6_CM]
Fixing the bug when NDIS sends OID_GEN_NETWORK_LAYER_ADDRESSES with the list of new addresses with invalid formatting (happened when AddressCount =5)
NDIS sends NETWORK_ADDRESS_LIST structure, which contains an array of NETWORK_ADDRESS structures of variable size. The calculation of the next address offset is based on AddressLength; in a case when this field contains wrong data, one can get access violation error
Signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
Sean Hefty [Tue, 17 Aug 2010 16:04:23 +0000 (16:04 +0000)]
librdmacm: update to API version 1.0.13
- Support for synchronous operation
- Operational PD and CQ parameters
- New rdma_getaddrinfo functionality to support future
changes for IB ACM
- New simple client / server test apps.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2871 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Stan Smith [Mon, 9 Aug 2010 20:27:47 +0000 (20:27 +0000)]
[IPOIB_NDIS6_CM] simplify/clarify the IPOIB_INLINE_RECV conditionals by separating out only the different items; enhances readability/understanding of the code.
No Functionality changes!
Sean Hefty [Tue, 27 Jul 2010 22:23:27 +0000 (22:23 +0000)]
nd2: add SRQ support for 32-bit library
The SRQ receive code assumes that ND_SGE can map
to a WV_SGE. This is only true for 64-bit platforms.
A 32-bit library must convert ND_SGE to WV_SGE. The
ND_SGE size varies based on the build; WV_SGE is a fixed
size for all platforms.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2857 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 27 Jul 2010 22:18:29 +0000 (22:18 +0000)]
nd2: set file completion notification mode
Add an Init() call to the NDProvider in order to report
failure during initialization. Set the winverbs file handle
completion notification mode according to the latest ND spec.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2853 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 27 Jul 2010 22:10:02 +0000 (22:10 +0000)]
nd2: update provider APIs to match latest spec
This updates the implementation to match the latest ndspi.h header file. Changes include:
- Functions that return an interface take a REFIID as input and return VOID** rather than IND**
- Functions that take an interface as input use IUnknown* rather than IND*
- SGE became Sge
- A few acronyms are now spelled out.
- A couple new functions were defined, and parameters added in a couple places.
No significant functionality is added.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2850 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Mon, 19 Jul 2010 18:03:59 +0000 (18:03 +0000)]
winverbs: fix memory violation in SRQ code
Problem reported by Shiqing Fan:
"I got a memory violation error in wv_srq.cpp Query() function around line 202. It seems using uninitialized verbsData.output_size for memcpy. The verbsData.input_size is initialized in WvPreQueryQp (wvuverbs.cpp), and it has a similar memcpy in this function too."
wv_uverbs.cpp should initialize the output_size to 0 in all
WvPre* calls.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2848 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 13 Jul 2010 17:20:20 +0000 (17:20 +0000)]
libibverbs: remove _errno include from verbs.h
verbs.h is intended to be included directly by applications. Since _errno.h is a linux header file abstraction, move its use internal to libibverbs. This avoids issues if the user includes errno.h directly and matches the use on Linux.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2847 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 13 Jul 2010 17:15:45 +0000 (17:15 +0000)]
libibverbs: remove duplicate wc status values
Several ibv_wc_status values map to the same winverbs wc status values. This causes an error if the ibv_wc_status values are referenced in a switch statement. Replace the duplicated values with constants, so every wc status value is unique.
Since the wc status values are mapped from the provider library, the duplicated values are not used anyway.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2846 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 29 Jun 2010 19:33:05 +0000 (19:33 +0000)]
complib/user: fix timer race conditions
This serializes the callbacks for a timer and provides synchronization for multi-threaded timer usage.
cl_timer_stop is not allowed to be called from a timer callback, and will block until any callback has completed. (Technically, this should work, but it is not supported.)
cl_timer_start simply calls cl_timer_trim
cl_timer_trim changes the timeout of a queued timer if the new timeout time is less than the last set timeout.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2840 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 29 Jun 2010 19:31:07 +0000 (19:31 +0000)]
complib/timer: fix race accessing timer fields
The timeout_time field of cl_timer_t is modified in the timer callback function and also in calls to cl_timer_start, cl_timer_stop, and cl_timer_trim. The user cannot protect against the changes made in the timer callback function, so the timer must provide this protection itself.
Provide serialization to prevent multiple timer callbacks to the user at once.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2839 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Stan Smith [Thu, 24 Jun 2010 16:20:07 +0000 (16:20 +0000)]
[WIX] Incorporate WIX DirRef construct to simplify wix files (installed folder structure defined in a single file; much easier to understand overall structure).
Additionally install .dlls in %SystemRoot%\system32 instead of %SystemRoot%.
Sean Hefty [Wed, 23 Jun 2010 22:40:05 +0000 (22:40 +0000)]
libibumad: fix handling of receive timeouts
If the user calls receive with a timeout, the receive will
be posted, then the user will wait on an event until either
the receive completes or times out. If the wait times out,
an attempt is made to cancel the pending receive. However,
a MAD could be received between the wait timing out and
the completion of the cancel. To handle this, we need to
check the return status after the cancel to see if the
cancel succeeded.
This fixes a problem with ibnetdiscover hanging.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2831 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Mon, 21 Jun 2010 18:42:58 +0000 (18:42 +0000)]
libibumad: fixes for opensm
Fix struct user_mad to align the grh_valid field with winmad. Provide conversion functions to switch GRH data between umad and winmad when GRH data is in use.
Set errno correctly in case of failures.
Finally, cancel overlapped requests if receive or poll time out to prevent reusing those structures.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2825 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Tue, 15 Jun 2010 17:04:28 +0000 (17:04 +0000)]
winmad: fixup return values and zero allocated mad
Winmad simply returns the status values defined by IBAL. Convert those values into winmad define status values and align those values with errno. This matches the expectations of libibumad.
As part of the cleanup, convert the check for success from IB_SUCCESS to IB_WCS_SUCCESS. Both are defined as 0, so there's no functional change,but the mad status is a 'work completion status' value, not an API status value.
Finally, return the correct status value when canceling a read request.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2823 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86