Commit e55e2479 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Parser changes for veth devices: "tb-set-useveth on/off"

parent 1d0322b8
......@@ -159,9 +159,12 @@ LanLink instproc init {s nodes bw d type} {
# Allow user to control if link is emulated. Only links, not lans.
$self set emulated 0
# Allow user to turn of actual bw shaping on emulated links. Not lans.
# Allow user to turn off actual bw shaping on emulated links. Not lans.
$self set nobwshaping 0
# Allow user to turn on veth devices on emulated links. Not lans.
$self set useveth 0
# A simulated lanlink unless we find otherwise
$self set simulated 1
# Figure out if this is a lanlink that has at least
......@@ -494,11 +497,12 @@ LanLink instproc updatedb {DB} {
$self instvar uselinkdelay
$self instvar emulated
$self instvar nobwshaping
$self instvar useveth
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
foreach nodeport $nodelist {
set nodeportraw [join $nodeport ":"]
sql exec $DB "insert into virt_lans (pid,eid,vname,member,delay,rdelay,bandwidth,rbandwidth,lossrate,rlossrate,cost,widearea,emulated,uselinkdelay,nobwshaping) values (\"$pid\",\"$eid\",\"$self\",\"$nodeportraw\",$delay($nodeport),$rdelay($nodeport),$bandwidth($nodeport),$rbandwidth($nodeport),$loss($nodeport),$rloss($nodeport),$cost($nodeport),$widearea,$emulated,$uselinkdelay,$nobwshaping)"
sql exec $DB "insert into virt_lans (pid,eid,vname,member,delay,rdelay,bandwidth,rbandwidth,lossrate,rlossrate,cost,widearea,emulated,uselinkdelay,nobwshaping,usevethiface) values (\"$pid\",\"$eid\",\"$self\",\"$nodeportraw\",$delay($nodeport),$rdelay($nodeport),$bandwidth($nodeport),$rbandwidth($nodeport),$loss($nodeport),$rloss($nodeport),$cost($nodeport),$widearea,$emulated,$uselinkdelay,$nobwshaping,$useveth)"
}
}
......@@ -41,6 +41,7 @@ proc tb-force-endnodeshaping {onoff} {}
proc tb-set-multiplexed {link onoff} {}
proc tb-set-endnodeshaping {link onoff} {}
proc tb-set-noshaping {link onoff} {}
proc tb-set-useveth {link onoff} {}
Class Program
......
......@@ -600,6 +600,17 @@ proc tb-set-noshaping {link onoff} {
$link set nobwshaping $onoff
}
#
# For emulated links, allow veth device to be used. Not a user option.
#
proc tb-set-useveth {link onoff} {
if {[$link info class] != "Link"} {
perror "\[tb-set-useveth] $link is not a link."
return
}
$link set useveth $onoff
}
#
# Control linkdelays for lans and links
#
......
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