Commit 40a4a5a3 authored by Mike Hibler's avatar Mike Hibler
Browse files

Pass along (in the ltpmap file) whether tb-set-noshaping is in effect for a

parent 38c99582
......@@ -420,14 +420,15 @@ if ($query_result->numrows) {
# Linkdelays are in use if the link has a row in the linkdelays table.
# This is reflected in the following query as: linkdelays if iface!=NULL.
# We could look in the delays table to further distinguish unshaped
# links, but at the moment, we don't need that info.
# links, but at the moment, we don't need that info. We do look at the
# virt_lans nobwshaping field to see if the link is being shaped.
# Argh...further complicated by the reserved table node_id being either
# a pnode or a vnode name while vinterfaces identifies a pnode with
# node_id if vnode_id==NULL and a vnode with vnode_id if vnode_id!=NULL.
$query_result =
DBQueryFatal("select v.member,v.vname,i.mac,vi.mac,vi.type,l.iface".
DBQueryFatal("select v.member,v.vname,i.mac,vi.mac,vi.type,l.iface,v.nobwshaping".
" from reserved as r join virt_lans as v".
" left join interfaces as i".
" on v.ip=i.IP and r.node_id=i.node_id".
......@@ -443,7 +444,7 @@ if ($query_result->numrows) {
" and r.eid=v.eid and r.vname=v.vnode and".
"'$pid' and r.eid='$eid'");
if ($query_result->numrows) {
while (my ($memb,$vlan,$imac,$vmac,$vtype,$iface) =
while (my ($memb,$vlan,$imac,$vmac,$vtype,$iface,$noshape) =
$query_result->fetchrow_array) {
if (exists($virt_lans{$vlan}->{"MEMBERS"}->{$memb})) {
my $member = $virt_lans{$vlan}->{"MEMBERS"}->{$memb};
......@@ -458,7 +459,20 @@ if ($query_result->numrows) {
$member->{"mac"} = $imac;
$member->{"encap"} = "none";
if (defined($iface)) {
if ($noshape) {
# XXX "noshaping" means just no BW shaping,
# other shaping still happens. So we identify it
# as such here. We continue to distinguish linkdelays
# as the presence of on-node shaping has other
# implications for linktest.
if (defined($iface)) {
$member->{"dstyle"} = "linkdelay-nobw";
} else {
$member->{"dstyle"} = "dnode-nobw";
} elsif (defined($iface)) {
$member->{"dstyle"} = "linkdelay";
} else {
$member->{"dstyle"} = "dnode";
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