[ofw] [PATCH] Cancel queued UAL_CEP_GET_REQ_CID IRPs when the CEP is destroyed

Leonid Keller leonid at mellanox.co.il
Tue Jul 1 11:20:19 PDT 2008


Applied in 1316. 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, July 01, 2008 1:42 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] Cancel queued UAL_CEP_GET_REQ_CID IRPs 
> when the CEP is destroyed
> 
> This patch cancels all outstanding UAL_CEP_GET_REQ_CID IRPs 
> queued in a CEP when the CEP is destroyed.
> 
> Signed-off-by: Fab Tillier <ftillier at microsoft.com>
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\kernel\al_cm_cep.c trunk\core\al\kernel\al_cm_cep.c
> --- old\core\al\kernel\al_cm_cep.c      Mon Jun 30 14:50:58 2008
> +++ trunk\core\al\kernel\al_cm_cep.c    Mon Jun 30 15:25:38 2008
> @@ -4155,6 +4155,25 @@ al_destroy_cep(
>         /* Cancel any queued IRP */
>         __cep_complete_irp( p_cep, STATUS_CANCELLED, 
> IO_NO_INCREMENT );
> 
> +    while( !IsListEmpty( &p_cep->irp_que ) )
> +    {
> +        LIST_ENTRY* p_list_entry;
> +        IRP* p_irp;
> +
> +        // get IRP
> +        p_list_entry = RemoveHeadList( &p_cep->irp_que );
> +        p_irp = (PIRP)CONTAINING_RECORD( p_list_entry, IRP, 
> + Tail.Overlay.ListEntry );
> +
> +        // complete GetConnectionReq IRP #pragma warning(push, 3)
> +        IoSetCancelRoutine( p_irp, NULL ); #pragma warning(pop)
> +
> +        p_irp->IoStatus.Information = 0;
> +        p_irp->IoStatus.Status = STATUS_CANCELLED;
> +        IoCompleteRequest( p_irp, IO_NETWORK_INCREMENT );
> +    }
> +
>         __unbind_cep( p_cep );
>         ref_cnt = __cleanup_cep( p_cep );
>         KeReleaseInStackQueuedSpinLock( &hdl );
> 



More information about the ofw mailing list