From b06f091ae65a7323231d84d188b863698169508b Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Wed, 24 Apr 2024 13:11:27 +0200 Subject: fix(ip6scale): Unify rnd profiles Some were not even using STLVmFlowVarRepeatableRandom. + Simplify seed calculation. Change-Id: If3211dd2336838ee1ad7137563ddf8cc90ebea00 Signed-off-by: Vratko Polak --- .../trex/trex-stl-ethip6-ip6dst-rnd10000-2p.py | 4 +--- .../trex/trex-stl-ethip6-ip6dst-rnd10000-6p.py | 8 +------- .../trex/trex-stl-ethip6-ip6dst-rnd100000-2p.py | 6 ++---- .../trex/trex-stl-ethip6-ip6dst-rnd100000-6p.py | 10 ++-------- .../trex/trex-stl-ethip6-ip6dst-rnd1000000-2p.py | 6 ++---- .../trex/trex-stl-ethip6-ip6dst-rnd1000000-6p.py | 17 +++++++++-------- 6 files changed, 17 insertions(+), 34 deletions(-) diff --git a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-2p.py b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-2p.py index e3d39cc31e..eba560ae6d 100644 --- a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-2p.py +++ b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-2p.py @@ -47,14 +47,12 @@ class TrafficStreams(TrafficStreamsScaleClass): "src_start_ip": "2100::1", "dst_start_ip": "2200::0", "dst_end_ip": "2200::270F", - "seed": 1 }, # Direction E --> W: { "src_start_ip": "2200::1", "dst_start_ip": "2100::0", "dst_end_ip": "2100::270F", - "seed": 2 } ] self.pkt_base = [] @@ -89,7 +87,7 @@ class TrafficStreams(TrafficStreamsScaleClass): min_value=base, max_value=base + count, size=8, - seed=self.pkt_data[i]["seed"], + seed=i + 1, limit=(2**24 - 1) ), STLVmWrFlowVar( diff --git a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-6p.py b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-6p.py index 564ffbb83d..2d20231177 100644 --- a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-6p.py +++ b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd10000-6p.py @@ -47,42 +47,36 @@ class TrafficStreams(TrafficStreamsScaleClass): "src_start_ip": "2100::1", "dst_start_ip": "2200::0", "dst_end_ip": "2200::270F", - "seed": 1 }, # Direction W --> E: { "src_start_ip": "2300::1", "dst_start_ip": "2400::0", "dst_end_ip": "2400::270F", - "seed": 2 }, # Direction W --> E: { "src_start_ip": "2500::1", "dst_start_ip": "2600::0", "dst_end_ip": "2600::270F", - "seed": 1 }, # Direction E --> W: { "src_start_ip": "2200::1", "dst_start_ip": "2100::0", "dst_end_ip": "2100::270F", - "seed": 2 }, # Direction E --> W: { "src_start_ip": "2400::1", "dst_start_ip": "2300::0", "dst_end_ip": "2300::270F", - "seed": 1 }, # Direction E --> W: { "src_start_ip": "2600::1", "dst_start_ip": "2500::0", "dst_end_ip": "2500::270F", - "seed": 2 } ] self.pkt_base = [] @@ -117,7 +111,7 @@ class TrafficStreams(TrafficStreamsScaleClass): min_value=base, max_value=base + count, size=8, - seed=self.pkt_data[i]["seed"], + seed=i + 1, limit=(2**24 - 1) ), STLVmWrFlowVar( diff --git a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-2p.py b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-2p.py index 4658e764c2..1aa01fa281 100644 --- a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-2p.py +++ b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-2p.py @@ -47,14 +47,12 @@ class TrafficStreams(TrafficStreamsScaleClass): "src_start_ip": "2100::1", "dst_start_ip": "2200::0", "dst_end_ip": "2200::1:869F", - "seed": 1 }, # Direction E --> W: { "src_start_ip": "2200::1", "dst_start_ip": "2100::0", "dst_end_ip": "2100::1:869F", - "seed": 2 } ] self.pkt_base = [] @@ -84,12 +82,12 @@ class TrafficStreams(TrafficStreamsScaleClass): self.pkt_vm.append( STLScVmRaw( [ - STLVmFlowVar( + STLVmFlowVarRepeatableRandom( name="ipv6_dst", min_value=base, max_value=base + count, size=8, - seed=self.pkt_data[i]["seed"], + seed=i + 1, limit=(2**24 - 1) ), STLVmWrFlowVar( diff --git a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-6p.py b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-6p.py index 5d1b265a77..854da9bf0b 100644 --- a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-6p.py +++ b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd100000-6p.py @@ -47,42 +47,36 @@ class TrafficStreams(TrafficStreamsScaleClass): "src_start_ip": "2100::1", "dst_start_ip": "2200::0", "dst_end_ip": "2200::1:869F", - "seed": 1 }, # Direction W --> E: { "src_start_ip": "2300::1", "dst_start_ip": "2400::0", "dst_end_ip": "2400::1:869F", - "seed": 2 }, # Direction W --> E: { "src_start_ip": "2500::1", "dst_start_ip": "2600::0", "dst_end_ip": "2600::1:869F", - "seed": 1 }, # Direction E --> W: { "src_start_ip": "2200::1", "dst_start_ip": "2100::0", "dst_end_ip": "2100::1:869F", - "seed": 2 }, # Direction E --> W: { "src_start_ip": "2400::1", "dst_start_ip": "2300::0", "dst_end_ip": "2300::1:869F", - "seed": 1 }, # Direction E --> W: { "src_start_ip": "2600::1", "dst_start_ip": "2500::0", "dst_end_ip": "2500::1:869F", - "seed": 2 } ] self.pkt_base = [] @@ -112,12 +106,12 @@ class TrafficStreams(TrafficStreamsScaleClass): self.pkt_vm.append( STLScVmRaw( [ - STLVmFlowVar( + STLVmFlowVarRepeatableRandom( name="ipv6_dst", min_value=base, max_value=base + count, size=8, - seed=self.pkt_data[i]["seed"], + seed=i + 1, limit=(2**24 - 1) ), STLVmWrFlowVar( diff --git a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-2p.py b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-2p.py index 8db6a6447b..d35d283e4f 100644 --- a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-2p.py +++ b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-2p.py @@ -47,14 +47,12 @@ class TrafficStreams(TrafficStreamsScaleClass): "src_start_ip": "2100::1", "dst_start_ip": "2200::0", "dst_end_ip": "2200::F:423F", - "seed": 1 }, # Direction E --> W: { "src_start_ip": "2200::1", "dst_start_ip": "2100::0", "dst_end_ip": "2100::F:423F", - "seed": 2 } ] self.pkt_base = [] @@ -84,12 +82,12 @@ class TrafficStreams(TrafficStreamsScaleClass): self.pkt_vm.append( STLScVmRaw( [ - STLVmFlowVar( + STLVmFlowVarRepeatableRandom( name="ipv6_dst", min_value=base, max_value=base + count, size=8, - seed=self.pkt_data[i]["seed"], + seed=i + 1, limit=(2**24 - 1) ), STLVmWrFlowVar( diff --git a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-6p.py b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-6p.py index 4a1307c510..71bd9b675e 100644 --- a/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-6p.py +++ b/GPL/traffic_profiles/trex/trex-stl-ethip6-ip6dst-rnd1000000-6p.py @@ -46,37 +46,37 @@ class TrafficStreams(TrafficStreamsScaleClass): { "src_start_ip": "2100::1", "dst_start_ip": "2200::0", - "dst_end_ip": "2200::F:423F" + "dst_end_ip": "2200::F:423F", }, # Direction W --> E: { "src_start_ip": "2300::1", "dst_start_ip": "2400::0", - "dst_end_ip": "2400::F:423F" + "dst_end_ip": "2400::F:423F", }, # Direction W --> E: { "src_start_ip": "2500::1", "dst_start_ip": "2600::0", - "dst_end_ip": "2600::F:423F" + "dst_end_ip": "2600::F:423F", }, # Direction E --> W: { "src_start_ip": "2200::1", "dst_start_ip": "2100::0", - "dst_end_ip": "2100::F:423F" + "dst_end_ip": "2100::F:423F", }, # Direction E --> W: { "src_start_ip": "2400::1", "dst_start_ip": "2300::0", - "dst_end_ip": "2300::F:423F" + "dst_end_ip": "2300::F:423F", }, # Direction E --> W: { "src_start_ip": "2600::1", "dst_start_ip": "2500::0", - "dst_end_ip": "2500::F:423F" + "dst_end_ip": "2500::F:423F", } ] self.pkt_base = [] @@ -106,12 +106,13 @@ class TrafficStreams(TrafficStreamsScaleClass): self.pkt_vm.append( STLScVmRaw( [ - STLVmFlowVar( + STLVmFlowVarRepeatableRandom( name="ipv6_dst", min_value=base, max_value=base + count, size=8, - op="inc" + seed=i + 1, + limit=(2**24 - 1) ), STLVmWrFlowVar( fv_name="ipv6_dst", -- cgit 1.2.3-korg