[ofw] using winOFED from Kernel mode driver and / or winOF 4.2 from Mellanox

Deepak Rawal Deepak_Rawal at symantec.com
Wed Jun 26 12:12:56 PDT 2013


Hello,

I am attempting to use winverbs (winOF 4.2 Mellanox release for windows 2012), from a kernel mode NDIS protocol test driver.  Initialization code for connection to "device\winverbs" is listed:

       status = IoGetDeviceObjectPointer (&wvDevName, FILE_READ_ACCESS, &pwvFileObj, &pwvDevObj);

       KeInitializeEvent (&wvEvent, NotificationEvent, FALSE);
       pIrp = IoBuildDeviceIoControlRequest (WV_IOCTL_GUID_QUERY, pwvDevObj, NULL, 0, gl, sizeof(gl),
              TRUE, &wvEvent, NULL);

       pwvIrpStack = IoGetNextIrpStackLocation(pIrp);
       pwvIrpStack->FileObject = pwvFileObj;
       status = IoCallDriver(pwvDevObj, pIrp);

       while (status == STATUS_PENDING) {
              waitEvent.QuadPart = -10*1000; // 1 ms
              waitStatus = KeWaitForSingleObject(&wvEvent, Executive, KernelMode, FALSE, &waitEvent);
              status = pIrp->IoStatus.Status;
              if (NT_SUCCESS (waitStatus)) {
                     DEBUGP (DL_EXTRA_LOUD, ("winverbsInit - 1 ms wait status=%#lx\n", status));
              } else {
                     DEBUGP (DL_ERROR, ("winverbsInit - 1 ms wait failed error %#lx, IRP status=%#lx\n", waitStatus, status));
              }
       }

       if (status != STATUS_SUCCESS) {
              DEBUGP(DL_ERROR, ("winverbsInit - WV_IOCTL_GUID_QUERY failed %#lx\n", status));
       }

This code fails - STATUS_INVALID_DEVICE_REQUEST.
(building with  <wv_ioctl.h> from win OFED 3.2 RC3 release,  since winverbs.h provided with Mellanox winOF SDK is aimed at user mode)

Question:

-          Is winverbs interface supported from kernel mode?  Is it only supported with winOFED distribution and not by Mellanox? (i.e. above code should work on windows 2008 r2 and also when win OFED 3.3 is available?).

-          What is the recommended interface to use from kernel mode drivers - winverbs, complib & ibal that statically link into the driver?  (Any other options ?).

-          Any sample code for using rdma from kernel mode (windows)?  (Looking into ipoib.sys code, test tools from winOFED 3.2 RC3, with goals to build for win 8)

Any help and suggestions are appreciated - thanks in advance.

Thanks,
Deepak Rawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130626/98eeadc6/attachment.html>


More information about the ofw mailing list