]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
winverbs/ep: handle receiving REQ then DREQ
authorSean Hefty <sean.hefty@intel.com>
Thu, 21 Jan 2010 06:09:19 +0000 (06:09 +0000)
committerSean Hefty <sean.hefty@intel.com>
Thu, 21 Jan 2010 06:09:19 +0000 (06:09 +0000)
For fast connections, it's possible to receive a DREQ immediately
after receiving a REQ, without an RTU coming in between.  If we've
sent a REP to the REQ, then the DREQ should be treated as if the
connection had been fully established.  (The RTU could be delayed,
and the communication established event is processed asynchronously,
so there's no way to tell for certain.)

This fixes an issue where the passive side Accept() call fails
waiting for the RTU, but receives a DREQ instead.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2674 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/winverbs/kernel/wv_ep.c

index 3ad91ac9e6d090449766a6705ddbe568c8d917c5..cb897d39cf98f03dae0f5922516693e0a094b8a2 100644 (file)
@@ -542,6 +542,10 @@ static NTSTATUS WvEpIbCmHandler(iba_cm_id *pId, iba_cm_event *pEvent)
                        ep->State = WvEpPassiveDisconnect;\r
                        WvCompleteRequests(ep->Queue, STATUS_SUCCESS);\r
                        WdfObjectReleaseLock(ep->Queue);\r
+               } else if (ep->State == WvEpPassiveConnect) {\r
+                       ep->State = WvEpPassiveDisconnect;\r
+                       WvCompleteRequestsWithInformation(ep->Queue, STATUS_SUCCESS);\r
+                       WdfObjectReleaseLock(ep->Queue);\r
                } else {\r
                        WdfObjectReleaseLock(ep->Queue);\r
                        WvEpCompleteDisconnect(ep, STATUS_SUCCESS);\r