Commit 7b5eb1bb authored by Leigh B Stoller's avatar Leigh B Stoller

Possible fix using shared lan and wanting to use the 10G interface:

* In the CM we have always ignored the BW settings on a shared lan,
  since there is no way to set the properties in geni-lib for such a
  lan. There is the local hack I added (linkwide properties), but that
  was also ignored for shared vlans. Now I am looking to see if there is
  a bandwidth specification there, and using that. I assume we do not
  care about delay/loss since well, we never have before.

* But even so, the mapper was ignoring it too. But we also have the code
  that tries to not use 10G interfaces unless explicitly asked for a 10G
  link, and that is not in the shared vlan path. So ... I made a few
  changes, the worst that can happen is that I broke share vlans for
  everyone except this one case.
parent 2538df91
...@@ -3113,9 +3113,19 @@ sub GetTicketAuxAux($) ...@@ -3113,9 +3113,19 @@ sub GetTicketAuxAux($)
} }
} }
if ($isshared) { if ($isshared) {
# Clear all this on "shared" vlans. Maybe later. # Using this method to allow the user to specify a bandwidth.
$bandwidth = 0; # What it is basically going to do, is force the mapper to
$rbandwidth = 0; # assign an interface that has the desired bandwidth.
if (defined($linkwide_properties) &&
defined($linkwide_properties->{"bandwidth"})) {
$bandwidth = $linkwide_properties->{"bandwidth"};
$rbandwidth = $bandwidth;
}
else {
# Clear all this on "shared" vlans.
$bandwidth = 0;
$rbandwidth = 0;
}
$latency = 0.0; $latency = 0.0;
$rlatency = 0.0; $rlatency = 0.0;
$lossrate = 0.0; $lossrate = 0.0;
......
...@@ -3342,19 +3342,25 @@ sub GenVirtLans($) ...@@ -3342,19 +3342,25 @@ sub GenVirtLans($)
$others->{'emulated'} = 1; $others->{'emulated'} = 1;
# assign seems to require this, but it seems wrong. # assign seems to require this, but it seems wrong.
$others->{'trivial_ok'} = 1; $others->{'trivial_ok'} = 1;
# This is probably not correct for all situations.
$bw = 1000; $bw = 1000;
} }
foreach my $member (@members) { foreach my $member (@members) {
my $virtnode = $member->virt_node(); my $virtnode = $member->virt_node();
my $vnodevname = $virtnode->vname(); my $vnodevname = $virtnode->vname();
my $plink = "portlan/$vname/$member"; my $plink = "portlan/$vname/$member";
my (undef,$bw0)= @{$member->_delayinfo()};
my $wiretype = $vlan->_wiretype();
if ($bw0 != 0) {
$wiretype = $self->GetWiretype($wiretype, $bw0);
}
$self->createLink($vname, $plink, $self->createLink($vname, $plink,
[$virtnode->_cmurn()], [$virtnode->_cmurn()],
{'virtual_node_id' => $vnodevname, {'virtual_node_id' => $vnodevname,
'virtual_interface_id' =>"$member" }, 'virtual_interface_id' =>"$member" },
{'virtual_node_id' => $lannode }, {'virtual_node_id' => $lannode },
$bw, $vlan->_wiretype(), $others); $bw, $wiretype, $others);
} }
} }
elsif (@members == 2) { elsif (@members == 2) {
......
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