From 53750f640c6ed0c37fcda0dff9322cee13567418 Mon Sep 17 00:00:00 2001 From: Neil McGlohon Date: Tue, 17 Apr 2018 14:18:27 -0400 Subject: [PATCH] Dragonfly Plus: Fixed Beta Scoring Potential Flaw --- src/networks/model-net/dragonfly-plus.C | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/networks/model-net/dragonfly-plus.C b/src/networks/model-net/dragonfly-plus.C index 02c68cf..3f72cd3 100644 --- a/src/networks/model-net/dragonfly-plus.C +++ b/src/networks/model-net/dragonfly-plus.C @@ -2341,8 +2341,13 @@ static int get_min_hops_to_dest_from_conn(router_state *s, tw_bf *bf, terminal_p } } else { //next is not in final destination group - if (next_hops_type == SPINE) - return 3; //Next Spine -> Spine -> Leaf -> dest_term + if (next_hops_type == SPINE) { + vector< Connection > cons_to_dest_group = connManagerList[conn.dest_gid].get_connections_to_group(fdest_group_id); + if (cons_to_dest_group.size() == 0) + return 5; //Next Spine -> Leaf -> Spine -> Spine -> Leaf -> dest_term + else + return 3; //Next Spine -> Spine -> Leaf -> dest_term + } else { assert(next_hops_type == LEAF); return 4; //Next Leaf -> Spine -> Spine -> Leaf -> dest_term -- 2.26.2