Commit 2403c46c authored by Kirk Webb's avatar Kirk Webb

Minor fixes to Linux delay agent.

parent 664108af
......@@ -694,7 +694,7 @@ void set_link_params(int l_index, int blackhole, int p_which)
// Bandwidth by itself.
sprintf(cmd, "tc class change dev %s classid %d:1 htb "
"rate %d %s ceil %d %s",
"rate %d%s ceil %d%s",
iface, pipeno, (int) p_params->bw, p_params->bwspec,
(int) p_params->bw, p_params->bwspec);
......
......@@ -109,27 +109,31 @@ if ($? == 0) {
open(MAP, "$TMDELMAP")
or die("Could not open $TMDELMAP");
while (<MAP>) {
if ($_ =~ /^([-\w]+) simplex [-\w]+ ([-\w]+) (\d+)/ &&
$1 eq $linkname) {
$linktype = "simplex";
$iface = $2;
$pipe1 = $3;
if ($_ =~ /^([-\w]+) simplex [-\w]+ ([-\w]+) (\d+)/) {
if ($debug) {
print "Found simplex link: iface:$iface, pipe:$pipe1\n";
}
if ($1 eq $linkname) {
$linktype = "simplex";
$iface = $2;
$pipe1 = $3;
last;
}
}
elsif ($_ =~
/^([-\w]+) duplex [-\w]+ [-\w]+ ([-\w]+) ([-\w]+) (\d+) (\d+)/ &&
$1 eq $linkname) {
$linktype = "duplex";
$iface = $2;
$idev = $3;
$pipe1 = $4;
$pipe2 = $5;
/^([-\w]+) duplex [-\w]+ [-\w]+ ([-\w]+) ([-\w]+) (\d+) (\d+)/) {
if ($debug) {
print "Found duplex link: iface:$iface, idev:$idev, ".
"pipe1:$pipe1, pipe2:$pipe2\n";
}
if ($1 eq $linkname) {
$linktype = "duplex";
$iface = $2;
$idev = $3;
$pipe1 = $4;
$pipe2 = $5;
last;
}
}
else {
die("Could not parse line from delay map: $_");
......@@ -137,6 +141,10 @@ while (<MAP>) {
}
close(MAP);
if (!$iface) {
die("Could not find interface $linkname!\n");
}
#
# We are looking for bw/delay/plr primarily, but also queue info.
#
......
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