[ofw] [PATCH] Fix UAL_NDI_NOOP handling

Fab Tillier ftillier at windows.microsoft.com
Mon Aug 11 14:20:17 PDT 2008


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 at microsoft.com>

Index: core/al/kernel/al_proxy_ndi.c
===================================================================
--- core/al/kernel/al_proxy_ndi.c       (revision 1408)
+++ core/al/kernel/al_proxy_ndi.c       (working copy)
@@ -614,10 +614,15 @@ ndi_ioctl(
                cl_status = __ndi_dreq_cm( p_context, h_ioctl, p_ret_bytes );
                break;
     case UAL_NDI_NOOP:
+        IoMarkIrpPending( h_ioctl );
         if( cl_ioctl_in_size( h_ioctl ) != 0 )
-            cl_status = STATUS_TIMEOUT;
+            h_ioctl->IoStatus.Status = STATUS_TIMEOUT;
         else
-            cl_status = CL_SUCCESS;
+            h_ioctl->IoStatus.Status = CL_SUCCESS;
+        h_ioctl->IoStatus.Information = 0;
+
+        IoCompleteRequest( h_ioctl, IO_NETWORK_INCREMENT );
+        cl_status = CL_PENDING;
         break;
        default:
                cl_status = CL_INVALID_PARAMETER;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noop.patch
Type: application/octet-stream
Size: 848 bytes
Desc: noop.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080811/e92bfffe/attachment.obj>


More information about the ofw mailing list