NFVBENCH-33 STLError exception when the packet path drops all packets 79/45979/1
authorKerim Gokarslan <kgokarsl@cisco.com>
Fri, 22 Sep 2017 22:02:17 +0000 (15:02 -0700)
committerahothan <ahothan@cisco.com>
Fri, 20 Oct 2017 07:37:13 +0000 (00:37 -0700)
Change-Id: Ibe48bb04e1e8a11e920c46792fda261855edc20d
Signed-off-by: Kerim Gokarslan <kgokarsl@cisco.com>
nfvbench/traffic_client.py

index ec63944..2a42b87 100644 (file)
@@ -25,6 +25,7 @@ from stats_collector import IterationCollector
 import struct
 import time
 import traffic_gen.traffic_utils as utils
+from trex_stl_lib.api import STLError
 from utils import cast_integer
 
 
@@ -629,8 +630,12 @@ class TrafficClient(object):
 
         # Obtain the average drop rate in for middle load
         middle = (left + right) / 2.0
-        stats, rates = self.__run_search_iteration(middle)
-
+        try:
+            stats, rates = self.__run_search_iteration(middle)
+        except STLError:
+            LOG.exception("Got exception from traffic generator during binary search")
+            self.__targets_found(left, targets, results)
+            return
         # Split target dicts based on the avg drop rate
         left_targets = {}
         right_targets = {}