X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Ft-rex%2Ft-rex-stateless.py;h=504ef50eef9d08a313f2b2608f258a2f7b1114d9;hp=b58a82a232477d188208aa3bf889b75b3eef8bbf;hb=b2f75ec0f52110c267b90372e657b664417c1f4b;hpb=030f0dff4adbb5da9be2a18cbafec9b077a6723f diff --git a/resources/tools/t-rex/t-rex-stateless.py b/resources/tools/t-rex/t-rex-stateless.py index b58a82a232..504ef50eef 100755 --- a/resources/tools/t-rex/t-rex-stateless.py +++ b/resources/tools/t-rex/t-rex-stateless.py @@ -48,7 +48,7 @@ import string import struct import sys -sys.path.insert(0, "/opt/trex-core-2.07/scripts/automation/"+\ +sys.path.insert(0, "/opt/trex-core-2.22/scripts/automation/"+\ "trex_control_plane/stl/") from trex_stl_lib.api import * @@ -392,8 +392,13 @@ def simple_burst(stream_a, stream_b, stream_lat_a, stream_lat_b, duration, rate, client.add_streams(stream_b, ports=[1]) if latency: - client.add_streams(stream_lat_a, ports=[0]) - client.add_streams(stream_lat_b, ports=[1]) + try: + client.add_streams(stream_lat_a, ports=[0]) + client.add_streams(stream_lat_b, ports=[1]) + except: + #Disable latency if NIC does not support requested stream type + print "##### FAILED to add latency streams #####" + latency = False #warmup phase if warmup_time > 0: