Commit af86b3ba authored by Leigh Stoller's avatar Leigh Stoller

Turn on lans for virtual nodes in assign_wrapper, now that Rob has

fixed the trivial_link problem for Lans.
Add an option to ptopgen that says to include the various virtnode
related things, so as not to slow down assign in the general case
that virtnodes are not being used.
parent 9b65b2e5
......@@ -688,13 +688,6 @@ foreach $lan (keys(%lans)) {
$realnodes++;
}
}
#
# Hmm, no emulated lans for now.
#
if ($emulated && (@members > 2) && ($virtnodes != scalar(@members))) {
fatal(65,"*** $0:\n".
" Emulated lans ($lan) not allowed yet! Only links.\n");
}
if ($simnodes > 0 && $realnodes == 0 && $sharks == 0) {
$trivial_ok = 1;
}
......@@ -1020,6 +1013,8 @@ while (1) {
if ($updating);
$ptopargs .= "-m $multiplex_factor "
if (defined($multiplex_factor));
$ptopargs .= "-v "
if ($virtcount);
system("ptopgen $ptopargs > $ptopfile");
TBDebugTimeStamp("ptopgen finished");
......
......@@ -11,14 +11,16 @@ use Getopt::Std;
sub usage()
{
print STDOUT "Usage: ptopgen [-s switch] [-e pid/eid] [-m factor]\n" .
print STDOUT "Usage: ptopgen [-v] [-s switch] [-e pid/eid] [-m factor]\n" .
" -e include given experiment's resources\n" .
" in the ptopfile (as if they were free)\n" .
" -v Include stuff for topologies with virtual nodes\n".
" -m Override multiplex_factor\n";
exit(-1);
}
my $optlist = "s:e:m:";
my $optlist = "s:e:m:v";
my $mfactor;
my $virtstuff = 0;
# Settings - Change these to your particular network.
......@@ -68,6 +70,9 @@ if (defined($options{"s"})) {
if (defined($options{"m"})) {
$mfactor = $options{"m"};
}
if (defined($options{"v"})) {
$virtstuff = 1;
}
if (defined($options{"e"})) {
($exempt_pid, $exempt_eid) = split( /\//, $options{"e"} );
......@@ -178,7 +183,7 @@ foreach $node (keys(%nodes)) {
#################################################################
$text .= " sim:100000";
}
if ($virtnode_capacity > 0) {
if ($virtstuff && $virtnode_capacity > 0) {
#
# Ditto for jailed nodes
#
......@@ -188,6 +193,7 @@ foreach $node (keys(%nodes)) {
else {
$text .= " pcvm:$virtnode_capacity";
}
$text .= " *lan:*";
# Add trivial bw spec.
$text .= " - - trivial_bw:400000";
}
......
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