[openib-general] [PATCH] vendor: identify rmpp mads

Ofer Gigi oferg at mellanox.co.il
Thu Mar 16 09:14:09 PST 2006


Hi Hal,

RMPP mad can only sent in 4 kinds of mad:
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. 

Thanks

Ofer G.

Signed-off-by:  Ofer Gigi <oferg at mellanox.co.il>

Index: osm_vendor_mlx_svc.h
===================================================================
--- osm_vendor_mlx_svc.h        (revision 5836)
+++ osm_vendor_mlx_svc.h        (working copy)
@@ -116,6 +116,9 @@ 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