diff mbox

opensm/osm_mcast_mgr.c: preserve root switch calculation functionality

Message ID 20100204222213.GL26338@me (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Sasha Khapyorsky Feb. 4, 2010, 10:22 p.m. UTC
None
diff mbox

Patch

diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index f33d6a6..322635d 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -253,7 +253,8 @@  static float mcast_mgr_compute_max_hops(osm_sm_t * sm, cl_qmap_t * m,
 		sw = cl_item_obj(i, sw, mgrp_item);
 		lid = cl_ntoh16(osm_node_get_base_lid(sw->p_node, 0));
 		hops = osm_switch_get_least_hops(this_sw, lid);
-		hops = (hops + 1) * sw->num_of_mcm + hops * sw->is_mc_member;
+		if (!sw->is_mc_member)
+			hops += 1;
 		if (hops > max_hops)
 			max_hops = hops;
 	}