[ofw] [PATCH] Fix UAL_NDI_NOOP handling
Leonid Keller
leonid at mellanox.co.il
Tue Aug 12 01:24:01 PDT 2008
Applied in rev. 1479. Thank you.
> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Fab Tillier
> Sent: Tuesday, August 12, 2008 12:20 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] 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 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;
>
More information about the ofw
mailing list