From 15f65ff08330764e55f72f8ef76effca1afd7b33 Mon Sep 17 00:00:00 2001 From: Kerim Gokarslan Date: Fri, 22 Sep 2017 15:02:17 -0700 Subject: NFVBENCH-33 STLError exception when the packet path drops all packets Change-Id: Ibe48bb04e1e8a11e920c46792fda261855edc20d Signed-off-by: Kerim Gokarslan --- nfvbench/traffic_client.py | 9 +++++++-- 1 file 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 = {} -- cgit 1.2.3-korg