To better mimic Linux fd support, add the concept of channel sets to completion channels. This is needed to minimize changes in platform independent uDAPL code.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2412 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[HW] allow retrieving CA attributes with pageable memory. [winof: 2408]
Modify the HCA drivers to support querying for attributes using a pageable buffer. Since the query calls block, it seems appropriate for the calls to allow pageable memory, rather than forcing the user to allocate a non-paged buffer in order to obtain a list of attributes. The problem stems from the HCA drivers accessing a user's buffer after acquiring a spinlock that raise IRQL.
This fixes kernel crashes with both the winmad and winverbs drivers.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2411 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
If an application calls Connect or Accept, their IRP is queued to a
work queue for asynchronous processing. However, if the application
crashes or exits before the work queue can process the IRP, the cleanup
code will call WvEpFree(). This destroys the IbCmId.
When the work queue finally runs, it can access a freed IbCmId.
This is bad. A similar race exists with the QP and the asynchronous
disconnect processing. The disconnect processing can access a
the hVerbsQp handle after it has been destroyed.
Additionally, in all three cases, the IRPs assume that the WV provider
is able to process IRPs. Specifically, they require that the index
tables maintained by the provider are still valid. References must
be held on the WV provider until the IRPs finish their processing to
ensure this.
Fix invalid accesses to the IbCmId and hVerbsQp handles by locking
around their use after valid state checks. In the case of the QP, we
add a guarded mutex for synchronization purposes and use that in place
where the PD mutex had been used.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2410 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Winmad returns an incorrect error code when using send or receive in synchronous mode. The OFED MAD code ends up working, since it checks for errors by comparing the return value < 0. In this case, the return value us positive, when it should be zero. Simplify the code and return the correct error code.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2409 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[HW] allow retrieving CA attributes with pageable memory
Modify the HCA drivers to support querying for attributes using a pageable buffer. Since the query calls block, it seems appropriate for the calls to allow pageable memory, rather than forcing the user to allocate a non-paged buffer in order to obtain a list of attributes. The problem stems from the HCA drivers accessing a user's buffer after acquiring a spinlock that raise IRQL.
This fixes kernel crashes with both the winmad and winverbs drivers.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2408 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Winmad returns an incorrect error code when using send or receive in synchronous mode. The OFED MAD code ends up working, since it checks for errors by comparing the return value < 0. In this case, the return value us positive, when it should be zero. Simplify the code and return the correct error code.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2407 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
If an application calls Connect or Accept, their IRP is queued to a
work queue for asynchronous processing. However, if the application
crashes or exits before the work queue can process the IRP, the cleanup
code will call WvEpFree(). This destroys the IbCmId.
When the work queue finally runs, it can access a freed IbCmId.
This is bad. A similar race exists with the QP and the asynchronous
disconnect processing. The disconnect processing can access a
the hVerbsQp handle after it has been destroyed.
Additionally, in all three cases, the IRPs assume that the WV provider
is able to process IRPs. Specifically, they require that the index
tables maintained by the provider are still valid. References must
be held on the WV provider until the IRPs finish their processing to
ensure this.
Fix invalid accesses to the IbCmId and hVerbsQp handles by locking
around their use after valid state checks. In the case of the QP, we
add a guarded mutex for synchronization purposes and use that in place
where the PD mutex had been used.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2406 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
DAPL automatically calls rdma_disconnect() when a disconnect request is
received. If the user also calls disconnect, that calls rdma_disconnect() as
well, but the connection has already been disconnected by DAPL and is no longer
valid. The result is that the user's call to rdma_disconnect() will fail. Do
not display an error message if this occurs.
Locking could be added to prevent calling rdma_disconnect() multiple times, but
since the librdmacm provides synchronization to trap this, we might as well take
advantage of it.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2405 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
winmad: allocate registration struct from NonPagedPool
Apparently data structures that are accessed from within MAD callbacks must be
allocated from NonPagedPool. Allocated the WM_REGISTRATION structure from non
paged pool.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2404 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
winmad: allocate registration struct from NonPagedPool
Apparently data structures that are accessed from within MAD callbacks must be
allocated from NonPagedPool. Allocated the WM_REGISTRATION structure from non
paged pool.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2403 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[WinOF] Shutdown NetworkDirect and Winsock direct before DIFxApp removes devices. Makes sure no lingering device references are on the IB stack which would prevent components from being removed.
Moved ND/WSD shutdown into separate CustomAction called before MsiProcessDevices.
[DAPL2] udapl/scm: convert error code into dapl error code
Intel MPI checks the uDAPL error code when calling dat_psp_create() to see if
the port number that it provides is in use or not. Convert winsock error codes
to unix errno values.
This fixes the following error reported by Intel MPI:
'DAPL provider is not found and fallback device is not enabled'
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2401 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[WINMAD] winmad: allocate registration struct from NonPagedPool.
Apparently data structures that are accessed from within MAD callbacks must be
allocated from NonPagedPool. Allocated the WM_REGISTRATION structure from non
paged pool.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2400 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 29 Aug 2009 01:03:54 +0000 (01:03 +0000)]
[WinOF] Add WinOF to Command Window name to distinguish it from other Command Windows as Svr 2008 likes to add recently used commands to the start menu.
signed off by stan.smith@intel.com
stansmith [Sat, 29 Aug 2009 01:01:14 +0000 (01:01 +0000)]
[WINVERBS] should have been pat of Revision: 2391; DllMain is called multiple times for a given process. Prevent double initialization of critical sections by only initializing it during process attach. This avoids corrupting the critical section while it may be in use. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2397 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 29 Aug 2009 00:58:34 +0000 (00:58 +0000)]
[WINVERBS] winverbs: fix race in async connect handling. If an application calls Connect or Accept, their IRP is queued to a work queue for asynchronous processing. However, if the application crashes or exits before the work queue can process the IRP, the cleanup code will call WvEpFree(). This destroys the IbCmId. When the work queue finally runs, it can access a freed IbCmId. This is bad. A similar race exists with the QP and the asynchronous disconnect processing. The disconnect processing can access a the hVerbsQp handle after it has been destroyed.
Additionally, in all three cases, the IRPs assume that the WV provider is able to process IRPs. Specifically, they require that the index tables maintained by the provider are still valid. References must be held on the WV provider until the IRPs finish their processing to ensure this.
Fix invalid accesses to the IbCmId and hVerbsQp handles by locking around their use after valid state checks. In the case of the QP, we add a guarded mutex for synchronization purposes and use that in place where the PD mutex had been used. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2396 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 29 Aug 2009 00:52:02 +0000 (00:52 +0000)]
[WINVERBS] To help match memory allocations with free, replace ExFreePool with ExFreePoolWithTag. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2395 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 29 Aug 2009 00:44:58 +0000 (00:44 +0000)]
[WINVERBS] Endpoints are not maintained in a list associated with a provider. The list entry for an endpoint is used to track connection requests with listens. When an endpoint is unassociated from a listen, it is removed from the listen list. Trying to remove it from a list during provider cleanup results in a duplicate removal, can corrupt the listen list, and may access freed memory. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2394 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 29 Aug 2009 00:42:29 +0000 (00:42 +0000)]
[WINVERBS] The winverbs PD structure contains both an event and a guarded mutex. Both must be allocated as part of resident memory, or vague system corruptions may occurif their memory is paged out. The fix is to allocate the PD structure from NonPagedPool. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2393 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 29 Aug 2009 00:39:47 +0000 (00:39 +0000)]
[WINVERBS] Fix a memory leak. We need to free the port array, which is allocated separately from the device structure. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2392 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 29 Aug 2009 00:37:08 +0000 (00:37 +0000)]
[WINVERBS] DllMain is called multiple times for a given process. Prevent double initialization of critical sections by only initializing it during process attach. This avoids corrupting the critical section while it may be in use. Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2391 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Wed, 26 Aug 2009 16:47:57 +0000 (16:47 +0000)]
winverbs: EP is not in a provider list, so don't try to remove it
Endpoints are not maintained in a list associated with a provider. The list
entry for an endpoint is used to track connection requests with listens. When
an endpoint is unassociated from a listen, it is removed from the listen list.
Trying to remove it from a list during provider cleanup results in a duplicate
removal, can corrupt the listen list, and may access freed memory.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2385 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Wed, 26 Aug 2009 16:47:11 +0000 (16:47 +0000)]
winverbs: ensure that event and mutex memory are resident
The winverbs PD structure contains both an event and a guarded mutex. Both must
be allocated as part of resident memory, or vague system corruptions may occur
if their memory is paged out.
The fix is to allocate the PD structure from NonPagedPool.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2384 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Wed, 26 Aug 2009 16:45:53 +0000 (16:45 +0000)]
librdmacm: fix race in ucma_init()
There's a potential race with ucma_init() and calls that check whether
the library is ready for use. For example, in rdma_create_id, this
check is performed:
Since the check for cma_dev_cnt is outside of any synchronization, if it
is non-zeroy, then the code will assume that initialization is complete.
However, ucma_init() can set cma_dev_cnt to non-zeroy before it has finished
executing. The full impact of this race is unknown, but it can't be good.
In the worst case, the application may crash.
Fix this by ensuring that all initialization is complete before cma_dev_cnt
is incremented. Note that ucma_init() provides synchronization to protect
against duplicate threads handling init. The cma_dev_cnt check is used to
avoid synchronization on multiple calls into the library after initialization.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2383 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Wed, 26 Aug 2009 16:44:24 +0000 (16:44 +0000)]
ofed libs: prevent double initialization of critical section
DllMain is called multiple times for a given process. Prevent double
initialization of critical sections by only initializing it during process
attach. This avoids corrupting the critical section while it may be in use.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2382 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Wed, 19 Aug 2009 21:49:50 +0000 (21:49 +0000)]
[WIX] update usage instructions to reflect WinOF is now under Trunk\ and no longer under branches\ . Include win7\x64\wof.wxs as I missed it in the last commit.
shefty [Tue, 18 Aug 2009 19:22:47 +0000 (19:22 +0000)]
ib/port_attr: report active width as part of port attributes
Return the active width in the port attributes reported by the HCA.
Because the kernel and user space share the same source
files, to avoid breaking the ABI, rename link_width_supported
field to active_width and use that field to return the value.
link_width_supported is currently uninitialized and in the
svn tree unused, so repurposing the field should have minimal
impact. However, this change will break the API.
Applications that reference the link_width_supported field
from struct _ib_port_attr will require a minor update if recompiled.
Update winverbs to report this value and fill in other
missing fields from the port attribute structure. This fix
allows reporting the correct values through the libibverbs
port and ibv_devinfo example utility.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2366 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Mon, 17 Aug 2009 23:17:41 +0000 (23:17 +0000)]
[IPoIB] IPoIB PXE boot support: Clear remainder of chaddr
The IPoIB PXE boot firmware (gPXE) now sends the 8-byte port GUID in
the DHCP chaddr field. WinOF replaces the first 6 bytes of chaddr
with the Ethernet-style MAC address, but leaves the remainder
untouched. This results in trailing garbage after the Ethernet-style
MAC in the modified chaddr.
Fix by explicitly zeroing the remainder of chaddr.
Signed-off-by: Michael Brown <mcb30@etherboot.org>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2364 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Sun, 16 Aug 2009 12:44:11 +0000 (12:44 +0000)]
[ND provider] This patch is a fix to 2333. It removes a facility to define MaxDataInlineSize from application, because it breaks MS API
[ND porvider] Improved latency of ND provider by using INLINE send. [winof: 2333, 2352]
This patch adds usage of INLINE DATA facility of Mellanox HCAs for improving latency of ND provider.
Here are the ideas of the patch:
- by default, ND provider will create QP with inline data of 160 bytes;
(this can enlarge user's QP size)
- one can change this default by defining environment variable IBNDPROV_MAX_INLINE_SIZE;
leonidk [Sun, 16 Aug 2009 12:40:46 +0000 (12:40 +0000)]
[ND provider] This patch is a fix to 2333. It removes a facility to define MaxDataInlineSize from application, because it breaks MS API
Improved latency of ND provider by using INLINE send
This patch adds usage of INLINE DATA facility of Mellanox HCAs for improving latency of ND provider.
Here are the ideas of the patch:
- by default, ND provider will create QP with inline data of 160 bytes;
(this can enlarge user's QP size)
- one can change this default by defining environment variable IBNDPROV_MAX_INLINE_SIZE;
stansmith [Thu, 13 Aug 2009 17:34:29 +0000 (17:34 +0000)]
[IPOIB] Prevent a BSOD which happens when restarting the opensm more than once (if the local endpoint was not in the lid_endpts list). signed off by stan.smith@intel.com & Tzachi Dar [tzachid@mellanox.co.il]
shefty [Mon, 10 Aug 2009 18:55:38 +0000 (18:55 +0000)]
winverbs/driver: fix check for IP version
merge commit 2339/2340
The IP version is in the upper 4 bits of an 8 bit field. It is set
correctly, but not ready out correctly. The result is that an IPv4
address reported to user space is listed as an IPv6 address instead.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2350 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 10 Aug 2009 18:49:25 +0000 (18:49 +0000)]
winverbs/driver: fix check for IP version (reapply overwritten commit)
The IP version is in the upper 4 bits of an 8 bit field. It is set
correctly, but not ready out correctly. The result is that an IPv4
address reported to user space is listed as an IPv6 address instead.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2348 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 10 Aug 2009 18:44:36 +0000 (18:44 +0000)]
winverbs/driver: change status for rejected connections
merge commit 2339
Complete connection requests with STATUS_CONNECTION_REFUSED rather
than STATUS_REQUEST_NOT_ACCEPTED for rejected connections. This aligns
the status value with ND.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2347 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 10 Aug 2009 18:43:51 +0000 (18:43 +0000)]
ibal/cm: allow RDMA writes for QP attributes by default
merge commit 2334
Enable remote RDMA writes as the default QP attributes for INIT
transitions. Previously, RDMA writes were only enabled if the CM
messages carried a responder resources > 0. However, responder
resources indicates whether RDMA reads/atomics should be enabled,
not RDMA writes.
Without this patch, users of winverbs that connect in-band that
want to perform RDMA writes without performing RDMA reads will
see QP errors when performing writes.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2346 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 10 Aug 2009 18:41:43 +0000 (18:41 +0000)]
libibverbs: add reference counts to track CQ events
merge commit 2323
We need to track CQ events to block destroying CQ objects until all outstanding events have been acknowledged. Otherwise, the caller could reference freed memory after calling ibv_get_cq_event.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2344 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 10 Aug 2009 18:40:06 +0000 (18:40 +0000)]
winverbs: fix cleanup in error handling cases
merge svn 2320 from trunk
Running the ndmw test results in a crash in the winverbs driver. The
crash is caused by improper cleanup in the winverbs driver as a result
of a failure trying to allocate a memory window.
In studying the crash, the same situation could arise if other objects
also fail to be created (QPs, CQs, PDs, etc.) To fix the crash and
simplify the code, explicit calls to used to increment the reference
count on referenced objects, rather than simply holding onto the
reference that was acquired when the object was validated. (The latter
is slightly more efficient, but results in less maintainable code
once any fix is applied.)
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2343 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 10 Aug 2009 17:22:32 +0000 (17:22 +0000)]
winverbs/driver: change status for rejected connections
Complete connection requests with STATUS_CONNECTION_REFUSED rather
than STATUS_REQUEST_NOT_ACCEPTED for rejected connections. This aligns
the status value with ND.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2341 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Sat, 8 Aug 2009 00:21:54 +0000 (00:21 +0000)]
winverbs/driver: fix check for IP version
The IP version is in the upper 4 bits of an 8 bit field. It is set
correctly, but not ready out correctly. The result is that an IPv4
address reported to user space is listed as an IPv6 address instead.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2340 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Sat, 8 Aug 2009 00:20:44 +0000 (00:20 +0000)]
winverbs/driver: change status for rejected connections
Complete connection requests with STATUS_CONNECTION_REFUSED rather
than STATUS_REQUEST_NOT_ACCEPTED for rejected connections. This aligns
the status value with ND.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2339 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Fri, 7 Aug 2009 19:47:44 +0000 (19:47 +0000)]
[ETC] The completion manager abstraction can hang during cleanup. The hang
occurs when the user calls CompManagerCancel before calling CompManagerClose,
and the user is not waiting for events. In this case, the completion manager
thread will pull the cancel request from the IO completion port and queue it
with the manager. When CompManagerClose is called, it calls CompManagerCancel
to signal the thread to check the running state. However, the completion
manager's event structure is still marked busy from the user's CompManagerCancel
call.
The result is that the completion manager thread does not receive the
signal to check the running flag and remains asleep. Fix this by using a
different completion entry to signal the thread during destruction than that
used to cancel a CompManagerPoll event.
This fixes occasional hangs running dapltest with both the rdma_cm and socket
cm providers.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2336 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Fri, 7 Aug 2009 18:49:07 +0000 (18:49 +0000)]
ibal/cm: allow RDMA writes for QP attributes by default
Enable remote RDMA writes as the default QP attributes for INIT
transitions. Previously, RDMA writes were only enabled if the CM
messages carried a responder resources > 0. However, responder
resources indicates whether RDMA reads/atomics should be enabled,
not RDMA writes.
Without this patch, users of winverbs that connect in-band that
want to perform RDMA writes without performing RDMA reads will
see QP errors when performing writes.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2335 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Fri, 7 Aug 2009 18:48:52 +0000 (18:48 +0000)]
ibal/cm: allow RDMA writes for QP attributes by default
Enable remote RDMA writes as the default QP attributes for INIT
transitions. Previously, RDMA writes were only enabled if the CM
messages carried a responder resources > 0. However, responder
resources indicates whether RDMA reads/atomics should be enabled,
not RDMA writes.
Without this patch, users of winverbs that connect in-band that
want to perform RDMA writes without performing RDMA reads will
see QP errors when performing writes.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2334 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Thu, 6 Aug 2009 17:13:25 +0000 (17:13 +0000)]
[ND provider] improved latency of ND provider by using INLINE send
This patch adds usage of INLINE DATA facility of Mellanox HCAs for improving latency of ND provider.
Here are the ideas of the patch:
- by default, ND provider will create QP with inline data of 160 bytes;
(this can enlarge user's QP size)
- one can change this default by defining environment variable IBNDPROV_MAX_INLINE_SIZE;
- an ND application, while creating QP, can define the necessary INLINE DATA size; this value takes precedence over the default one.
shefty [Wed, 5 Aug 2009 23:43:36 +0000 (23:43 +0000)]
libibverbs/comp_mgr: fix hang during destruction
The completion manager abstraction can hang during cleanup. The hang
occurs when the user calls CompManagerCancel before calling CompManagerClose,
and the user is not waiting for events. In this case, the completion manager
thread will pull the cancel request from the IO completion port and queue it
with the manager. When CompManagerClose is called, it calls CompManagerCancel
to signal the thread to check the running state. However, the completion
manager's event structure is still marked busy from the user's CompManagerCancel
call.
The result is that the completion manager thread does not receive the
signal to check the running flag and remains asleep. Fix this by using a
different completion entry to signal the thread during destruction than that
used to cancel a CompManagerPoll event.
This fixes occasional hangs running dapltest with both the rdma_cm and socket
cm providers.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2330 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Wed, 5 Aug 2009 23:43:10 +0000 (23:43 +0000)]
libibverbs/comp_mgr: fix hang during destruction
The completion manager abstraction can hang during cleanup. The hang
occurs when the user calls CompManagerCancel before calling CompManagerClose,
and the user is not waiting for events. In this case, the completion manager
thread will pull the cancel request from the IO completion port and queue it
with the manager. When CompManagerClose is called, it calls CompManagerCancel
to signal the thread to check the running state. However, the completion
manager's event structure is still marked busy from the user's CompManagerCancel
call.
The result is that the completion manager thread does not receive the
signal to check the running flag and remains asleep. Fix this by using a
different completion entry to signal the thread during destruction than that
used to cancel a CompManagerPoll event.
This fixes occasional hangs running dapltest with both the rdma_cm and socket
cm providers.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2329 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Tue, 4 Aug 2009 17:13:27 +0000 (17:13 +0000)]
[DAPL2] Fix socket CM completion handling and CNQ handling; Windows variants. Add #include <winsock2.h>
#include <ws2tcpip.h> for IPv4 & IPv6 user application support (VC env vs. WDK).
shefty [Sat, 1 Aug 2009 01:02:29 +0000 (01:02 +0000)]
netdirect/winverbs: fixes to run nd sample tests
Now that the WV ND provider can be installed, the ND sample tests can be run. This provides various fixes to get at least a couple of the sample tests running.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2324 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Sat, 1 Aug 2009 01:01:57 +0000 (01:01 +0000)]
libibverbs: add reference counts to track CQ events
We need to track CQ events to block destroying CQ objects until all outstanding events have been acknowledged. Otherwise, the caller could reference freed memory after calling ibv_get_cq_event.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2323 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Sat, 1 Aug 2009 00:51:05 +0000 (00:51 +0000)]
libibverbs: add reference counts to track CQ events
We need to track CQ events to block destroying CQ objects until all outstanding events have been acknowledged. Otherwise, the caller could reference freed memory after calling ibv_get_cq_event.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2322 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Sat, 1 Aug 2009 00:45:47 +0000 (00:45 +0000)]
netdirect/winverbs: fixes to run nd sample tests
Now that the WV ND provider can be installed, the ND sample tests can be run. This provides various fixes to get at least a couple of the sample tests running.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2321 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Running the ndmw test results in a crash in the winverbs driver. The
crash is caused by improper cleanup in the winverbs driver as a result
of a failure trying to allocate a memory window.
In studying the crash, the same situation could arise if other objects
also fail to be created (QPs, CQs, PDs, etc.) To fix the crash and
simplify the code, explicit calls to used to increment the reference
count on referenced objects, rather than simply holding onto the
reference that was acquired when the object was validated. (The latter
is slightly more efficient, but results in less maintainable code
once any fix is applied.)
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2320 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Running the ndmw test results in a crash in the winverbs driver. The
crash is caused by improper cleanup in the winverbs driver as a result
of a failure trying to allocate a memory window.
In studying the crash, the same situation could arise if other objects
also fail to be created (QPs, CQs, PDs, etc.) To fix the crash and
simplify the code, explicit calls to used to increment the reference
count on referenced objects, rather than simply holding onto the
reference that was acquired when the object was validated. (The latter
is slightly more efficient, but results in less maintainable code
once any fix is applied.)
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2319 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[ND] remove old, unused fake build folders and fake.c from the days before we could build ND from src. makefile.inc modified to reflect folder changes.
[WINOF] add new HPC example scripts; added new WIX include file to create %ProgramFiles(x86)%\WinOF\HPC install folder and HPC examples scripts; change wof.wxs to include ..\..\HPC\HPC.inc .