stansmith [Fri, 15 Aug 2008 17:25:56 +0000 (17:25 +0000)]
[ND] added XP_x86 binaries to fake build env.
renamed objfre_svr* --> fre_svr* to make it easier to identify ND binary folders from build generated folders.
leonidk [Thu, 14 Aug 2008 18:45:08 +0000 (18:45 +0000)]
[MLX4] some fixes to support the mixed IB/Eth mode. (mlnx: 2947,2949)
The only mixed configuration, supported now, is port1-IB, port2-Eth.
To work with it one has to burn FW with parameter 'dpdp_en=true' in INI file, for example MHGH28-XSC_A4-A5.ini.
ib_query_ca returns now the number of IB- and not physical ports. So VSTAT will show only one port and IBBUS will create only one IPoIB adapter.
shefty [Wed, 13 Aug 2008 19:31:04 +0000 (19:31 +0000)]
The mlx4 hca driver should install as an InfiniBandHca class driver,
rather than inventing its own class. This allows filter drivers to
reside above both the mthca and mlx4 drivers.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1481 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
leonidk [Tue, 12 Aug 2008 08:23:29 +0000 (08:23 +0000)]
[IBAL] Fix UAL_NDI_NOOP handling
The NOOP IOCTL allows the ND provider to complete requests asynchronously when a synchronous operation completes in user-land. This is used for memory registration and deregistration, as well as for connection establishment when ARP resolution is in progress (IBAT returns E_PENDING) in the NetworkDirect provider. In the latter case, the expectation is that the IOCTL will complete asynchronously with STATUS_TIMEOUT. However the code processes the IOCTL synchronously, so the IOCTL fails with an immediate error rather than an asynchronous error.
This patch completes the IRP so that it's completion will be reported asynchronously.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1479 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Mon, 11 Aug 2008 16:17:04 +0000 (16:17 +0000)]
mlx4: add winverbs support
Export the mlx4 channel interface via PnP query interface calls. This allows the driver to export its channel interface to multiple drivers, such as WinVerbs.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1477 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Sat, 9 Aug 2008 00:11:54 +0000 (00:11 +0000)]
[ND] add fake ND build support; to be removed when ND src hits svn.
trunk/BuildRelease.bat
Turn down tracing volume
New Commands: assist in handling large # of WinOF installers.
msi-label {tag}
rename .msi files to WOF_os*_arch*tag; frequently svn version #
msi-del
delete .msi installers containing this tag
msi-dir
directory listing of current WinOF .msi installers
trunk\ulp\nd
dirs - added user to the build
user\ - ugly hack until ND sources show up in svn - pending legal issues with MS
SOURCES
fake.c
makefile
makefile.inc
objfre_svr-03_amd64 - ND binaries from Mellanox
objfre_svr-08_amd64
objfre_svr-03_x86
objfre_svr-08_x86
objfre_svr-08_ia64 - side-steps ia64 ipoib.cdf & ipoib.inx install issues; actually x64 copies.
trunk\ulp\ipoib\kernel
ipoib32.cdf - support ND signing for 32 bit systems
ipoib32-xp.cdf - support XP32 signing
ipoib.cdf - ND signing
netipoib.inx - ND install
netipoib-xp32.inf - XP32 install, no WSD/ND
stansmith [Wed, 6 Aug 2008 21:08:11 +0000 (21:08 +0000)]
[IBBUS] fixed duplicate bus relations reporting, which also fixed the problem of a required reboot. Now the IB stack can be uninstalled and installed without requiring a reboot.
leonidk [Mon, 4 Aug 2008 16:18:23 +0000 (16:18 +0000)]
[MLX4] added HCA Soft Reset mechanism (used by Ethernet interface so far)
Soft Reset here is HCA re-initialization without bus driver reloading.
A reset can be initiated by clients (mlx4_eth, mlx4_hca) and/or driver (mlx4_bus).
Driver issues reset upon card fatal error, which prevents the following work with the card.
Clients may request the reset at any moment upon their will.
Clients have to register event callback after getting bus interface.
When a reset event comes, the bus driver will:
- bar the following work with card, returning –EFAULT to all, but destroy_xx, commands;
- reset the card to stop incoming traffic (only in case of client-initiated reset);
- notify all registered clients about pending reset.
Getting this notification clients have to:
- wait for all issued commands to end;
- reset its own clients, if any, and bar their work;
- release all the device resources, they were using till now;
- send “I’m reset-ready” notification to the bus driver;
The driver starts to perform device reset only after receiving the “I’m reset-ready” notifications from all the registered clients. It re-initializes the device and notifies all the clients.
Having received this notification, clients have to:
- dereference the old bus interface;
- get the new interface from bus driver;
- register new event handler;
- resume/restart itself;
- wake up its own clients, if any;
Mellanox HCA cards do not have Power Management support so far.
So MLX4 driver resets the card on power-down and starts its back on power-up.
Pay attention, one can go to Standby/Hibernate only when there is no running IB applications (including WSD).
Otherwise he will get an error window with a message like: "Driver mlx4_hca.sys refuses to go Hibernate/Standby".
MTHCA driver behaves upon Hibernate/Standby the same way.
leonidk [Sun, 3 Aug 2008 08:44:29 +0000 (08:44 +0000)]
[OPENSM] adjust OPENSM to changed types of the stack.
To recall, OPENSM uses it's own pair of files ib_types.h/ib_types_extended.h instead of the stack's ib_types.h.
So all the changes of 'trunk\inc\iba\ib_types.h' should be repeated in the OPENSM's files.
[HW] The patch add version stamping to mlx4_bus and mlx4_hca. [MLNX: 2871] Signed-off-by: Reuven Amitai <reuven@mellanox.co.il>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1451 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
libibverbs/tests: fix buffer overrun issue that caused random connection failures
libibverbs tests occasionally had failures connecting over sockets in order to exchange QP information. (The ping-pong tests failed more than the perftests.) The failure was caused by copying a port number into a buffer that was too small, then using it to look up an address. Increase the size of the buffer and make sure that it's NULL terminated.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1447 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
uvp/av: change create/modify calls to take SGID index
The uvp requires the SGID index to create/modify address handles.
Modify the API and UVPs to take the SGID index as input. This avoids
the UVP needing to cache the CA attributes, which can lead to accessing
a stale GID table. The SGID index is passed into the UVP through the
resv1 field of the GRH.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1444 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Modify the channel interface to allow clients to register different
event handlers. This is in addition to the event handler specified when
opening the channel adapter. The latter can be replaced in a subsequent
patch, but is left as is to minimize changes.
This change allows the channel interface to support multiple direct
call clients, such as winverbs and ibal.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1443 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
uvp/av: complete all processing in pre_create/destroy_av() calls
According to the documentation, if a UVP returns IB_VERBS_PROCESSING_DONE
from a pre() IOCTL call, then all verbs related processing has completed.
The mthca pre_create_av() and pre_destroy_av() uvp implementation can
both return IB_VERBS_PROCESSING_DONE, but requires that users still call
post_create_av() and post_destroy_av(). Fix the mthca UVP to complete all
processing in the pre() IOCTL calls when returning IB_VERBS_PROCESSING_DONE,
and update IBAL to remove unnecessary post() IOCTL calls.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1442 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
The UVP controls the ci_umv_buf, but does not allocate the p_inout_buf if it
is non-zero. However, the uvp frees the buffer later. It should always
allocate the buffer, since the caller does not know the required size and
cannot allocate it on the uvp's behalf. This avoids an unneeded
initialization by the caller, and the if check by the uvp.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1441 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
verbs: optimize work request/completion structures
Change work completion types to quickly allow a user to determine if a
completions is for a send or receive. Align work request and work
completion type values to be the same for consistency.
Update work request structure to avoid unnecessary internal padding and
allocating extra unused space for pointers and structures that can be
part of a union. Arrange structure layout to allow casting between
the UVP, IBAL, WinVerbs, and libibverbs work requests.
Update debug print functions to match changes.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1440 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
The current uvp_get_interface() routine takes a structure as input.
Included in the structure is a version number.
A better solution to supporting multiple interfaces is to define
interfaces using GUIDs. This not only allows different versions of
the same interface (for example the UVP interface), but also provides
a mechanism that can be used to add new interfaces without affecting
existing ABIs or APIs.
This will make it easier to extend the existing interfaces in the future.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1438 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Allow polling for a list of work completions using an array of
completion structures, rather than a linked list. This avoids needing
to walk the list to link the structures together before calling poll,
which is a fast path operation.
A new completion structure is added that provides the qp_context
associated with a completion. This avoids changes to the existing
ULPs, while taking advantage of the underlying UVP capabilities.
Providing the qp_context is useful when dealing with SRQ.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1437 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
uvp/interface: add support for reporting QP context in WCs
Extend the uvp_interface to include support for reporting the QP context in
work completions. The required changes are to allow specifying a qp_context
in the pre_create_qp() IOCTL call, and reporting the qp_context through the
work completion structure.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1436 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
The underlying hardware drivers both support setting callbacks on a per
widget (CQ, QP, or SRQ) basis, but the verbs interface only allows one
global event handler and one completion handler for the HCA. Modify the
verbs interface to allow setting events callbacks directly on the HCA
objects. This allows the HCA to support multiple consumers of its
interface, and users can optimize their event handling based on the call.
For example, the HCA drivers can invoke callbacks directly to the ULPs
without the calls first being filtered by IBAL. This will improve
completion event reporting.
To minimize changes to the existing stack, the current event handler is
used for all events, regardless of type. Optimizations are left for a
separate patch.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1435 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Removing false Prefast alarms by:
Adding __analysis_assume() to ASSERT when DBG and _PREFAST_ are used for use in all the WinOF tree.
Adding __pragma(warning(suppress:6326)) to suppress constants compare warning (performance decrease is acceptable since this is chked code/ heavy windows event logging.
Signed by:Doron Tsur
[HW, TOOLS] Improve VSTAT output in case of a driver startup failure. [MLNX: 2819]
When low level drivers fail on startup, which usually happens upon an incorrect FW, they report to all the above stack a dev_id of the burning device ("livefish") and imitate such a device thereafter. It was done in order to allow to all the upper level drivers to start their work.
VSTAT shows in this case the dev_id of a "livefish", which is a bit misleading.
This patch fixes this behavior. VSTAT will now show the real dev_id. The drivers still imitate the "livefish" device. The detailed message about the startup failure can be found in System Event Log (as it always was).
[MLX4] added a possibility to register event handler with MLX4_BUS driver. [MLNX:2786]
It is an extension of the Ethernet interface of mlx4_bus driver.
The mlx4_eth handler is called on DPC level upon asynchronous events like PORT_UP/PORT_DOWN, passing event data and the callback context parameter, set upon registration.
uvp/av: change create/modify calls to take SGID index
The uvp requires the SGID index to create/modify address handles.
Modify the API and UVPs to take the SGID index as input. This avoids
the UVP needing to cache the CA attributes, which can lead to accessing
a stale GID table. The SGID index is passed into the UVP through the
resv1 field of the GRH.
This adds the patch to make this change.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1420 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[WinOF] buildrelease no longer contains uglt hack to work around XP32 WSD build problems.
Added a 2nd cmd line arg to set OPENIB_REV value when building installers. Fix eliminates folder structure dependency, making the script more useful to a wider audience.
[DAPL2] DAPL2 debug cleanup, along with patches to IBAL provider to correctly handle accept side private_data.
Fixed the async QP & CQ error handlers as they had not been updated with latest typedef's (ib_async_qp_handler_t & ib_async_cq_handler_t), hence calling arg mismatch vs. handling definitions. Resulted in bad EP pointer dereference during Async QP error handling.
Added debug value DAPL_DBG_EVD_DEQUEUE to throttle debug output when watching EVD dequeue operations.
The SGID index can change dynamically, so look up the correct index when creating an address vector. The index is passed into the UVP in the resv2 field of the grh.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1416 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
winverbs: change WV_GRH structure to simplify the interface
Separate out the bit fields in the WV_GRH structure to make using it easier to use. Change the structure name to avoid confusion with an actual IB GRH.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1409 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] This patch fixes the build error due to CSQ use for XP builds. Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1408 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[WinOF] for XP32 builds, place holder files (until someone comes up with a better plan) utilized by makebin to cover the case of WSD not available for XP32. netipoib-xp32.inf intentionally contains 64 bit sections as to minimize differences between it and netipoib.inf file.
[IBAL] Limit time spent at DISPATCH_LEVEL when processing MADs.
In working with some switch SMs, I found that under stress the QP0 MAD processing could get delayed by eternal QP1 MAD processing (from hitting the SA for path queries). This caused the SMs to remove the node from the fabric (multicast group membership, etc) because it appeared unreachable.
This patch adds a DPC for QP0 and QP1 to the SMI, and limits the SMI to processing 16 MADs before re-queueing the DPC to the DPC queue.
Because QP0 processing is crucial to the fabric operating properly, the QP0 DPC is set to high importance so that it always gets queued to the front of the DPC queue, pre-empting any QP1 processing (among other things).
In any case, with this patch all my changes have now been mailed to the list.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1393 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Warning C4826 warns you if you have signed pointer extension when a 32-bit pointer is extended to 64-bits. This patch turns the warning on by default (for any users of complib), and fixes all instances of problematic code. It also eradicates __ptr64 usage from the Qlogic VNIC driver.
Code affected:
- IBAL
- MTHCA
- MLX4
- QLGCVNIC
Note that I didn't change DAPL because it's licensed under the CPL and not BSD. So someone else will have to fix that. In fact, DAPL should probably just go back into the SourceForge project rather than being duplicated everywhere. Code in the WinOF SVN should be BSD only according to the contributor's agreement.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1392 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
The UAL_NDI_NOOP IOCTL handler was added to allow memory registration in user-mode to notify a client using an I/O completion port. This patch extends the functionality to allow the IOCTL to return either STATUS_SUCCESS or STATUS_TIMEOUT. The STATUS_TIMEOUT facility is used by the NetworkDirect provider when IBAT returns pending. It's crude, but gets the job done.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1391 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] Fix TO_LONG_PTR use in IOCTLs. Re-applied 1387 patch.
Some IOCTLs transfer API structures with embedded pointers. These embedded pointers use the TO_LONG_PTR macro to pad everything out so that __ptr64 isn't used. The idea here is fine, but the change to eliminate the __ptr64 was riddled with problems that weren't caught by the find/replace brute force code changes.
Oops, the mem_create in the IOCTL buffer was overwritten with the caller's structure, which may have uninitialized padding. This isn't subsequently cleared, effectively defeating the purpose of the memclr.
Ah, close but not quite - you have the assignment, but it only assigns the pointer part of the TO_LONG_PTR union. The padding is still a copy of the user's structure, potentially giving an invalid handle in the kernel. All uses of HDL_TO_PTR were eliminated as they didn't actually accomplish anything.
This patch fixes this, and always uses the 'padding' field of the TO_LONG_PTR union so that the value is always fully set.
There's also a bug fixed in UD work requests that get sent via IOCTL - the AV handle was never swizzled to its appropriate kernel handle.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1390 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] Remove TO_LONG_PTR from IOCTL structures. Re-applied 1386 patch with out SMI changes.
This patch removes all instances of TO_LONG_PTR from internal IOCTL structures. The only place TO_LONG_PTR should be used is in public structures that contain pointers and are exchanged between user-mode and kernel-mode. Actually, the code should ideally have proxy structures for such API structures into which API structure members
are copied member-wise, and whose size is fixed. Unused pointers should be stripped from the IOCTL proxy structures. But that's a change for some other time...
All fields in internal IOCTL structures that were formerly TO_LONG_PTR are not uint64_t, and all uses have appropriate casts.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1389 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Some IOCTLs transfer API structures with embedded pointers. These embedded pointers use the TO_LONG_PTR macro to pad everything out so that __ptr64 isn't used. The idea here is fine, but the change to eliminate the __ptr64 was riddled with problems that weren't caught by the find/replace brute force code changes.
Oops, the mem_create in the IOCTL buffer was overwritten with the caller's structure, which may have uninitialized padding. This isn't subsequently cleared, effectively defeating the purpose of the memclr.
Ah, close but not quite - you have the assignment, but it only assigns the pointer part of the TO_LONG_PTR union. The padding is still a copy of the user's structure, potentially giving an invalid handle in the kernel. All uses of HDL_TO_PTR were eliminated as they didn't actually accomplish anything.
This patch fixes this, and always uses the 'padding' field of the TO_LONG_PTR union so that the value is always fully set.
There's also a bug fixed in UD work requests that get sent via IOCTL - the AV handle was never swizzled to its appropriate kernel handle.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1387 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
This patch removes all instances of TO_LONG_PTR from internal IOCTL structures. The only place TO_LONG_PTR should be used is in public structures that contain pointers and are exchanged between user-mode and kernel-mode. Actually, the code should ideally have proxy structures for such API structures into which API structure members
are copied member-wise, and whose size is fixed. Unused pointers should be stripped from the IOCTL proxy structures. But that's a change for some other time...
All fields in internal IOCTL structures that were formerly TO_LONG_PTR are not uint64_t, and all uses have appropriate casts.
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1386 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[IBAL] Remove PD context from IOCTLs.
IBAL's ib_query_qp and ib_query_mw IOCTLs return the PD context in the output IOCTL buffer. It is however never referenced.
This patch removes the fields (which had been changed to TO_LONG_PTR).
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1385 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
Part of cleaning up the __ptr64 stuff properly - rather than use the TO_LONG_PTR in the ci_umv_buf_t structure, use uint64_t.
The problem with using TO_LONG_PTR in structures that are exchanged between 32-bit clients and 64-bit drivers is that care must be taken to ensure that the upper 'padding' bytes are cleared properly.
Making the field a uint64_t makes it fool proof (though it does require casting, but at least the compiler will trap errors unlike for the padding.)
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1384 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86