[ofw] [PATCH] Destroy the CEP sooner in ndi_dreq_cm

Leonid Keller leonid at mellanox.co.il
Wed Jul 2 05:23:56 PDT 2008


Applied in 1323. 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:10 AM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] Destroy the CEP sooner in ndi_dreq_cm
> 
> The current ndi_dreq_cm function destroys the CEP after the 
> QP is moved to the error state.  The CEP should be destroyed 
> first to send the DREQ before changing the QP state.
> 
> 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:07:15 2008
> +++ trunk\core\al\kernel\al_ndi_cm.c    Tue Jul 01 15:07:30 2008
> @@ -1526,6 +1526,17 @@ ndi_dreq_cm(
>                 goto exit;
>         }
> 
> +       cid = cl_atomic_xchg( &((al_conn_qp_t*)h_qp)->cid, 
> + AL_INVALID_CID );
> +
> +       if( cid != AL_INVALID_CID )
> +       {
> +               ref_al_obj( &h_qp->obj );
> +               if( al_destroy_cep( qp_get_al( h_qp ), cid, 
> deref_al_obj ) != IB_SUCCESS )
> +               {
> +                       deref_al_obj( &h_qp->obj );
> +               }
> +       }
> +
>         /* bring QP to error state */
>         cl_memclr( &qp_mod, sizeof(qp_mod) );
>         qp_mod.req_state = IB_QPS_ERROR; @@ -1542,17 +1553,6 
> @@ ndi_dreq_cm(
> 
>         /* Store the timestamp after which the QP exits timewait. */
>         h_qp->timewait = cl_get_time_stamp() + timewait_us;
> -
> -       cid = cl_atomic_xchg( &((al_conn_qp_t*)h_qp)->cid, 
> AL_INVALID_CID );
> -
> -       if( cid != AL_INVALID_CID )
> -       {
> -               ref_al_obj( &h_qp->obj );
> -               if( al_destroy_cep( qp_get_al( h_qp ), cid, 
> deref_al_obj ) != IB_SUCCESS )
> -               {
> -                       deref_al_obj( &h_qp->obj );
> -               }
> -       }
> 
>         nt_status = STATUS_SUCCESS;
> 
> 



More information about the ofw mailing list