]> git.openfabrics.org - ~ardavis/dapl.git/commit
common: dat_evd_dequeue (poll_cq) fails with invalid parameter after EP (qp) free
authorardavis <ardavis@cst-linux.(none)>
Tue, 19 Oct 2010 16:52:45 +0000 (09:52 -0700)
committerardavis <ardavis@cst-linux.(none)>
Tue, 19 Oct 2010 16:52:45 +0000 (09:52 -0700)
commit9c4026b3658f4f350d2b9cf4cbbda0cdc8f26482
treea36d09843d28d24685cfbd92e3a8226d02f83859
parent3685811d2c481d1e55d79962710f8779553c0d88
common: dat_evd_dequeue (poll_cq) fails  with invalid parameter after EP (qp) free

Failure occured during Intel MPI spawn test on windows.
The QP's need to be flushed and processed via EVD's during
the EP (QP) destroy to avoid an error on poll_cq. IBAL
provider was not moving to ERR state during QP destroy.

Better flush CQ processing was added and pushed down to the provider
level via dapls_ib_qp_free() where it can move QP to ERR, flush CQ,
and then free QP after flushing. Because there is no QP_ERR_FLUSH
state on a QP the spin on poll_cq (until empty) after modify_qp
to ERR could return empty and before all WQE's are flushed. This
could result in a CQE being added to CQ with a invalid QP reference.
So, an additional check was added to flush_evds for the recv_q to
poll_cq until all recv's pending are complete. For transmit_q there
is no quarantee that the posted work is signaled and so the best
that can be done is poll_cq until empty.

Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
dapl/common/dapl_ep_free.c
dapl/common/dapl_ep_util.c
dapl/ibal/dapl_ibal_qp.c
dapl/openib_common/qp.c