Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Elsa Gonsiorowski
codes
Commits
7a7092e1
Commit
7a7092e1
authored
Nov 02, 2015
by
Misbah Mubarak
Browse files
Fixing reverse computation bug + non minimal routing
parent
0cd09451
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/models/networks/model-net/dragonfly.c
View file @
7a7092e1
...
...
@@ -2041,7 +2041,7 @@ get_next_stop(router_state * s,
/* Generate inter-mediate destination for non-minimal routing (selecting a random group) */
if
(
msg
->
last_hop
==
TERMINAL
&&
path
==
NON_MINIMAL
)
{
if
(
(
dest_rou
ter_id
/
s
->
params
->
num_routers
)
!=
s
->
group_id
)
if
(
dest_
g
rou
p_id
!=
s
->
group_id
)
{
msg
->
intm_group_id
=
intm_id
;
}
...
...
@@ -2053,20 +2053,21 @@ get_next_stop(router_state * s,
msg
->
intm_group_id
=
-
1
;
//no inter-mediate group
}
/* Intermediate group ID is set. Divert the packet to the intermediate group. */
if
(
path
==
NON_MINIMAL
&&
msg
->
intm_group_id
>=
0
)
if
(
path
==
NON_MINIMAL
&&
msg
->
intm_group_id
>=
0
&&
(
dest_group_id
!=
s
->
group_id
))
{
dest_group_id
=
msg
->
intm_group_id
;
}
else
/* direct the packet to the destination group */
{
dest_group_id
=
dest_router_id
/
s
->
params
->
num_routers
;
}
/********************** DECIDE THE ROUTER IN THE DESTINATION GROUP ***************/
/* It means the packet has arrived at the destination group. Now divert it to the destination router. */
if
(
s
->
group_id
==
dest_group_id
)
{
if
(
msg
->
last_hop
==
TERMINAL
&&
path
==
NON_MINIMAL
)
{
dest_lp
=
(
s
->
group_id
*
s
->
params
->
num_routers
)
+
intm_id
%
s
->
params
->
num_routers
;
}
else
{
dest_lp
=
dest_router_id
;
}
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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