Commit 88e0e1aa authored by Misbah Mubarak's avatar Misbah Mubarak

Modifying conditions under which a new router is selected in case rng generates same router

parent 6a2740db
......@@ -2935,7 +2935,7 @@ router_packet_receive( router_state * s,
* is selected. For local adaptive routing, if the same router as self is
* selected then we choose the neighboring router. */
if(src_grp_id != dest_grp_id
&& ((intm_router_id / s->params->num_routers) == local_grp_id || (intm_router_id / s->params->num_routers) == dest_grp_id))
&& ((intm_router_id / s->params->num_routers) == src_grp_id || (intm_router_id / s->params->num_routers) == dest_grp_id))
intm_router_id = (s->router_id + s->params->num_routers) % s->params->total_routers;
/* progressive adaptive routing is only triggered when packet has to traverse a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment