Commit 27a52de2 authored by Leigh B Stoller's avatar Leigh B Stoller

Bug fixes to previous revision.

parent 60a6886a
......@@ -733,10 +733,10 @@ void set_link_params(int l_index, int blackhole, int p_which)
info("entered the loop, pindex=%d, pipe=%d\n",
p_index, pipeno);
sprintf(cmd, "%s pipe %d config delay %dms bw %f%s plr %lf "
sprintf(cmd, "%s pipe %d config delay %dms bw %d%s plr %lf "
"queue %d%s ",
IPFW, pipeno, p_params->delay,
p_params->bw, p_params->bwspec,
(int) p_params->bw, p_params->bwspec,
(blackhole ? 1.0 : p_params->plr),
(p_params->flags_p &
PIPE_QSIZE_IN_BYTES ?
......@@ -811,8 +811,13 @@ int get_new_link_params(int l_index, event_handle_t handle,
} else
#endif
if(strcmp(argtype,"BANDWIDTH")== 0){
info("Bandwidth = %d\n", atoi(argvalue) * 1000);
link_map[l_index].params[p_num].bw = atoi(argvalue) * 1000;
int newbw = atoi(argvalue);
#ifdef USESOCKET
/* Convert to bits/s */
newbw = newbw * 1000;
#endif
info("Bandwidth = %d\n", newbw);
link_map[l_index].params[p_num].bw = newbw;
if (! gotpipe) {
link_map[l_index].params[1].bw = link_map[l_index].params[0].bw;
}
......
......@@ -426,8 +426,14 @@ void dump_link_map(){
info("pipe num = %d\n", link_map[i].pipes[j]);
info("vnode = %s\n", link_map[i].vnodes[j]);
info("delay = %d, bw = %d plr = %f\n", link_map[i].params[j].delay,
(int)link_map[i].params[j].bw, link_map[i].params[j].plr);
info("delay = %d, ", link_map[i].params[j].delay);
#ifdef USESOCKET
info("bw = %d, ", link_map[i].params[j].bw);
#else
info("bw = %.3f %s, ", link_map[i].params[j].bw,
link_map[i].params[j].bwspec);
#endif
info("plr = %d\n", link_map[i].params[j].plr);
info("q_size = %d buckets = %d n_qs = %d flags_p = %d\n",
link_map[i].params[j].q_size, link_map[i].params[j].buckets,
link_map[i].params[j].n_qs, link_map[i].params[j].flags_p);
......
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