[ofw] [PATCH] Return timeout when a connection request times out

Leonid Keller leonid at mellanox.co.il
Wed Jul 2 05:49:30 PDT 2008


Applied in 1325. Thank you. 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Fab Tillier
> Sent: Wednesday, July 02, 2008 1:43 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] Return timeout when a connection 
> request times out
> 
> The current connection establishment code will return 
> STATUS_HOST_UNREACHABLE when an SA operation times out.  This 
> patch returns STATUS_TIMEOUT if the SA query timed out, which 
> tends to happen in larger clusters quite often.
> 
> Signed-off-by: Fab Tillier <ftillier at microsoft.com>
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\core\al\kernel\al_ndi_cm.c trunk\core\al\kernel\al_ndi_cm.c
> --- old\core\al\kernel\al_ndi_cm.c      Tue Jul 01 15:14:31 2008
> +++ trunk\core\al\kernel\al_ndi_cm.c    Tue Jul 01 15:13:19 2008
> @@ -962,7 +962,16 @@ err_irp_complete:
>         h_qp->p_irp_que->state = NDI_CM_IDLE;
>         /* the IRP "has" 2 QP references, taken in __ndi_ats_query */
>         if ( h_ioctl )
> -               __ndi_complete_irp( h_qp, h_ioctl, 
> STATUS_HOST_UNREACHABLE );
> +    {
> +        if( p_query_rec->status == IB_TIMEOUT )
> +        {
> +                       __ndi_complete_irp( h_qp, h_ioctl, 
> STATUS_TIMEOUT );
> +        }
> +        else
> +        {
> +                       __ndi_complete_irp( h_qp, h_ioctl, 
> STATUS_HOST_UNREACHABLE );
> +        }
> +    }
>         deref_al_obj( &h_qp->obj );     /* release IRP SA reference */
> 
>  exit:
> @@ -1043,9 +1052,18 @@ __ndi_ats_query_cb(
>         h_ioctl = IoCsqRemoveNextIrp( &h_qp->p_irp_que->csq, NULL );
>         if( !h_ioctl || p_query_rec->status != IB_SUCCESS || 
> !p_query_rec->result_cnt )
>         {
> +        NTSTATUS status;
> +        if( p_query_rec->status == IB_TIMEOUT )
> +        {
> +            status = STATUS_TIMEOUT;
> +        }
> +        else
> +        {
> +            status = STATUS_HOST_UNREACHABLE;
> +        }
>                 h_qp->p_irp_que->state = NDI_CM_IDLE;
>                 if ( h_ioctl )
> -                       __ndi_complete_irp( h_qp, h_ioctl, 
> STATUS_HOST_UNREACHABLE );
> +                       __ndi_complete_irp( h_qp, h_ioctl, status );
>                 deref_al_obj( &h_qp->obj );     /* release 
> IRP SA reference */
>                 cl_free( p_req );
>                 goto exit;              /* ATS request failed */
> 



More information about the ofw mailing list