You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2010/10/12 18:04:16 UTC
svn commit: r1021816 - /qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
Author: astitcher
Date: Tue Oct 12 16:04:15 2010
New Revision: 1021816
URL: http://svn.apache.org/viewvc?rev=1021816&view=rev
Log:
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.
Modified:
qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp?rev=1021816&r1=1021815&r2=1021816&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaIO.cpp Tue Oct 12 16:04:15 2010
@@ -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
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org