When SM fails to load/parse root_guids file use MinHop heuristics
PATCH 6/6 When SM fails to load/parse root_guids file use MinHop heuristics
Quoted 1 line
From
21765ade61c96c319d157293e57e10f2f0e07846Mon Sep 17 00:00:00 2001
From: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/[email protected]>
Date: Sun, 28 Apr 2013 10:06:00 +0300
Subject: [PATCH 6/6] When SM fails to load/parse root_guids file use MinHop
heuristics
--- opensm/osm_subnet.c | 11 ----------- opensm/osm_ucast_ftree.c | 8 +++++--- opensm/osm_ucast_updn.c | 8 +++++--- 3 files changed, 10 insertions(+), 17 deletions(-)
opensm/osm_subnet.c +0 -11
@@ -2048,17 +2048,6 @@ int osm_subn_verify_config(IN osm_subn_opt_t * p_opts) } } -if (p_opts->root_guid_file !=NULL ) { -FILE *root_file =fopen (p_opts->root_guid_file,"r" ); -if (!root_file) { -log_report ("Root guid file provided: %s doesn't exist.\n" -"Using default roots discovery algorithm\n" , - p_opts->root_guid_file); - p_opts->root_guid_file =NULL ; - }else -fclose (root_file); - } -return 0 ; }
opensm/osm_ucast_ftree.c +5 -3
@@ -3558,6 +3558,9 @@ static boolean_t fabric_load_roots(IN ftree_fabric_t * p_ftree, context.list = p_ranking_bfs_list;if (parse_node_map (p_ftree->p_osm->subn.opt.root_guid_file, rank_root_sw_by_guid, &context)) { +OSM_LOG (&p_ftree->p_osm->log,OSM_LOG_ERROR ,"ERR AB2A: " +"cannot parse root guids file \'%s\'\n" , + p_ftree->p_osm->subn.opt.root_guid_file);return FALSE; }
@@ -3722,10 +3725,9 @@ static int fabric_rank(IN ftree_fabric_t * p_ftree)OSM_LOG_ENTER (&p_ftree->p_osm->log); -if (fabric_roots_provided (p_ftree)){ -if (fabric_load_roots (p_ftree, &ranking_bfs_list)) +if (fabric_roots_provided (p_ftree) && +fabric_load_roots (p_ftree, &ranking_bfs_list)) res =fabric_rank_from_roots (p_ftree, &ranking_bfs_list); - }else { res =fabric_rank_from_hcas (p_ftree);if (!res)
opensm/osm_ucast_updn.c +5 -3
@@ -594,12 +594,14 @@ static int updn_lid_matrices(void *ctx) ret =parse_node_map (p_updn->p_osm->subn.opt.root_guid_file, rank_root_node, p_updn); -if (ret) +if (ret) {OSM_LOG (&p_updn->p_osm->log,OSM_LOG_ERROR ,"ERR AA02: " "cannot parse root guids file \'%s\'\n" , p_updn->p_osm->subn.opt.root_guid_file); -if (p_updn->p_osm->subn.opt.connect_roots && - p_updn->num_roots >1 ) +osm_ucast_mgr_build_lid_matrices (&p_updn->p_osm->sm.ucast_mgr); +updn_find_root_nodes_by_min_hop (p_updn); + }else if (p_updn->p_osm->subn.opt.connect_roots && + p_updn->num_roots >1 )osm_ucast_mgr_build_lid_matrices (&p_updn->p_osm->sm.ucast_mgr); }else {osm_ucast_mgr_build_lid_matrices (&p_updn->p_osm->sm.ucast_mgr);
Signature · 6 lines
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