GitLab maintenance scheduled for Today, 2019-12-05, from 17:00 to 18:00 CT - Services will be unavailable during this time.

Commit b7d3d6d8 authored by Misbah Mubarak's avatar Misbah Mubarak

allowing packets to take non-minimal routes

parent e1a79130
......@@ -2851,7 +2851,7 @@ router_packet_receive( router_state * s,
// printf("\n Packet %llu source %d arrived at router %d ", msg->packet_ID, msg->src_terminal_id, s->router_id);
/* Set the default route as minimal for prog-adaptive */
if(routing == PROG_ADAPTIVE && cur_chunk->msg.last_hop == TERMINAL)
if((routing == PROG_ADAPTIVE || routing == ADAPTIVE) && cur_chunk->msg.last_hop == TERMINAL)
cur_chunk->msg.path_type = MINIMAL;
/* for prog-adaptive routing, record the current route of packet */
......@@ -2901,9 +2901,6 @@ router_packet_receive( router_state * s,
cur_chunk->msg.path_type = MINIMAL;
}
if(dest_router_id == s->router_id )
cur_chunk->msg.path_type = MINIMAL;
next_path_type = cur_chunk->msg.path_type;
if(cur_chunk->msg.path_type != MINIMAL && cur_chunk->msg.path_type != NON_MINIMAL)
......
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