diff options
Diffstat (limited to 'GPL/tools/trex/trex_stl_profile.py')
-rw-r--r-- | GPL/tools/trex/trex_stl_profile.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/GPL/tools/trex/trex_stl_profile.py b/GPL/tools/trex/trex_stl_profile.py index e3a3c8c0f9..772c656a07 100644 --- a/GPL/tools/trex/trex_stl_profile.py +++ b/GPL/tools/trex/trex_stl_profile.py @@ -160,14 +160,19 @@ def simple_burst( client.add_streams(streams=[i], ports=[j]) elif isinstance(framesize, str): mark = 0 + strp = len(streams) // len(ports) for i in ports[::2]: - client.add_streams(streams=streams[mark:mark+3], ports=[i]) - mark = mark + 3 + client.add_streams( + streams=streams[mark:mark+strp], ports=[i] + ) + mark = mark + strp if traffic_directions > 1: mark = len(streams) // 2 for i in ports[1::2]: - client.add_streams(streams=streams[mark:mark+3], ports=[i]) - mark = mark + 3 + client.add_streams( + streams=streams[mark:mark+strp], ports=[i] + ) + mark = mark + strp if latency: try: if isinstance(framesize, int): |