winverbs.sys: optimize obtaining references on parent objects
When converting from userspace ID's into kernel handles, a reference
is taken on the kernel handles to protect against destruction. If
an object is created that references a parent object, instead of
acquiring a new reference on the parent, simply keep the existing
reference. This avoids acquiring two references on an object, then
needing to release one.
This slightly optimizes CQ, SRQ, PD, MW, and AH creation. QP creation
already contained this optimization.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1076 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
winverbs.sys: add initial support for CQ, SRQ, and QP
This adds the starting implementation for CQ, SRQ, and QP support.
Some code is restructured to relocate functions to different source
files. This makes them easier to find and allows other functions to
become static.
The kernel driver now implements all synchronous verb related routines.
The code is compile tested only, and does not yet implement any
asynchronous routines (ones that involve the use of OVERLAPPED operations).
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1075 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[MLX4] bugfix: prototypes of data path functions should take IBAL handles (QP, SRQ, CQ) and not simple pointers. Today handle is a long pointer, which causes incorrect work of MLX4U.DLL on x86 platform.
[MLX4] bugfix for x86 user only: export uvp_get_interface directly. Otherwise linker exports _uvp_get_interface@4 and IBAL fails to get UVP interface and proceeds to work w/o UVP, which causes crashes in kernel.
[WinVerbs] KMDF bus - continued IB bus driver simplification efforts:
migrated complib & ibal .dll installs into ib_al driver .inf; logical grouping
added todo.txt replacing overloaded brain so I don't forget.
added IBAL interface query as ibal is now a separate driver in the HCA device stack.
[WinVerbs]
core/bus/kmdf - IB Bus (KMDF) skeleton - driver in HCA driver stack; not co-installed by mthca
al/user/SOURCES - mods to build in DDK/WDK
complib/user/SOURCES - mods to build in DDK/WDK
core/bus/iou - IB I/O Unit driver, KMDF version, in HCA driver stack.
Provide the kernel driver framework for WinVerbs. The driver uses the KMDF
(kernel mode driver framework) and builds using the WDK.
The driver loads as an upper filter driver for InfiniBandHca class drivers.
It responds to standard PnP device add/remove device requests to track available
HCAs in the system.
A user interface is exposed through a single control device.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1035 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
[DAPL,DAPL2]
Make DAPL & DAPL2 build correct in DDK or WDK environments
DAPL2 dtest & dtestx - remove explicit SDK_INC_PATH in SOURCES file, not required.
shefty [Fri, 21 Mar 2008 03:28:30 +0000 (03:28 +0000)]
winverbs: move userspace include file out of common wv_ioctl header
Move #include <winioctl.h> out of wv_ioctl.h. winioctl.h is needed to build the userspace library, but results in build errors if included by the winverbs driver.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1008 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Thu, 20 Mar 2008 07:32:55 +0000 (07:32 +0000)]
winverbs: provide initial implementation for userspace verb calls
Verb related code is complete for UVP supported functionality, but basically only compile tested. (Kernel component is still needed.) Only verb related calls are coded: CQ, SRQ, QP, PD, AH, MR, etc. Communication management calls (Listen, Endpoints) are not done.
This is a very base implementation with not debugging support added yet, and almost no error checking.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@998 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Thu, 20 Mar 2008 07:15:54 +0000 (07:15 +0000)]
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 new interface is moved to version 3, and the Mellanox UVP is updated to support interfaces 1-3. 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.
To minimize changes to the uvp, a new uvp_wc_t structure is defined that can be cast to the existing ib_wc_t structure. An existing poll_cq_array routine is exposed for retrieving the work completions, which matches up with the WinVerbs CQ::Poll() routine.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@997 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Thu, 20 Mar 2008 06:49:41 +0000 (06:49 +0000)]
uvp/get_interface: add new interface to get versioned uvp functions
Add a new call, uvp_get_interface_n(version, p_interface, sizeof(*p_interface)) that users can call to retrieve a specific interface that is supported by a uvp. With the introduction of NDI and WinVerbs support, the uvp_interface structure changes. Support for interface versioning will allow future changes to UVPs independent of IBAL and WinVerb changes and from each other.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@996 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Thu, 20 Mar 2008 06:34:19 +0000 (06:34 +0000)]
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 current pre_create_av() and pre_destroy_av() uvp implementation can both return IB_VERBS_PROCESSING_DONE, but require that IBAL still call post_create_av() and post_destroy_av(). Fix the 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@995 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
shefty [Thu, 20 Mar 2008 05:21:04 +0000 (05:21 +0000)]
openib.def: add default values for required build settings
To build the WinOF stack, the user must specify two environment settings. Provide default values for those settings. The user can still override the values by specifying their own.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@994 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
stansmith [Wed, 12 Mar 2008 17:17:19 +0000 (17:17 +0000)]
[mthca-kmdf] rever to original mthca file structure so other will not be confused by KMDF additions and know where to find functions [DriverEntry] for instance is still in hca_driver.c