summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/common
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/common')
-rwxr-xr-xscripts/automation/trex_control_plane/common/trex_streams.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/common/trex_streams.py b/scripts/automation/trex_control_plane/common/trex_streams.py
index 0d77b457..caeaa8cf 100755
--- a/scripts/automation/trex_control_plane/common/trex_streams.py
+++ b/scripts/automation/trex_control_plane/common/trex_streams.py
@@ -415,7 +415,8 @@ class STLStream(object):
self_start = True,
isg = 0.0,
rx_stats = None,
- next_stream_id = -1):
+ next_stream_id = -1,
+ stream_id = None):
# type checking
if not isinstance(mode, STLTXMode):
@@ -437,7 +438,7 @@ class STLStream(object):
raise STLError("continuous stream cannot have a next stream ID")
# use a random 31 bit for ID
- self.stream_id = random.getrandbits(31)
+ self.stream_id = stream_id if stream_id is not None else random.getrandbits(31)
self.fields = {}