[ofa-general] [PATCH] osm: bugfix - if fat-tree failed, osm should fall back to default routing

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Thu Jun 14 01:25:21 PDT 2007


Hi Hal,

When fat-tree fails to populate all the data structures,
it should return error and let osm fall back to default routing.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 opensm/opensm/osm_ucast_ftree.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_ucast_ftree.c b/opensm/opensm/osm_ucast_ftree.c
index d3ff45f..2236734 100644
--- a/opensm/opensm/osm_ucast_ftree.c
+++ b/opensm/opensm/osm_ucast_ftree.c
@@ -3302,11 +3302,15 @@ __osm_ftree_do_routing(
    IN  void * context)
 {
    ftree_fabric_t * p_ftree = context;
+   int status = 0;
 
    OSM_LOG_ENTER(&p_ftree->p_osm->log, __osm_ftree_do_routing);
 
    if (!p_ftree->fabric_built)
+   {
+      status = -1;
       goto Exit;
+   }
 
    osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,"__osm_ftree_do_routing: "
            "Starting FatTree routing\n");
@@ -3330,7 +3334,7 @@ __osm_ftree_do_routing(
 
  Exit:
    OSM_LOG_EXIT(&p_ftree->p_osm->log);
-   return 0;
+   return status;
 }
 
 /***************************************************
-- 
1.5.1.4





More information about the general mailing list