From: Daniel Klein <[email protected]>

Removed assert in fabric_create_leaf_switch_array() that checks that the
number of leafs is > 1. Instead the function returns -1, which fails the
routing engine.

Signed-off-by: Daniel Klein <[email protected]>
Signed-off-by: Hal Rosenstock <[email protected]>
---
 opensm/osm_ucast_ftree.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/opensm/osm_ucast_ftree.c b/opensm/osm_ucast_ftree.c
index 581c233..4cec0ae 100644
--- a/opensm/osm_ucast_ftree.c
+++ b/opensm/osm_ucast_ftree.c
@@ -1719,12 +1719,19 @@ static int fabric_create_leaf_switch_array(IN 
ftree_fabric_t * p_ftree)
                        last_leaf_idx = i;
                }
        }
-       CL_ASSERT(first_leaf_idx < last_leaf_idx);
 
        OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
                "Full leaf array info: first_leaf_idx = %u, last_leaf_idx = 
%u\n",
                first_leaf_idx, last_leaf_idx);
 
+       if (first_leaf_idx >= last_leaf_idx) {
+               osm_log_v2(&p_ftree->p_osm->log, OSM_LOG_INFO, FILE_ID,
+                          "Faild to find leaf switches - topology is not "
+                          "fat-tree\n");
+               res = -1;
+               goto Exit;
+       }
+
        /* Create array of REAL leaf switches, sorted by index.
           This array may contain switches at the same rank w/o CNs,
           in case this is the order of indexing. */
-- 
1.7.8.2

--
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

Reply via email to