[openib-general] [PATCH]OpenSM/osm_prtn.c: Set exactly selectors for MTU and rate as well as in component mask prior to calling osm_mcmr_rcv_find_or_create_new_mgrp

Hal Rosenstock halr at voltaire.com
Mon Jul 24 13:09:05 PDT 2006


OpenSM/osm_prtn.c: Set exactly selectors for MTU and rate as well as in
component mask prior to calling osm_mcmr_rcv_find_or_create_new_mgrp

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_prtn.c
===================================================================
--- opensm/osm_prtn.c	(revision 8640)
+++ opensm/osm_prtn.c	(working copy)
@@ -216,17 +216,18 @@ ib_api_status_t osm_prtn_add_mcgroup(osm
 	memcpy(&mc_rec.mgid.raw[4], &pkey, sizeof(pkey));
 
 	mc_rec.qkey = CL_HTON32(0x0b1b);
-	mc_rec.mtu = mtu ? mtu : 4; /*  2048 Bytes */
+	mc_rec.mtu = (mtu ? mtu : 4) | (2 << 6); /*  2048 Bytes */
 	mc_rec.tclass = 0;
 	mc_rec.pkey = pkey;
-	mc_rec.rate = rate ? rate : 0x3; /* 10Gb/sec */
+	mc_rec.rate = (rate ? rate : 0x3) | (2 << 6); /* 10Gb/sec */
 	mc_rec.pkt_life = OSM_DEFAULT_SUBNET_TIMEOUT;
 	mc_rec.sl_flow_hop = ib_member_set_sl_flow_hop(p->sl, 0, 0);
 	/* Note: scope needs to be consistent with MGID */
 	mc_rec.scope_state = 0x21;
 
 	/* don't update rate, mtu */
-	comp_mask = IB_MCR_COMPMASK_MTU | IB_MCR_COMPMASK_RATE;
+	comp_mask = IB_MCR_COMPMASK_MTU | IB_MCR_COMPMASK_MTU_SEL
+			| IB_MCR_COMPMASK_RATE | IB_MCR_COMPMASK_RATE_SEL;
 	status = osm_mcmr_rcv_find_or_create_new_mgrp(&p_sa->mcmr_rcv,
 						      comp_mask, &mc_rec, &p_mgrp);
 	if (!p_mgrp || status != IB_SUCCESS)








More information about the general mailing list