aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/trex/trex.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pkt_gen/trex/trex.py')
-rw-r--r--tools/pkt_gen/trex/trex.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/pkt_gen/trex/trex.py b/tools/pkt_gen/trex/trex.py
index ae262306..e8ed42f1 100644
--- a/tools/pkt_gen/trex/trex.py
+++ b/tools/pkt_gen/trex/trex.py
@@ -284,7 +284,9 @@ class Trex(ITrafficGenerator):
right = traffic['frame_rate']
center = traffic['frame_rate']
- while num_test <= tests:
+ # execute 10 iterations to find out best tput with 0% packet loss
+ # unless 0% packet loss is detected for initial frame_rate
+ while num_test <= 10:
test_lossrate = ((stats["total"]["opackets"] - stats["total"]
["ipackets"]) * 100) / stats["total"]["opackets"]
self._logger.debug("Iteration: %s, frame rate: %s, throughput_rx_fps: %s, frame_loss_percent: %s",