Module Expr Str ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias Import alias Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr BinOpMod Str NameLoad comprehension NameStore Call NameLoad Num NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr BinOpMod Str NameLoad comprehension NameStore Call NameLoad Num BinOpSub NameLoad Num Assign NameStore NameLoad For NameStore NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num For TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Slice Num NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore Dict Str Str NameLoad NameLoad Delete SubscriptDel NameLoad Index Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Str Assert CompareIn Str NameLoad For NameStore Call AttributeLoad NameLoad attr body Print Str NameLoad Str Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad ListLoad Assign NameStore Call NameLoad NameLoad keyword Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Print Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Print Str For NameStore NameLoad body Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Print Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad keyword Num Print NameLoad Expr Call NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad ListLoad TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Print Print Str NameLoad Str Print Assign NameStore SubscriptLoad NameLoad Index NameLoad Print Str For TupleStore NameStore NameStore NameLoad body Print NameLoad Str Print SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num Str Print Print decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Num Num Num Num Num Num Print Str NameLoad Expr Call NameLoad NameLoad
N/A N/A 
Test bandwidth (using iperf) on linear networks of varying size,
using both kernel and user datapaths.

We construct a network of N hosts and N-1 switches, connected as follows:

h1 <-> s1 <-> s2 .. sN-1
       |       |    |
       h2      h3   hN

WARNING: by default, the reference controller only supports 16
switches, so this test WILL NOT WORK unless you have recompiled
your controller to support 100 switches (or more.)

In addition to testing the bandwidth across varying numbers
of switches, this example demonstrates:

- creating a custom topology, LinearTestTopo
- using the ping() and iperf() tests from Mininet()
- testing both the kernel and user switches

 mininet.net Mininet mininet.node UserSwitch OVSKernelSwitch Controller mininet.topo Topo mininet.log lg mininet.util irange quietRun mininet.link TCLink functools partial N/A sys N/A flush N/A N/A sys stdout flush LinearTestTopo N/A Topo N/A N/A Topology for a string of N hosts and N-1 switches. __init__ N/A N/A self N N/A params N/A N/A N/A N/A Topo __init__ self params N/A hosts N/A N/A N/A self addHost N/A h%s h N/A h N/A irange 1 N N/A switches N/A N/A N/A self addSwitch N/A s%s s N/A s N/A irange 1 N/A N 1 N/A last None N/A switch switches N/A N/A last N/A N/A N/A N/A self addLink last switch N/A last switch N/A N/A N/A self addLink N/A hosts N/A 0 N/A switches N/A 0 N/A N/A host switch N/A zip N/A hosts N/A 1 switches N/A N/A N/A N/A self addLink host switch N/A N/A linearBandwidthTest N/A N/A lengths N/A N/A N/A Check bandwidth at various lengths along a switch chain. N/A results N/A N/A switchCount N/A max lengths N/A hostCount N/A switchCount 1 N/A switches N/A reference user Open vSwitch kernel UserSwitch OVSKernelSwitch N/A N/A switches N/A reference user N/A topo N/A LinearTestTopo hostCount N/A output N/A quietRun sysctl -w net.ipv4.tcp_congestion_control=reno N/A N/A reno output N/A datapath N/A N/A switches keys N/A N/A *** testing datapath datapath N/A Switch N/A switches N/A datapath N/A N/A results N/A datapath N/A N/A link N/A partial TCLink delay 1ms N/A net N/A Mininet topo topo switch Switch controller Controller waitConnected True link link N/A N/A N/A net start N/A *** testing basic connectivity N/A n lengths N/A N/A N/A N/A net ping N/A N/A N/A net hosts N/A 0 N/A N/A net hosts N/A n N/A *** testing bandwidth N/A n lengths N/A N/A N/A src dst N/A N/A N/A net hosts N/A 0 N/A N/A net hosts N/A n N/A N/A N/A src cmd telnet N/A N/A dst IP 5001 N/A testing N/A src name <-> N/A dst name N/A bandwidth N/A N/A net iperf N/A src dst seconds 10 N/A bandwidth N/A N/A flush N/A N/A results N/A datapath N/A N/A n bandwidth N/A N/A N/A net stop N/A datapath N/A N/A switches keys N/A N/A N/A *** Linear network results for datapath datapath: N/A N/A result N/A results N/A datapath N/A SwitchCount	iperf Results N/A N/A switchCount bandwidth result N/A N/A switchCount N/A N/A bandwidth N/A 0 server,  N/A bandwidth N/A 1 client N/A N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A lg setLogLevel info N/A sizes N/A 1 10 20 40 60 80 N/A *** Running linearBandwidthTest sizes N/A N/A linearBandwidthTest sizes