summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-12-23 17:11:31 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-12-23 17:11:31 +0000
commit1eb6ea19fdbc9e5b7e20f5b1b21b8687452b4c71 (patch)
treed6b2b669094880dde9b9ff876327489be1db04c1 /cpp/src
parent538bf765ab0149eed486d1b87e10bbcb6344772e (diff)
downloadqpid-python-1eb6ea19fdbc9e5b7e20f5b1b21b8687452b4c71.tar.gz
Reduce rdma scatter gathers allocated per queue pair to 1 as iWarp
only supports 1 sge. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1052328 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/sys/rdma/rdma_wrap.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/sys/rdma/rdma_wrap.cpp b/cpp/src/qpid/sys/rdma/rdma_wrap.cpp
index 31db390fa4..8d5545baa8 100644
--- a/cpp/src/qpid/sys/rdma/rdma_wrap.cpp
+++ b/cpp/src/qpid/sys/rdma/rdma_wrap.cpp
@@ -119,13 +119,16 @@ namespace Rdma {
scq->cq_context = this;
rcq->cq_context = this;
+ ::ibv_device_attr dev_attr;
+ CHECK(::ibv_query_device(i->verbs, &dev_attr));
+
::ibv_qp_init_attr qp_attr = {};
// TODO: make a default struct for this
qp_attr.cap.max_send_wr = DEFAULT_WR_ENTRIES;
- qp_attr.cap.max_send_sge = 4;
+ qp_attr.cap.max_send_sge = 1;
qp_attr.cap.max_recv_wr = DEFAULT_WR_ENTRIES;
- qp_attr.cap.max_recv_sge = 4;
+ qp_attr.cap.max_recv_sge = 1;
qp_attr.send_cq = scq.get();
qp_attr.recv_cq = rcq.get();