use a single dataplane instance for all tests
Creating and destroying dataplane instances was taking about 1/3 of the total
runtime.
diff --git a/src/python/oftest/dataplane.py b/src/python/oftest/dataplane.py
index d53e223..a5b4e26 100644
--- a/src/python/oftest/dataplane.py
+++ b/src/python/oftest/dataplane.py
@@ -347,3 +347,10 @@
def port_up(self, port_number):
"""Brings the specified port up"""
self.ports[port_number].up()
+
+ def flush(self):
+ """
+ Drop any queued packets.
+ """
+ for port_number in self.packet_queues.keys():
+ self.packet_queues[port_number] = []