]> git.openfabrics.org - ~shefty/rdma-win.git/commit
winverbs: transition QP to error on disconnect
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 27 May 2009 19:13:36 +0000 (19:13 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 27 May 2009 19:13:36 +0000 (19:13 +0000)
commitb4d0e8abecc48bc93de15205e456d1b9b460639f
tree8883d6279ebadbf3ccae4ea137be09430e16a57c
parent3850d85670566e8b3171674b25e632713cfd05ba
winverbs: transition QP to error on disconnect

The QP transition into the error state must occur after a DREQ has been
received and acknowledged by the user (by a subsequent call to Disconnect),
or after a DREP has been received.  The current winverbs API requires the
user to call QP:Modify after their NotifyDisconnect completes.  This
presents challenges to implementing an ND provider, which expects a single
function call to perform both operations.

Unlike during connection establishment, the QP transition to error must
sometimes be delayed until after a CM callback.  And since CM callbacks
are at dispatch, we must queue the modify call to a system thread.

Regardless of the outcome of the disconnect attempt or other failures,
the driver tries to transition the QP to error.  This results in some
minor checks to ensure that the correct status is reported to the user.

A couple of additional changes were made to the Accept path to keep the
code consistent, since both Accept and Disconnect have active/passive
code paths.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2214 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
trunk/core/winverbs/kernel/wv_driver.c
trunk/core/winverbs/kernel/wv_ep.c
trunk/core/winverbs/kernel/wv_ep.h
trunk/core/winverbs/kernel/wv_provider.c
trunk/core/winverbs/kernel/wv_provider.h
trunk/core/winverbs/user/wv_ep.cpp
trunk/core/winverbs/user/wv_ep.h
trunk/core/winverbs/wv_ioctl.h
trunk/inc/user/rdma/winverbs.h
trunk/ulp/librdmacm/src/cma.cpp