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 .
DAPL introduced the concept of directly waiting on the CQ for
events by adding a compile time flag and special handling in the
common code. Rather than using the compile time flag and modifying the
common code, let the provider implement the best way to wait for
CQ events.
This simplifies the code and allows the common openib providers to
optimize for Linux and Windows platforms independently, rather than
assuming a specific implementation for signaling events.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2310 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[DAPL2] Implement a malloc() threshold for the completion reaping byte vector allocation in functions:
DT_handle_send_op, DT_handle_rdma_op & DT_handle_recv_op.
When allocation size is under the threshold, use a stack local allocation instead of malloc/free.
Move redundant bzero() to be called only in the case of using local stack allocation as DT_Mdep_malloc() already does a bzero().
Consolidate error handling return and free()check to a single point by using goto.
Signed-off-by: Stan Smith <stan.smith@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2305 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[MLX4] added new Registry parameter for number of FC_EXCHs and added a sanity check, that the number of reserved QPs is less then all requested QPs. [mlnx: 4562]
It came to fix a bug: if the number of reserved QPs is greater then the number of QPs requested, the bug causes eventual allocation of reserved QPs, which is forbidden.
The bug happened due two reasons:
- absense of sanity check, comparing reserved and total number of QPs;
- a large built-in number of FC_EXCH QPs, which are not in use at all today.
The patch replaces the built-in value to Registry taken one and set it to O.
It also changes the number of MACs from 1 to 0 for there is no need in reservation for MACs.
[MLX4] 1) added support for sending large multi-parameter messages to System Event Log. [mlnx: 4561]
2) improved the wording of several most popular messages.
To print to Event Log, one has to use the new function WriteEventLogEntryData().
[WinOF] Remove disucssions for Server 2003 & XP w.r.t. selecting HCA device driver to hardware - DIFxApp/PNP simplifies and unifies HCA selection; user selects HCA vendor; Mellanox is the default.
[DAPL2] fix a problem in socket-cm with FD_SETSIZE not being uniformly defined. Add UD test options to dtestcm. Use correct -D flags argument in dt-svr.bat, do not be silent in dt-cli stop as errors were discarded. Use trunk\etc\user\gtod.c for 'gettimeofday()' function.
leonidk [Sun, 28 Jun 2009 08:37:31 +0000 (08:37 +0000)]
[IBAL] remove unnecessary query_qp request during modify_qp
HCA API of modify_qp contains an optional parameter of qp_attr.
If it is coded, modify_qp makes internally a query_qp request to low-level driver and returns QP attributes.
IBAL codes this parameter, but do not use the returned QP attributes.
It causes unnecessary query_qp request to low-level driver and possible racy scenarios.
stansmith [Wed, 24 Jun 2009 19:11:33 +0000 (19:11 +0000)]
[WinOF] Make installs with NODRV=1 work as expected: *.wxs files observe NODRV as does customactions.vbs.
Consolidate standard 'features' into a single include file; XP non-support issues handled via WIX #ifdef's.
shefty [Wed, 24 Jun 2009 17:55:07 +0000 (17:55 +0000)]
etc/dlist: eliminate dlist.c
dlist.c only contains 2 functions. Remove it and implement the
functions inline in the header file. This simplifies the use of
dlist and matches the implementation of linux list.h.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2264 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Mon, 22 Jun 2009 20:49:46 +0000 (20:49 +0000)]
[WinOF] remove DPInst.exe from SVN tree as svn.2261 etc\makebin.bat mods now copy DPInst.exe from WDK tree. Bottom line - having DPInst.exe in our svn tree was a poor choice on my part.
stansmith [Mon, 22 Jun 2009 20:45:17 +0000 (20:45 +0000)]
[WinOF] Use DIFxApp (Driver Install Frameworks for Applications) to install drivers instead of home-grown CustomActions using devman or dpinst.exe. DIFxApp mods resulted in rearranging WIX src files into separate as DIFxApp can not tolerate multiple .inf files in a single directory.
The big win is to use WDK supplied driver install functions which then allows all supported OS flavors to use the Driver Store which results in the user not having to choose which HCA model to install (specifically Server 2003 & XP); The 'default' driver choice is Mellanox HCA.
stansmith [Sat, 20 Jun 2009 23:18:13 +0000 (23:18 +0000)]
[WINOF] Change makebin.bat to expect a full pathname for the DDK root instead of just a DDK version; support those who install WDK in non-standard location.
leonidk [Wed, 17 Jun 2009 13:47:59 +0000 (13:47 +0000)]
[MLX4] return different MLX4 bus locations for several cards in multi-homed machine. [mlnx: 4468]
One can see on multi-homed computers, that mlx4_bus creates all its children (mlx4_hca, IPoIB et al) with built-in location string "MLX4 Bus 0" which complicates differentiation between them.
This patch makes mlx4_bus to return a location string of the structure "MLX4 bus x, device y, function z", where x,y,z is HCA card's PCI bus location.