Skip to content
Snippets Groups Projects
Commit 3e624fb2 authored by Bob Lantz's avatar Bob Lantz
Browse files

Added openvswitch kernel switch.

parent 8abc3472
No related branches found
No related tags found
No related merge requests found
......@@ -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 = KernelSwitch if datapath == 'kernel' else UserSwitch
Switch = switches[ 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment