Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
3e624fb2
Commit
3e624fb2
authored
15 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Added openvswitch kernel switch.
parent
8abc3472
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/linearbandwidth.py
+9
-5
9 additions, 5 deletions
examples/linearbandwidth.py
with
9 additions
and
5 deletions
examples/linearbandwidth.py
+
9
−
5
View file @
3e624fb2
...
...
@@ -27,7 +27,7 @@
flush
=
sys
.
stdout
.
flush
from
mininet.net
import
init
,
Mininet
from
mininet.node
import
KernelSwitch
,
UserSwitch
from
mininet.node
import
KernelSwitch
,
UserSwitch
,
OVSKernelSwitch
from
mininet.topo
import
Topo
,
Node
from
mininet.log
import
lg
...
...
@@ -59,18 +59,22 @@ def __init__( self, N ):
# Consider all switches and hosts 'on'
self
.
enable_all
()
def
linearBandwidthTest
(
lengths
):
"
Check bandwidth at various lengths along a switch chain.
"
datapaths
=
[
'
kernel
'
,
'
user
'
]
results
=
{}
switchCount
=
max
(
lengths
)
hostCount
=
switchCount
+
1
for
datapath
in
datapaths
:
switches
=
{
'
reference kernel
'
:
KernelSwitch
,
'
reference user
'
:
UserSwitch
,
'
Open vSwitch kernel
'
:
OVSKernelSwitch
}
for
datapath
in
switches
.
keys
():
print
"
*** testing
"
,
datapath
,
"
datapath
"
Switch
=
KernelS
witch
if
datapath
==
'
kernel
'
else
UserSwitch
Switch
=
s
witch
es
[
datapath
]
results
[
datapath
]
=
[]
net
=
Mininet
(
topo
=
LinearTestTopo
(
hostCount
),
switch
=
Switch
)
net
.
start
()
...
...
@@ -87,7 +91,7 @@ def linearBandwidthTest( lengths ):
results
[
datapath
]
+=
[
(
n
,
bandwidth
)
]
net
.
stop
()
for
datapath
in
datapaths
:
for
datapath
in
switches
.
keys
()
:
print
print
"
*** Linear network results for
"
,
datapath
,
"
datapath:
"
print
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment