aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiroslav Miklus <mmiklus@cisco.com>2016-10-20 14:41:09 +0200
committerPeter Mikus <pmikus@cisco.com>2016-10-24 16:07:51 +0000
commit318577024edcd1e54b9b4315e610fbacc8403511 (patch)
treedb96660dd9bde400a39784cc6754d1ec65bf9475
parent64b8f55af5dd6a0e7f360186cbd60ed788040939 (diff)
Skip latency measurements for unsupported streams
Disable latency measuremnts instead of failing in case when NIC does not support stream type. Change-Id: I9e810cb44832c77765059d3dcb6e3ba382abe039 Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
-rwxr-xr-xresources/tools/t-rex/t-rex-stateless.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/resources/tools/t-rex/t-rex-stateless.py b/resources/tools/t-rex/t-rex-stateless.py
index b58a82a232..21f3274af5 100755
--- a/resources/tools/t-rex/t-rex-stateless.py
+++ b/resources/tools/t-rex/t-rex-stateless.py
@@ -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: