summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-10-12 16:04:15 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-10-12 16:04:15 +0000
commit2a5c37654f01af9afad5626e18ace2e12648337f (patch)
treea3f095e64d6540b2fc0bad2beea821853da8d008 /cpp/src
parent0cc24e0bbffc35a40e9200ffcd5b1082c8286641 (diff)
downloadqpid-python-2a5c37654f01af9afad5626e18ace2e12648337f.tar.gz
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
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/sys/rdma/RdmaIO.cpp16
1 files changed, 16 insertions, 0 deletions
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