summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/rdma/RdmaIO.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:33 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-06-14 14:50:33 +0000
commite5cdd98d3765bf41a9a6bbcb72470a8077a43a64 (patch)
tree1b9e9356e2582b43e66e8d845f7f2752b325f79d /cpp/src/qpid/sys/rdma/RdmaIO.cpp
parent227246d4d1052242396fa08682da1ffc40f684a2 (diff)
downloadqpid-python-e5cdd98d3765bf41a9a6bbcb72470a8077a43a64.tar.gz
Combine Rdma::Buffer and ibv_sge needed to send it
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@954496 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/rdma/RdmaIO.cpp')
-rw-r--r--cpp/src/qpid/sys/rdma/RdmaIO.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaIO.cpp b/cpp/src/qpid/sys/rdma/RdmaIO.cpp
index 45295d470c..3b49e9759e 100644
--- a/cpp/src/qpid/sys/rdma/RdmaIO.cpp
+++ b/cpp/src/qpid/sys/rdma/RdmaIO.cpp
@@ -65,7 +65,6 @@ namespace Rdma {
// Allocate recv buffer
Buffer* b = qp->createBuffer(bufferSize);
buffers.push_front(b);
- b->dataCount = b->byteCount;
qp->postRecv(b);
}
@@ -74,8 +73,6 @@ namespace Rdma {
Buffer* b = qp->createBuffer(bufferSize);
buffers.push_front(b);
bufferQueue.push_front(b);
- b->dataCount = 0;
- b->dataStart = 0;
}
}
@@ -410,8 +407,6 @@ namespace Rdma {
}
// At this point the buffer has been consumed so put it back on the recv queue
- b->dataStart = 0;
- b->dataCount = 0;
qp->postRecv(b);
// Received another message
@@ -425,8 +420,8 @@ namespace Rdma {
if (writable()) {
Buffer* ob = getBuffer();
// Have to send something as adapters hate it when you try to transfer 0 bytes
- *reinterpret_cast< uint32_t* >(ob->bytes) = htonl(recvCredit);
- ob->dataCount = sizeof(uint32_t);
+ *reinterpret_cast< uint32_t* >(ob->bytes()) = htonl(recvCredit);
+ ob->dataCount(sizeof(uint32_t));
int creditSent = recvCredit & ~FlagsMask;
qp->postSend(creditSent | IgnoreData, ob);
@@ -498,16 +493,12 @@ namespace Rdma {
assert(!bufferQueue.empty());
Buffer* b = bufferQueue.front();
bufferQueue.pop_front();
- b->dataCount = 0;
- b->dataStart = 0;
return b;
}
void AsynchIO::returnBuffer(Buffer* b) {
qpid::sys::ScopedLock<qpid::sys::Mutex> l(bufferQueueLock);
bufferQueue.push_front(b);
- b->dataCount = 0;
- b->dataStart = 0;
}
ConnectionManager::ConnectionManager(