[ofa-general] [PATCH] osm: bug in fat-tree routing
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Thu Mar 22 07:33:25 PDT 2007
Hi Hal,
Fixing bug in fat-tree routing with loops in fabric.
When the switch connections form loop in the fabric, fat-tree routing
could follow this loop and set LFT table value for switches that have
been already configured for this LID.
Please apply to ofed_1_2 and to master.
Thanks.
-- Yevgeny
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
osm/opensm/osm_ucast_ftree.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/osm/opensm/osm_ucast_ftree.c b/osm/opensm/osm_ucast_ftree.c
index a4f307d..655a821 100644
--- a/osm/opensm/osm_ucast_ftree.c
+++ b/osm/opensm/osm_ucast_ftree.c
@@ -1826,6 +1826,23 @@ __osm_ftree_fabric_route_upgoing_by_goin
set LFT(target_lid) on the remote switch to the remote port */
p_remote_sw = p_group->remote_hca_or_sw.remote_sw;
+ if ( osm_switch_get_least_hops(p_remote_sw->p_osm_sw,
+ cl_ntoh16(target_lid)) != OSM_NO_PATH )
+ {
+ /* Loop in the fabric - we already routed the remote switch
+ on our way UP, and now we see it again on our way DOWN */
+ osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
+ "__osm_ftree_fabric_route_upgoing_by_going_down: "
+ "Loop of lenght %d in the fabric:\n "
+ "Switch %s (LID 0x%x) closes loop through switch %s (LID 0x%x)\n",
+ (p_remote_sw->rank - highest_rank_in_route) * 2,
+ __osm_ftree_tuple_to_str(p_remote_sw->tuple),
+ cl_ntoh16(p_group->base_lid),
+ __osm_ftree_tuple_to_str(p_sw->tuple),
+ cl_ntoh16(p_group->remote_base_lid));
+ continue;
+ }
+
/* Four possible cases:
*
* 1. is_real_lid == TRUE && is_main_path == TRUE:
--
1.4.4.1.GIT
More information about the general
mailing list