Skip to contentSkip to conversation

opensm/osm_ucast_ftree: When roots are not connected, update hop count but not lft

PATCH Applied Hal Rosenstock 2 participants 2 messages Sep 27, 2010 – Nov 30, 2010 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osm_ucast_ftree: When roots are not connected, update hop count but not lft

When roots are not connected, neither hops nor lfts are updated for root switch port 0s. This causes a problem for multicast (looping) where switch port 0s can join.

Solution proposed by Yevgeny is to treat this as updn does and update the hop count but not new_lft.

---

opensm/opensm/osm_ucast_ftree.c +8 -8
index 88ea344..d74ba66 100644
@@ -3012,8 +3012,10 @@ static void fabric_route_roots(IN ftree_fabric_t * p_ftree)
 				"through port %u\n",
 				tuple_to_str(p_sw->tuple), lid, port_num);
 
-			/* set local lft */
-			p_sw->p_osm_sw->new_lft[lid] = port_num;
+			if (p_ftree->p_osm->subn.opt.connect_roots) {
+				/* set local lft */
+				p_sw->p_osm_sw->new_lft[lid] = port_num;
+			}
 
 			/*
 			 * Set local min hop table.
@@ -4061,12 +4063,10 @@ static int do_routing(IN void *context)
 		"Filling switch forwarding tables for switch-to-switch paths\n");
 	fabric_route_to_switches(p_ftree);
 
-	if (p_ftree->p_osm->subn.opt.connect_roots) {
-		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-			"Connecting switches that are unreachable within "
-			"Up/Down rules\n");
-		fabric_route_roots(p_ftree);
-	}
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
+		"Connecting switches that are unreachable within "
+		"Up/Down rules\n");
+	fabric_route_roots(p_ftree);
 
 	/* for each switch, set its fwd table */
 	cl_qmap_apply_func(&p_ftree->sw_tbl, set_sw_fwd_table, (void *)p_ftree);

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 8 lines · Hal Rosenstock

When roots are not connected, neither hops nor lfts are updated for root switch port 0s. This causes a problem for multicast (looping) where switch port 0s can join.

Solution proposed by Yevgeny is to treat this as updn does and update the hop count but not new_lft.

Applied. Thanks.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html