Scalability tests and log improvement
Change-Id: I510002ea48ecc17e86d771e85c79b85cadf08f32
diff --git a/Fabric/Utilities/src/python/oftest/dataplane.py b/Fabric/Utilities/src/python/oftest/dataplane.py
index 839fe9e..bc36d56 100644
--- a/Fabric/Utilities/src/python/oftest/dataplane.py
+++ b/Fabric/Utilities/src/python/oftest/dataplane.py
@@ -63,11 +63,15 @@
#return e == p
#some nic card have capature problem, will have more bytes capatured.
if pkt.find(exp_pkt) >=0:
+ if self.config["dump_packet"]:
+ self.logger.debug("found pkt->"+(" ".join("{:02x}".format(ord(c)) for c in exp_pkt)))
+
return True
else:
if self.config["dump_packet"]:
- self.logger.debug("rx pkt ->"+(" ".join("{:02x}".format(ord(c)) for c in pkt)))
- self.logger.debug("expect pkt->"+(" ".join("{:02x}".format(ord(c)) for c in exp_pkt)))
+ pass
+ # self.logger.debug("rx pkt ->"+(" ".join("{:02x}".format(ord(c)) for c in pkt)))
+ # self.logger.debug("expect pkt->"+(" ".join("{:02x}".format(ord(c)) for c in exp_pkt)))
return False
@@ -246,15 +250,15 @@
# Enqueue packet
pkt, timestamp = port.recv()
port_number = port._port_number
- self.logger.debug("Pkt len %d in on port %d",
- len(pkt), port_number)
+ # self.logger.debug("Pkt len %d in on port %d",
+ # len(pkt), port_number)
if self.pcap_writer:
self.pcap_writer.write(pkt, timestamp, port_number)
queue = self.packet_queues[port_number]
if len(queue) >= self.MAX_QUEUE_LEN:
# Queue full, throw away oldest
queue.pop(0)
- self.logger.debug("Discarding oldest packet to make room")
+ # self.logger.debug("Discarding oldest packet to make room")
queue.append((pkt, timestamp))
self.cvar.notify_all()