From 2e4ff442827bd9151dd35cc0eab07e44ee04286e Mon Sep 17 00:00:00 2001 From: leonidk Date: Sun, 16 Aug 2009 12:40:46 +0000 Subject: [PATCH] [ND provider] This patch is a fix to 2333. It removes a facility to define MaxDataInlineSize from application, because it breaks MS API Improved latency of ND provider by using INLINE send This patch adds usage of INLINE DATA facility of Mellanox HCAs for improving latency of ND provider. Here are the ideas of the patch: - by default, ND provider will create QP with inline data of 160 bytes; (this can enlarge user's QP size) - one can change this default by defining environment variable IBNDPROV_MAX_INLINE_SIZE; git-svn-id: svn://openib.tc.cornell.edu/gen1@2352 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/ulp/nd/user/NdEndpoint.cpp | 15 +++++---------- trunk/ulp/nd/user/NdEndpoint.h | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/trunk/ulp/nd/user/NdEndpoint.cpp b/trunk/ulp/nd/user/NdEndpoint.cpp index 5d0cee13..b204320f 100644 --- a/trunk/ulp/nd/user/NdEndpoint.cpp +++ b/trunk/ulp/nd/user/NdEndpoint.cpp @@ -98,7 +98,7 @@ HRESULT CEndpoint::Initialize( __in SIZE_T nOutboundSge, __in SIZE_T InboundReadLimit, __in SIZE_T OutboundReadLimit, - __in_opt __out_opt SIZE_T* pMaxInlineData + __out_opt SIZE_T* pMaxInlineData ) { ND_ENTER( ND_DBG_NDI ); @@ -124,11 +124,7 @@ HRESULT CEndpoint::Initialize( m_pParent->m_Ifc.user_verbs.post_recv != NULL /*|| m_pParent->m_Ifc.user_verbs.bind_mw != NULL*/ ); - UINT32 InlineSize; - if ( pMaxInlineData ) - InlineSize = (UINT32)*pMaxInlineData; - else - InlineSize = g_nd_max_inline_size; + m_MaxInlineSize = g_nd_max_inline_size; HRESULT hr = CreateQp( pInboundCq, @@ -139,7 +135,7 @@ HRESULT CEndpoint::Initialize( nOutboundSge, InboundReadLimit, OutboundReadLimit, - InlineSize ); + m_MaxInlineSize ); if( FAILED( hr ) ) return hr; @@ -151,12 +147,11 @@ HRESULT CEndpoint::Initialize( return hr; } else - InlineSize = (UINT32)qp_attr.sq_max_inline; + m_MaxInlineSize = (UINT32)qp_attr.sq_max_inline; m_Ird = (UINT8)InboundReadLimit; m_Ord = (UINT8)OutboundReadLimit; - m_MaxInlineSize = InlineSize; // Move the QP to the INIT state so users can post receives. hr = ModifyQp( IB_QPS_INIT ); @@ -164,7 +159,7 @@ HRESULT CEndpoint::Initialize( DestroyQp(); if( SUCCEEDED( hr ) && pMaxInlineData != NULL ) - *pMaxInlineData = InlineSize; + *pMaxInlineData = m_MaxInlineSize; return hr; } diff --git a/trunk/ulp/nd/user/NdEndpoint.h b/trunk/ulp/nd/user/NdEndpoint.h index f72bdb95..fd1eabd4 100644 --- a/trunk/ulp/nd/user/NdEndpoint.h +++ b/trunk/ulp/nd/user/NdEndpoint.h @@ -67,7 +67,7 @@ private: __in SIZE_T nOutboundSge, __in SIZE_T InboundReadLimit, __in SIZE_T OutboundReadLimit, - __in_opt __out_opt SIZE_T* pMaxInlineData + __out_opt SIZE_T* pMaxInlineData ); public: -- 2.41.0