summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKerim Gokarslan <kgokarsl@cisco.com>2017-09-22 15:02:17 -0700
committerahothan <ahothan@cisco.com>2017-10-20 00:37:13 -0700
commit15f65ff08330764e55f72f8ef76effca1afd7b33 (patch)
tree3c0f28c7349a9d3b5fca058684ef9522d6908646
parentbe1e12371b0982348774e59f2dcdf876ca5ec22e (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 = {}