summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKerim Gokarslan <kgokarsl@cisco.com>2017-09-22 15:02:17 -0700
committerKerim Gokarslan <kgokarsl@cisco.com>2017-09-26 12:33:19 -0700
commite88c91badeaea2f1b0dbea57ead41823027441f3 (patch)
tree3c0f28c7349a9d3b5fca058684ef9522d6908646
parent666f8c435109569e9ea643d4a59cb3b4c2f09e0b (diff)
NFVBENCH-33 STLError exception when the packet path drops all packets
Change-Id: Ibe48bb04e1e8a11e920c46792fda261855edc20d Signed-off-by: Kerim Gokarslan <kgokarsl@cisco.com>
-rw-r--r--nfvbench/traffic_client.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index ec63944..2a42b87 100644
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -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 = {}