Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
8ce8646a
Commit
8ce8646a
authored
Jul 07, 2004
by
Leigh B. Stoller
Browse files
Add a couple of modelnet slots to the experiments table, which are not
currently used.
parent
2727d33b
Changes
5
Hide whitespace changes
Inline
Side-by-side
db/xmlconvert.in
View file @
8ce8646a
...
...
@@ -130,7 +130,10 @@ my %experiment_fields = ("multiplex_factor" => 1,
"
delay_osname
"
=>
1
,
"
sync_server
"
=>
1
,
"
use_ipassign
"
=>
1
,
"
ipassign_args
"
=>
1
);
"
ipassign_args
"
=>
1
,
"
usemodelnet
"
=>
1
,
"
modelnet_cores
"
=>
1
,
"
modelnet_edges
"
=>
1
);
# New parsing code state machine control.
my
$PARSING_NOTYET
=
0
;
...
...
tbsetup/ns2ir/lanlink.tcl
View file @
8ce8646a
...
...
@@ -599,6 +599,8 @@ Lan instproc updatedb {DB} {
$self instvar trivial_ok
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
$self instvar bandwidth
$self instvar rbandwidth
$self instvar ebandwidth
...
...
@@ -620,6 +622,11 @@ Lan instproc updatedb {DB} {
$self instvar settings
$self instvar member_settings
if
{
$modelnet
_cores > 0 || $modelnet_edges > 0
}
{
perror
"Lans are not allowed when using modelnet; just duplex links."
return
}
#
# Upload lan settings and them per-member settings
#
...
...
tbsetup/ns2ir/parse.tcl.in
View file @
8ce8646a
...
...
@@ -248,6 +248,11 @@ namespace eval GLOBALS {
# Use phys naming
variable use_physnaming 0
# Modelnet support. Number of physical core and edge nodes that user
# wants thrown at the problem.
variable modelnet_cores 0
variable modelnet_edges 0
}
# Load all our classes
...
...
tbsetup/ns2ir/sim.tcl.in
View file @
8ce8646a
...
...
@@ -255,6 +255,8 @@ Simulator instproc run {} {
var_import ::GLOBALS::delay_osname
var_import ::TBCOMPAT::objtypes
var_import ::TBCOMPAT::eventtypes
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
# Fill out IPs
if
{
! $use_ipassign
}
{
...
...
@@ -373,6 +375,15 @@ Simulator instproc run {} {
lappend fields
"delay_osname"
lappend values $delay_osname
}
if
{
$modelnet
_cores > 0 && $modelnet_edges > 0
}
{
lappend fields
"usemodelnet"
lappend values 1
lappend fields
"modelnet_cores"
lappend values $modelnet_cores
lappend fields
"modelnet_edges"
lappend values $modelnet_edges
}
$self spitxml_data
"experiments"
$fields $values
...
...
tbsetup/ns2ir/tb_compat.tcl.in
View file @
8ce8646a
...
...
@@ -892,3 +892,33 @@ proc tb-use-physnaming {onoff} {
set use_physnaming $onoff
}
#
# User indicates that this is a modelnet experiment. Be default, the number
# of core and edge nodes is set to one each. The user must increase those
# if desired.
#
proc tb-use-modelnet
{
onoff
}
{
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
if
{
$onoff
}
{
set modelnet_cores 1
set modelnet_edges 1
}
else
{
set modelnet_cores 0
set modelnet_edges 0
}
}
proc tb-set-modelnet-physnodes
{
cores edges
}
{
var_import ::GLOBALS::modelnet_cores
var_import ::GLOBALS::modelnet_edges
if
{
$cores
== 0 || $edges == 0
}
{
perror
"
\[
tb-set-modelnet-physnodes] cores and edges must be > 0"
return
}
set modelnet_cores $cores
set modelnet_edges $edges
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment