-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hi,
Some of the sample applications seem to assume that the reported RQ size is always greater or equal than SQ size. This is not required. The call to create QP uses the same value for RQ and SQ.
Coming from min(maxCQ, maxRQ), which may fail if SQ turned out to be reported in adapter info as smaller than maxCQ and maxRQ.
Please find below a potential fix for ndping.
Thanks.
Fix to asymetrically reported QP sizes
This patch incorporates the Initiator queue depth reported through
AdapterInfo.
When reported sizes for SQ are smaller than RQ, createQP uses
min(CQDepth,RQDepth) for both SQ and RQ causing QP creation errors.
diff --git a/src/examples/ndping/ndping.cpp b/src/examples/ndping/ndping.cpp
index 8a08a12..deac1fb 100644
--- a/src/examples/ndping/ndping.cpp
+++ b/src/examples/ndping/ndping.cpp
@@ -62,7 +62,8 @@ public:
ND2_ADAPTER_INFO adapterInfo = { 0 };
NdTestBase::GetAdapterInfo(&adapterInfo);
- m_queueDepth = min(adapterInfo.MaxCompletionQueueDepth, adapterInfo.MaxReceiveQueueDepth);
+ m_queueDepth = min(adapterInfo.MaxReceiveQueueDepth, adapterInfo.MaxInitiatorQueueDepth);
+ m_queueDepth = min(m_queueDepth, adapterInfo.MaxCompletionQueueDepth);
m_queueDepth = (queueDepth != 0) ? min(queueDepth, m_queueDepth) : m_queueDepth;
m_inlineSizeThreshold = adapterInfo.InlineRequestThreshold;
@@ -195,7 +196,8 @@ public:
ND2_ADAPTER_INFO adapterInfo;
NdTestBase::GetAdapterInfo(&adapterInfo);
- m_queueDepth = min(adapterInfo.MaxCompletionQueueDepth, adapterInfo.MaxInitiatorQueueDepth);
+ m_queueDepth = min(adapterInfo.MaxReceiveQueueDepth, adapterInfo.MaxInitiatorQueueDepth);
+ m_queueDepth = min(m_queueDepth, adapterInfo.MaxCompletionQueueDepth);
m_queueDepth = (queueDepth != 0) ? min(queueDepth, m_queueDepth) : m_queueDepth;
m_inlineSizeThreshold = adapterInfo.InlineRequestThreshold;
Metadata
Metadata
Assignees
Labels
No labels