Commit e02b2464 authored by Misbah Mubarak's avatar Misbah Mubarak
Browse files

changes to local adaptive routing

parent 07be9b5e
...@@ -518,7 +518,12 @@ static void dragonfly_read_config(const char * anno, dragonfly_param *params){ ...@@ -518,7 +518,12 @@ static void dragonfly_read_config(const char * anno, dragonfly_param *params){
rc = configuration_get_value_int(&config, "PARAMS", "adaptive_threshold", anno, &adaptive_threshold); rc = configuration_get_value_int(&config, "PARAMS", "adaptive_threshold", anno, &adaptive_threshold);
if(rc) { if(rc) {
adaptive_threshold = p->local_vc_size / 8; adaptive_threshold = p->local_vc_size / 8;
printf("\n Setting adaptive threshold to %d ", adaptive_threshold);
} }
else
{
printf("\n Setting adaptive threshold to %d ", adaptive_threshold);
}
rc = configuration_get_value_int(&config, "PARAMS", "global_vc_size", anno, &p->global_vc_size); rc = configuration_get_value_int(&config, "PARAMS", "global_vc_size", anno, &p->global_vc_size);
if(rc) { if(rc) {
...@@ -2886,6 +2891,7 @@ router_packet_receive( router_state * s, ...@@ -2886,6 +2891,7 @@ router_packet_receive( router_state * s,
/* If destination router is in the same group then local adaptive routing is /* If destination router is in the same group then local adaptive routing is
* triggered */ * triggered */
if(dest_grp_id == src_grp_id && if(dest_grp_id == src_grp_id &&
dest_router_id != s->router_id &&
(routing == ADAPTIVE || routing == PROG_ADAPTIVE) (routing == ADAPTIVE || routing == PROG_ADAPTIVE)
&& cur_chunk->msg.last_hop == TERMINAL) && cur_chunk->msg.last_hop == TERMINAL)
{ {
......
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