summaryrefslogtreecommitdiff
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
commit6621fe3f52bb48662c59700d4cdaf5fccf087994 (patch)
tree84358ef22dfb26bfe37e55a86a30d355da60403e
parent1e71ed964164f2b1de8beaba1ee562f8ea0cd6b5 (diff)
downloadqpid-python-6621fe3f52bb48662c59700d4cdaf5fccf087994.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@1021816 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
index 69776654ef..7a1d4bf639 100644
--- a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
+++ b/qpid/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