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

Fab Tillier ftillier at windows.microsoft.com
Tue Jul 1 15:42:33 PDT 2008


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 */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nd_sa_timeout.patch
Type: application/octet-stream
Size: 1526 bytes
Desc: nd_sa_timeout.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080701/08f5f684/attachment.obj>


More information about the ofw mailing list