OpenSM/osm_sa_mcmember_record.c: In osm_mcmr_rcv_create_new_mgrp, set
exactly selectors after rather than before mgrp is initialized

Pointed out by: Roland Dreier <[EMAIL PROTECTED]>

Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>

Index: opensm/osm_sa_mcmember_record.c
===================================================================
--- opensm/osm_sa_mcmember_record.c     (revision 9347)
+++ opensm/osm_sa_mcmember_record.c     (working copy)
@@ -1337,15 +1337,18 @@ osm_mcmr_rcv_create_new_mgrp(
     goto Exit;
   }
 
-  /* the mcmember_record should have mtu_sel, rate_sel and pkt_lifetime_sel = 
2 */
-  (*pp_mgrp)->mcmember_rec.mtu |= 2<<6; /* exactly */
-  (*pp_mgrp)->mcmember_rec.rate |= 2<<6; /* exactly */
-  (*pp_mgrp)->mcmember_rec.pkt_life |= 2<<6; /* exactly */
-
   /* Initialize the mgrp */
   (*pp_mgrp)->mcmember_rec = mcm_rec;
   (*pp_mgrp)->mcmember_rec.mlid = mlid;
 
+  /* the mcmember_record should have mtu_sel, rate_sel, and pkt_lifetime_sel = 
2 */
+  (*pp_mgrp)->mcmember_rec.mtu &= 0x3f;
+  (*pp_mgrp)->mcmember_rec.mtu |= 2<<6; /* exactly */
+  (*pp_mgrp)->mcmember_rec.rate &= 0x3f;
+  (*pp_mgrp)->mcmember_rec.rate |= 2<<6; /* exactly */
+  (*pp_mgrp)->mcmember_rec.pkt_life &= 0x3f;
+  (*pp_mgrp)->mcmember_rec.pkt_life |= 2<<6; /* exactly */
+
   /* Insert the new group in the data base */
   
   /* since we might have an old group by that mlid




_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to