From: leonidk Date: Wed, 2 Jul 2008 12:22:39 +0000 (+0000) Subject: [IBAL] The current ndi_dreq_cm function destroys the CEP after the QP is moved to... X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9a049667ab596e47cc4138daa6a6faf80b2309d4;p=~shefty%2Frdma-win.git [IBAL] 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 git-svn-id: svn://openib.tc.cornell.edu/gen1@1323 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/core/al/kernel/al_ndi_cm.c b/trunk/core/al/kernel/al_ndi_cm.c index e6339fdc..438f9f3a 100644 --- a/trunk/core/al/kernel/al_ndi_cm.c +++ b/trunk/core/al/kernel/al_ndi_cm.c @@ -1539,6 +1539,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; @@ -1556,17 +1567,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; exit: