[openib-general] [PATCH 2/2] OpenSM/osm_prtn.c: In osm_prtn_add_mcgroup, use scope from MGID for MCMemberRecord

Hal Rosenstock halr at voltaire.com
Fri Jan 5 05:40:31 PST 2007


OpenSM/osm_prtn.c: In osm_prtn_add_mcgroup, use scope from MGID for
MCMemberRecord

In osm_prtn_add_mcgroup, use scope from MGID for MCMemberRecord rather
than assume link local scope

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

diff --git a/osm/opensm/osm_prtn.c b/osm/opensm/osm_prtn.c
index b905416..a10eae9 100644
--- a/osm/opensm/osm_prtn.c
+++ b/osm/opensm/osm_prtn.c
@@ -201,6 +201,7 @@ ib_api_status_t osm_prtn_add_mcgroup(osm
 	osm_mgrp_t *p_mgrp = NULL;
 	osm_sa_t *p_sa = &p_subn->p_osm->sa;
 	ib_api_status_t status = IB_SUCCESS;
+	uint8_t scope;
 
 	pkey = p->pkey | cl_hton16(0x8000);
 
@@ -216,8 +217,9 @@ ib_api_status_t osm_prtn_add_mcgroup(osm
 	mc_rec.rate = (rate ? rate : OSM_DEFAULT_MGRP_RATE) | (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;
+	/* Scope in MCMemberRecord needs to be consistent with MGID */
+	scope = ib_mgid_get_scope(&osm_ipoib_mgid); /* get scope from MGID */
+	mc_rec.scope_state = ib_member_set_scope_state(scope, 1); /* full member */
 
 	/* don't update rate, mtu */
 	comp_mask = IB_MCR_COMPMASK_MTU | IB_MCR_COMPMASK_MTU_SEL







More information about the general mailing list