]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
MAD: apply RMPP with the upper vendor mgmt class
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 12 May 2009 17:24:13 +0000 (17:24 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 12 May 2009 17:24:13 +0000 (17:24 +0000)
The upper range of the vendor management class uses the RMPP header by default.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2173 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/al_mad.c

index f60e8fbb5697407ed02ff40b2dfe888913c013e7..1cea1310c64362d23ede144acc3c47481d514ff0 100644 (file)
@@ -1616,6 +1616,13 @@ __does_send_req_rmpp(
                                return FALSE;\r
                        }\r
                }\r
+               if (ib_class_is_vendor_specific_high(p_mad_element->p_mad_buf->mgmt_class) &&\r
+                       ib_rmpp_is_flag_set((ib_rmpp_mad_t *) p_mad_element->p_mad_buf,\r
+                                                               IB_RMPP_FLAG_ACTIVE))\r
+               {\r
+                       *p_rmpp_version = DEFAULT_RMPP_VERSION;\r
+                       return TRUE;\r
+               }\r
 \r
                /* The RMPP is not active. */\r
                return FALSE;\r
@@ -2336,9 +2343,9 @@ __recv_requires_rmpp(
        switch( mad_svc_type )\r
        {\r
        case IB_MAD_SVC_DEFAULT:\r
-               /* Only subnet management receives require RMPP. */\r
-               return( (p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM) &&\r
-                       ib_rmpp_is_flag_set( p_rmpp_mad, IB_RMPP_FLAG_ACTIVE ) );\r
+               return (p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM ||\r
+                               ib_class_is_vendor_specific_high(p_rmpp_mad->common_hdr.mgmt_class)) &&\r
+                          ib_rmpp_is_flag_set(p_rmpp_mad, IB_RMPP_FLAG_ACTIVE);\r
 \r
        case IB_MAD_SVC_RMPP:\r
                return( ib_rmpp_is_flag_set( p_rmpp_mad, IB_RMPP_FLAG_ACTIVE ) );\r
@@ -2367,9 +2374,9 @@ __is_internal_send(
        {\r
        case IB_MAD_SVC_DEFAULT:\r
                /* Internal sends are non-RMPP data MADs. */\r
-               return( (p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM) &&\r
-                               (p_rmpp_mad->rmpp_type &&\r
-                               (p_rmpp_mad->rmpp_type != IB_RMPP_TYPE_DATA) ) );\r
+               return ((p_rmpp_mad->common_hdr.mgmt_class == IB_MCLASS_SUBN_ADM ||\r
+                                ib_class_is_vendor_specific_high(p_rmpp_mad->common_hdr.mgmt_class)) &&\r
+                                (p_rmpp_mad->rmpp_type && p_rmpp_mad->rmpp_type != IB_RMPP_TYPE_DATA));\r
 \r
        case IB_MAD_SVC_RMPP:\r
                /* The RMPP header is present.  Check its type. */\r