From 9aaebd7a8709ef35fa79107ed3790b7926f5029e Mon Sep 17 00:00:00 2001 From: shefty Date: Tue, 12 May 2009 17:24:13 +0000 Subject: [PATCH] MAD: apply RMPP with the upper vendor mgmt class The upper range of the vendor management class uses the RMPP header by default. Signed-off-by: Sean Hefty git-svn-id: svn://openib.tc.cornell.edu/gen1@2173 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/core/al/al_mad.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/trunk/core/al/al_mad.c b/trunk/core/al/al_mad.c index f60e8fbb..1cea1310 100644 --- a/trunk/core/al/al_mad.c +++ b/trunk/core/al/al_mad.c @@ -1616,6 +1616,13 @@ __does_send_req_rmpp( return FALSE; } } + if (ib_class_is_vendor_specific_high(p_mad_element->p_mad_buf->mgmt_class) && + ib_rmpp_is_flag_set((ib_rmpp_mad_t *) p_mad_element->p_mad_buf, + IB_RMPP_FLAG_ACTIVE)) + { + *p_rmpp_version = DEFAULT_RMPP_VERSION; + return TRUE; + } /* The RMPP is not active. */ return FALSE; @@ -2336,9 +2343,9 @@ __recv_requires_rmpp( switch( mad_svc_type ) { case IB_MAD_SVC_DEFAULT: - /* Only subnet management receives require RMPP. */ - return( (p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM) && - ib_rmpp_is_flag_set( p_rmpp_mad, IB_RMPP_FLAG_ACTIVE ) ); + return (p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM || + ib_class_is_vendor_specific_high(p_rmpp_mad->common_hdr.mgmt_class)) && + ib_rmpp_is_flag_set(p_rmpp_mad, IB_RMPP_FLAG_ACTIVE); case IB_MAD_SVC_RMPP: return( ib_rmpp_is_flag_set( p_rmpp_mad, IB_RMPP_FLAG_ACTIVE ) ); @@ -2367,9 +2374,9 @@ __is_internal_send( { case IB_MAD_SVC_DEFAULT: /* Internal sends are non-RMPP data MADs. */ - return( (p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM) && - (p_rmpp_mad->rmpp_type && - (p_rmpp_mad->rmpp_type != IB_RMPP_TYPE_DATA) ) ); + return ((p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM || + ib_class_is_vendor_specific_high(p_rmpp_mad->common_hdr.mgmt_class)) && + (p_rmpp_mad->rmpp_type && p_rmpp_mad->rmpp_type != IB_RMPP_TYPE_DATA)); case IB_MAD_SVC_RMPP: /* The RMPP header is present. Check its type. */ -- 2.41.0