]> git.openfabrics.org - ~shefty/rdma-win.git/commit
ib/cm: fix handling failed send completions
authorSean Hefty <sean.hefty@intel.com>
Mon, 4 Jan 2010 19:01:09 +0000 (19:01 +0000)
committerSean Hefty <sean.hefty@intel.com>
Mon, 4 Jan 2010 19:01:09 +0000 (19:01 +0000)
commit0b13fc88a49309b858bcf71a2eb8eb9815081813
tree7edcb31c25e21f961a1e6f9af11bf03fa5d98c65
parent1baf632feb27f363a2e4310fe8317fdef89ea272
ib/cm: fix handling failed send completions

__cep_mad_send_cb() assumes that the mad being processed is
associated with the current state of the CEP.  This may not be
the case.

For example, for a short lived connection, it was observed that
a REP mad completed with status canceled.  This is normal.  However,
the user already attempted to disconnect the connection by sending
a DREQ.  This left the cep in the DREQ_SENT state by the time that
the REP mad completed.  Since the REP failed, but the state was
DREQ_SENT, the code assumed that the DREQ had failed and transitioned
the cep into TIMEWAIT.  The result is that the DREQ is never
matched with a DREP or canceled, but holds a reference on the CEP.

Until the DREQ times out (time depends on connection, but easily
up to a minute), attempts to destroy the CEP are blocked.

Fix this by simply discarding any completed sends that were not
sent from the current state of the cep when the completion handler
is invoked.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2650 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
trunk/core/al/kernel/al_cm.c
trunk/core/al/kernel/al_cm_cep.c