From f6de358b063a9ee23c64253d597781fa067a6ade Mon Sep 17 00:00:00 2001 From: Bob Lantz <rlantz@cs.stanford.edu> Date: Fri, 31 Oct 2014 15:06:15 -0700 Subject: [PATCH] Try to prime the pump to avoid PACKET_INs during iperf test Background: the reference controller is reactive and installs exact match rules. By attempting to start a telnet session we make sure that the ARP caches and TCP flow rules are set up (in one direction at least) before the test starts. This is intended to help with #413 --- examples/linearbandwidth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/linearbandwidth.py b/examples/linearbandwidth.py index 18ccf90d..5cd05f00 100755 --- a/examples/linearbandwidth.py +++ b/examples/linearbandwidth.py @@ -93,6 +93,9 @@ def linearBandwidthTest( lengths ): print "*** testing bandwidth" for n in lengths: src, dst = net.hosts[ 0 ], net.hosts[ n ] + # Try to prime the pump to reduce PACKET_INs during test + # since the reference controller is reactive + src.cmd( 'telnet', dst.IP(), '5001' ) print "testing", src.name, "<->", dst.name, bandwidth = net.iperf( [ src, dst ] ) print bandwidth -- GitLab