Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
c3b8f7c8
Commit
c3b8f7c8
authored
May 14, 2018
by
Neil McGlohon
Browse files
Dragonfly Plus: use least congested route for all routing
parent
6ef443bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/dragonfly-plus.C
View file @
c3b8f7c8
...
...
@@ -2763,8 +2763,8 @@ static Connection do_dfp_routing(router_state *s,
if
(
poss_next_stops
.
size
()
<
1
)
tw_error
(
TW_LOC
,
"MINIMAL DEAD END
\n
"
);
int
randsel
=
tw_rand_integer
(
lp
->
rn
g
,
0
,
poss_next_stops
.
size
()
-
1
);
return
poss_next_stops
[
randsel
]
;
Connection
best_min_conn
=
get_best_connection_from_conns
(
s
,
bf
,
ms
g
,
lp
,
poss_next_stops
);
return
best_min_conn
;
}
else
{
//routing algorithm is specified in routing
assert
(
(
routing
==
NON_MINIMAL_LEAF
)
||
(
routing
==
NON_MINIMAL_SPINE
)
);
...
...
@@ -2800,14 +2800,14 @@ static Connection do_dfp_routing(router_state *s,
if
(
route_to_fdest
)
{
vector
<
Connection
>
poss_next_stops
=
get_possible_stops_to_specific_router
(
s
,
bf
,
msg
,
lp
,
fdest_router_id
);
int
randsel
=
tw_rand_integer
(
lp
->
rn
g
,
0
,
poss_next_stops
.
size
()
-
1
);
return
poss_next_stops
[
randsel
]
;
Connection
best_min_conn
=
get_best_connection_from_conns
(
s
,
bf
,
ms
g
,
lp
,
poss_next_stops
);
return
best_min_conn
;
}
else
{
//then we need to be going toward the intermediate router
msg
->
path_type
=
NON_MINIMAL
;
vector
<
Connection
>
poss_next_stops
=
get_possible_stops_to_specific_router
(
s
,
bf
,
msg
,
lp
,
msg
->
intm_rtr_id
);
int
randsel
=
tw_rand_integer
(
lp
->
rn
g
,
0
,
poss_next_stops
.
size
()
-
1
);
return
poss_next_stops
[
randsel
]
;
Connection
best_intm_conn
=
get_best_connection_from_conns
(
s
,
bf
,
ms
g
,
lp
,
poss_next_stops
);
return
best_intm_conn
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment