From 2a5c37654f01af9afad5626e18ace2e12648337f Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 12 Oct 2010 16:04:15 +0000 Subject: Handle Rdma Flush events - instead of reporting to the application just return write buffers to the pool and do nothing for recv buffers as the connection must be in an error state now. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1021816 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/rdma/RdmaIO.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cpp') diff --git a/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/cpp/src/qpid/sys/rdma/RdmaIO.cpp index 69776654ef..7a1d4bf639 100644 --- a/cpp/src/qpid/sys/rdma/RdmaIO.cpp +++ b/cpp/src/qpid/sys/rdma/RdmaIO.cpp @@ -371,6 +371,21 @@ namespace Rdma { ::ibv_wc_status status = e.getEventStatus(); if (status != IBV_WC_SUCCESS) { + // Need special check for IBV_WC_WR_FLUSH_ERR here + // we will get this for every send/recv queue entry that was pending + // when disconnected, these aren't real errors and mostly need to be ignored + if (status == IBV_WC_WR_FLUSH_ERR) { + QueueDirection dir = e.getDirection(); + if (dir == SEND) { + Buffer* b = e.getBuffer(); + ++sendEvents; + returnBuffer(b); + --outstandingWrites; + } else { + ++recvEvents; + } + continue; + } errorCallback(*this); // TODO: Probably need to flush queues at this point return; @@ -398,6 +413,7 @@ namespace Rdma { } // At this point the buffer has been consumed so put it back on the recv queue + // TODO: Is this safe to do if the connection is disconnected already? qp->postRecv(b); // Received another message -- cgit v1.2.1