Sean Hefty [Mon, 26 Jul 2010 22:12:11 +0000 (15:12 -0700)]
nd2/provider: 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.
Sean Hefty [Mon, 12 Jul 2010 19:10:08 +0000 (12:10 -0700)]
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.
Sean Hefty [Mon, 12 Jul 2010 17:16:26 +0000 (10:16 -0700)]
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.
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
Sean Hefty [Tue, 8 Jun 2010 21:29:50 +0000 (21:29 +0000)]
libibumad: add new link_layer field
Update libibumad to include a link_layer field as part of the port structure. This updates the definition to match linux and is needed for the ib-diag port.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2821 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Stan Smith [Tue, 25 May 2010 23:43:04 +0000 (23:43 +0000)]
[INC] Correct spelling, white-space alignment, remove trailing white-space, add comments.
Generally make ib_types.h more compatible with OFED for Linux version in order to make comparisions easier.
Stan Smith [Fri, 21 May 2010 19:28:04 +0000 (19:28 +0000)]
[OPENSM] Code cleanup by replacing 'cl_ntoh16((uint16_t) (attr_size >> 3))' expression with a call to the inline function 'ib_get_attr_offset(attr_size)'; takes advantage of (debug build) attr offset size checking.
Validates input attr_size is a multiple of 8 bytes per IB spec.
Function returns same value as the expression plus it isolates the implementation to a single point to ease future changes.
In function osmtest_stress_path_recs_by_lid()
Skip the destination lid byte-order swap as it's already in the correct order for vendor IBAL.
Permits 'osmtest -f f -s4' test to correctly complete.
Stan Smith [Fri, 21 May 2010 19:05:50 +0000 (19:05 +0000)]
[INC] In function 'ib_get_attr_offset()' replace attr_size adjustment code with an ASSERT() as attr offset sizes are required to be a multiple of 8 bytes.
By removing antiquated structure padding, the sizeof(struct) values return to the correct size alignment.
Removal of padding allows osmtest to correctly generate and validate a fabric inventory file.
Stan Smith [Thu, 15 Apr 2010 22:14:38 +0000 (22:14 +0000)]
[WIX] rename CustomAction:DriverInstall to reflect how it's being called now as MS routines (DIFxApp) now perform the original CustomAction task. rename DriverInstall --> PostDriverInstall.
Stan Smith [Fri, 9 Apr 2010 22:15:47 +0000 (22:15 +0000)]
[WIX] simplify by creating %systemdrive%\DAT in a single place (moved from ofed.wxs files).
Create DAT SDK include file to match uDAT ver 2 conventions (DAT --> DAT2)
Include missing DAT file dat_ib_extensions.h
Stan Smith [Thu, 8 Apr 2010 20:35:13 +0000 (20:35 +0000)]
[WINOF] Fix isolated installer crash. In CheckDriversOK() remove usage of Wsh.Sleep() as it fails in the installer environment. Wait by invoking 'cmd.exe /C timeout /T 2'. Need to wait in a small # of isolated cases for the IPoIB driver (device IBA\IPOIB) to show up in the Window device database before installing ND/WSD. Generally IPoIB device is present prior to ND/WSD provider installation.
Waiting for the IPoIB device ensures NetworkDirect/IBAL & Winsock Direct providers install correctly. Wait 30 seconds max, output timed nastyGram about possible IPoIB driver initialization failure (no errors returned).
Stan Smith [Thu, 8 Apr 2010 20:29:26 +0000 (20:29 +0000)]
[OFED] More WinOF --> OFED name changes. In CheckDriversOK() remove usage of Wsh.Sleep() as it fails in the installer environment. Wait by invoking 'cmd.exe /C timeout /T 2'. Need to wait in a small # of isolated cases for the IPoIB driver (device IBA\IPOIB) to show up in the Window device database. Waiting ensures NetworkDirect/IBAL & Winsock Direct providers install correctly. Wait 30 seconds max, output timed nastyGram about possible IPoIB driver initialization failure (no errors returned).
Sean Hefty [Fri, 2 Apr 2010 23:32:39 +0000 (23:32 +0000)]
winverbs/nd: do not convert timeout status value
wv_io_timeout is an error value, but nd_timeout is a
success value. This means that an overlapped request
can be completed in error, but GetOverlappedResult can
return a success value. Instead, if a timeout is fatal,
report the status as wv_io_timeout, but if the timeout
can be retried, then report the status as wv_timeout.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2763 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Sean Hefty [Fri, 2 Apr 2010 23:31:13 +0000 (23:31 +0000)]
winverbs/ep: allow failed connections to be retried
Allow a user to retry a connection request if it fails. Report a
'success' timeout value, rather than an error timeout, reset the
EP state, and allow the request to be retried from user space.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2761 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86