[openib-general] [PATCH] OpenSM - osm_vendor_mlx_svc.h fix for branch1.0
Yael Kalka
yael at mellanox.co.il
Tue Apr 4 23:31:52 PDT 2006
Hi Hal,
Attached is a patch for branch 1.0, for the osm_vendor_mlx_svc.h that
was applied on the trunk but not on the branch 1.0.
Yael
OpenSM/osm_vendor_mlx_svc.h: Identify RMPP MADs
RMPP mads can only sent in 4 MAD classes:
1. IB_MCLASS_SUBN_ADM
2. IB_MCLASS_DEV_MGMT
3. BIS
4. DevAdm
If the packet is not 1 or 2 - the mad is not checked and returned in advance as not a rmpp packet.
Since 3,4 are not management classes (see 13.4.4 page 720 in the spec),
I don't know whether they are defined as constants or not, so I didn't
handle them.
Signed-off-by: Ofer Gigi <oferg at mellanox.co.il>
Signed-off-by: Yael Kalka <yael at mellanox.co.il>
Index: include/vendor/osm_vendor_mlx_svc.h
===================================================================
--- include/vendor/osm_vendor_mlx_svc.h (revision 5887)
+++ include/vendor/osm_vendor_mlx_svc.h (revision 5888)
@@ -116,6 +116,10 @@ osmv_mad_is_rmpp(IN const ib_mad_t *p_ma
CL_ASSERT(NULL != p_mad);
rmpp_flags = ((ib_rmpp_mad_t*)p_mad)->rmpp_flags;
+ /* HACK - JUST SA and DevMgt for now - need to add BIS and DevAdm */
+ if ( (p_mad->mgmt_class != CL_NTOH16(IB_MCLASS_SUBN_ADM)) &&
+ (p_mad->mgmt_class != CL_NTOH16(IB_MCLASS_DEV_MGMT)) )
+ return(0);
return (0 != (rmpp_flags & IB_RMPP_FLAG_ACTIVE));
}
More information about the general
mailing list