[ND/IBAL] ND provider INDAdaper::Query busted.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 18 Mar 2010 19:27:13 +0000 (19:27 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 18 Mar 2010 19:27:13 +0000 (19:27 +0000)
The INDAdapter::Query implementation doesn't set the maximum transfer lengths properly.
This patch fixes this, and allows MSMPI to chunk large transfers properly.

Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2753 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/nd/user/NdAdapter.cpp

index a174d94..3ab331f 100644 (file)
@@ -256,12 +256,14 @@ HRESULT CAdapter::Query(
         return hr;\r
     }\r
 \r
+    pInfo->VendorId = pAttr->vend_id;\r
+    pInfo->DeviceId = pAttr->dev_id;\r
     pInfo->MaxInboundSge = pAttr->max_sges;\r
     pInfo->MaxInboundRequests = pAttr->max_wrs;\r
-    pInfo->MaxInboundLength = INT_MAX;\r
+    pInfo->MaxInboundLength = (SIZE_T)pAttr->p_port_attr[m_PortNum - 1].max_msg_size;\r
     pInfo->MaxOutboundSge = pAttr->max_sges;\r
     pInfo->MaxOutboundRequests = pAttr->max_wrs;\r
-    pInfo->MaxOutboundLength = INT_MAX;\r
+    pInfo->MaxOutboundLength = (SIZE_T)pAttr->p_port_attr[m_PortNum - 1].max_msg_size;\r
     pInfo->MaxInboundReadLimit = pAttr->max_qp_resp_res;\r
     pInfo->MaxOutboundReadLimit = pAttr->max_qp_init_depth;\r
     pInfo->MaxCqEntries = pAttr->max_cqes;\r