summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/automation/regression/setups/kiwi02/benchmark.yaml126
-rw-r--r--scripts/automation/regression/setups/trex-dan/benchmark.yaml126
-rw-r--r--scripts/automation/regression/setups/trex04/benchmark.yaml137
-rw-r--r--scripts/automation/regression/setups/trex08/benchmark.yaml125
-rw-r--r--scripts/automation/regression/setups/trex09/benchmark.yaml125
-rw-r--r--scripts/automation/regression/setups/trex11/config.yaml33
-rw-r--r--scripts/automation/regression/setups/trex12/benchmark.yaml145
-rw-r--r--scripts/automation/regression/setups/trex14/benchmark.yaml123
-rw-r--r--scripts/automation/regression/setups/trex17/benchmark.yaml125
-rw-r--r--scripts/automation/regression/setups/trex25/benchmark.yaml125
-rwxr-xr-xscripts/automation/regression/stateless_tests/stl_benchmark_test.py46
-rwxr-xr-xscripts/stl/hlt/hlt_udp_rand_len_9k.py31
-rw-r--r--scripts/stl/udp_1pkt_simple.py25
-rw-r--r--scripts/stl/udp_1pkt_tuple_gen.py12
14 files changed, 1240 insertions, 64 deletions
diff --git a/scripts/automation/regression/setups/kiwi02/benchmark.yaml b/scripts/automation/regression/setups/kiwi02/benchmark.yaml
index def062dc..49d86003 100644
--- a/scripts/automation/regression/setups/kiwi02/benchmark.yaml
+++ b/scripts/automation/regression/setups/kiwi02/benchmark.yaml
@@ -19,7 +19,7 @@ nat_dict: &nat_dict
pool_netmask : 255.255.255.0
-### tests ###
+### stateful ###
test_jumbo:
multiplier : 55
@@ -119,3 +119,127 @@ test_rx_check_sfr_ipv6:
bw_per_core : 20323
+
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/setups/trex-dan/benchmark.yaml b/scripts/automation/regression/setups/trex-dan/benchmark.yaml
index fde94f94..255fd1ba 100644
--- a/scripts/automation/regression/setups/trex-dan/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex-dan/benchmark.yaml
@@ -19,7 +19,7 @@ nat_dict: &nat_dict
pool_netmask : 255.255.255.0
-### tests ###
+### stateful ###
test_jumbo:
multiplier : 2.8
@@ -124,3 +124,127 @@ test_rx_check_sfr_ipv6:
bw_per_core : 4773
+
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/setups/trex04/benchmark.yaml b/scripts/automation/regression/setups/trex04/benchmark.yaml
index 9860a371..bebaef07 100644
--- a/scripts/automation/regression/setups/trex04/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex04/benchmark.yaml
@@ -2,6 +2,7 @@
#### T-Rex benchmark configuration file ####
################################################################
+### stateful ###
test_jumbo:
multiplier : 2.8
@@ -27,3 +28,139 @@ test_static_routing_imix_asymmetric:
bw_per_core : 13742
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/setups/trex08/benchmark.yaml b/scripts/automation/regression/setups/trex08/benchmark.yaml
index 79f727cc..19749848 100644
--- a/scripts/automation/regression/setups/trex08/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex08/benchmark.yaml
@@ -2,6 +2,7 @@
#### TRex benchmark configuration file ####
###############################################################
+### stateful ###
test_jumbo:
multiplier : 150
@@ -47,3 +48,127 @@ test_rx_check_sfr:
bw_per_core : 20871
+
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/setups/trex09/benchmark.yaml b/scripts/automation/regression/setups/trex09/benchmark.yaml
index bb90acb0..b5397a9f 100644
--- a/scripts/automation/regression/setups/trex09/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex09/benchmark.yaml
@@ -2,6 +2,7 @@
#### T-Rex benchmark configuration file ####
################################################################
+### stateful ###
test_jumbo:
multiplier : 110
@@ -47,3 +48,127 @@ test_rx_check_sfr:
bw_per_core : 20469
+
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/setups/trex11/config.yaml b/scripts/automation/regression/setups/trex11/config.yaml
index 876a1afd..7bb5b6d4 100644
--- a/scripts/automation/regression/setups/trex11/config.yaml
+++ b/scripts/automation/regression/setups/trex11/config.yaml
@@ -34,36 +34,5 @@
trex:
hostname : csi-trex-11
- cores : 2
+ cores : 1
modes : ['loopback', 'virtual']
-
-router:
- model : 1RU
- hostname : ASR1001_T-Rex
-# ip_address : 10.56.199.247
- ip_address : 10.56.199.247123123123
- image : asr1001-universalk9.BLD_V155_1_S_XE314_THROTTLE_LATEST_20141112_090734-std.bin
- #image : asr1001-universalk9.BLD_V155_2_S_XE315_THROTTLE_LATEST_20150121_110036-std.bin
- #image : asr1001-universalk9.BLD_V155_2_S_XE315_THROTTLE_LATEST_20150324_100047-std.bin
- line_password : lab
- en_password : lab
- mgmt_interface : GigabitEthernet0/0/0
- clean_config : /Configurations/danklei/asr1001_TRex_clean_config.cfg
- intf_masking : 255.255.255.0
- ipv6_mask : 64
- interfaces :
- - client :
- name : GigabitEthernet0/0/1
- src_mac_addr : 0000.0001.0000
- dest_mac_addr : 0000.0001.0000
- server :
- name : GigabitEthernet0/0/2
- src_mac_addr : 0000.0001.0000
- dest_mac_addr : 0000.0001.0000
- vrf_name : null
-
-tftp:
- hostname : ats-asr-srv-1
- ip_address : 10.56.128.23
- root_dir : /auto/avc-devtest/
- images_path : /images/1RU/
diff --git a/scripts/automation/regression/setups/trex12/benchmark.yaml b/scripts/automation/regression/setups/trex12/benchmark.yaml
index 1f4e82b5..5a30214c 100644
--- a/scripts/automation/regression/setups/trex12/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex12/benchmark.yaml
@@ -2,53 +2,180 @@
#### TRex benchmark configuration file ####
###############################################################
+### stateful ###
+
test_jumbo:
multiplier : 14
cores : 1
- bw_per_core : 540208
+ bw_per_core : 689664
test_routing_imix:
multiplier : 8
cores : 1
- bw_per_core : 34128
+ bw_per_core : 45422
test_routing_imix_64:
multiplier : 2200
cores : 1
- bw_per_core : 5893
+ bw_per_core : 11655
test_static_routing_imix_asymmetric:
multiplier : 4
cores : 1
- bw_per_core : 34339
+ bw_per_core : 45294
test_ipv6_simple:
multiplier : 8
cores : 1
- bw_per_core : 19064
+ bw_per_core : 29332
test_rx_check_http: &rx_http
multiplier : 11000
cores : 1
rx_sample_rate : 16
- bw_per_core : 39560
+ bw_per_core : 47813
test_rx_check_http_ipv6:
<< : *rx_http
- bw_per_core : 49237
+ bw_per_core : 55607
test_rx_check_sfr: &rx_sfr
multiplier : 8
cores : 1
rx_sample_rate : 16
- bw_per_core : 16082
+ bw_per_core : 24203
test_rx_check_sfr_ipv6:
<< : *rx_sfr
- bw_per_core : 19198
+ bw_per_core : 28867
+
+
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/setups/trex14/benchmark.yaml b/scripts/automation/regression/setups/trex14/benchmark.yaml
index 8da359db..5857cd2c 100644
--- a/scripts/automation/regression/setups/trex14/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex14/benchmark.yaml
@@ -19,7 +19,7 @@ nat_dict: &nat_dict
pool_netmask : 255.255.255.0
-### tests ###
+### stateful ###
test_jumbo:
multiplier : 17
@@ -119,5 +119,126 @@ test_rx_check_sfr_ipv6:
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
diff --git a/scripts/automation/regression/setups/trex17/benchmark.yaml b/scripts/automation/regression/setups/trex17/benchmark.yaml
index 60860f54..1d792fe5 100644
--- a/scripts/automation/regression/setups/trex17/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex17/benchmark.yaml
@@ -2,6 +2,7 @@
#### T-Rex benchmark configuration file ####
################################################################
+### stateful ###
test_jumbo:
multiplier : 2.8
@@ -27,3 +28,127 @@ test_static_routing_imix_asymmetric:
bw_per_core : 9635
+
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/setups/trex25/benchmark.yaml b/scripts/automation/regression/setups/trex25/benchmark.yaml
index df9eaef3..6a0021de 100644
--- a/scripts/automation/regression/setups/trex25/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex25/benchmark.yaml
@@ -19,7 +19,7 @@ nat_dict: &nat_dict
pool_netmask : 255.255.255.0
-### tests ###
+### stateful ###
test_jumbo:
multiplier : 6
@@ -124,3 +124,126 @@ test_rx_check_sfr_ipv6:
bw_per_core : 19663
+### stateless ###
+
+test_CPU_benchmark:
+ profiles:
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 64, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+# causes queue full
+# - name : stl/udp_1pkt_simple.py
+# kwargs : {packet_len: 64, packet_count: 1000}
+# cpu_util : 1
+# bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 10}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 100}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_simple.py
+ kwargs : {packet_len: 9000, packet_count: 1000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/imix.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 64}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 128}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 256}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 512}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 1500}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 4000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_1pkt_tuple_gen.py
+ kwargs : {packet_len: 9000}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/pcap.py
+ kwargs : {ipg_usec: 2, loop_count: 0}
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+ - name : stl/hlt/hlt_udp_rand_len_9k.py
+ cpu_util : 1
+ bw_per_core : 1
+
+
diff --git a/scripts/automation/regression/stateless_tests/stl_benchmark_test.py b/scripts/automation/regression/stateless_tests/stl_benchmark_test.py
new file mode 100755
index 00000000..65efa55e
--- /dev/null
+++ b/scripts/automation/regression/stateless_tests/stl_benchmark_test.py
@@ -0,0 +1,46 @@
+#!/router/bin/python
+from .stl_general_test import CStlGeneral_Test, CTRexScenario
+from trex_stl_lib.api import *
+import os, sys
+from collections import deque
+from time import time, sleep
+
+class STLBenchmark_Test(CStlGeneral_Test):
+ """Benchark stateless performance"""
+
+ def test_CPU_benchmark(self):
+ timeout = 30 # max time to wait for stabilization
+ stabilize = 5 # ensure stabilization over this period
+
+ for profile_bench in self.get_benchmark_param('profiles'):
+ cpu_utils = deque([0] * stabilize, maxlen = stabilize)
+ kwargs = profile_bench.get('kwargs', {})
+ print('Testing profile %s, kwargs: %s' % (profile_bench['name'], kwargs))
+ profile = STLProfile.load(os.path.join(CTRexScenario.scripts_path, profile_bench['name']), port_id = 0, **kwargs)
+
+ self.stl_trex.reset()
+ self.stl_trex.clear_stats()
+ self.stl_trex.add_streams(profile, ports = [0, 1])
+ self.stl_trex.start(ports = [0, 1], mult = '10%')
+ start_time = time()
+
+ for i in range(timeout + 1):
+ stats = self.stl_trex.get_stats()
+ cpu_utils.append(stats['global']['cpu_util'])
+ print stats['global']['cpu_util']
+ if i > stabilize and min(cpu_utils) > max(cpu_utils) * 0.98 - 0.1:
+ break
+ sleep(0.5)
+
+ if i == timeout:
+ raise Exception('Timeout on waiting for stabilization, CPU util values: %s' % cpu_utils)
+ if stats[0]['opackets'] < 10000 or stats[1]['opackets'] < 10000:
+ raise Exception('Too few opackets, port0: %s, port1: %s' % (stats[0]['opackets'], stats[1]['opackets']))
+ print stats['global']
+ if stats['global']['queue_full'] > 100000:
+ raise Exception('Too much queue_full: %s' % stats['global']['queue_full'])
+
+ bw_per_core = 100 * stats['global']['tx_bps'] / cpu_utils[-1] / 1e6
+ print('Done (%ss), CPU util: %4g, bw_per_core: %6sMb/core' % (int(time() - start_time), cpu_utils[-1], int(bw_per_core)))
+
+
diff --git a/scripts/stl/hlt/hlt_udp_rand_len_9k.py b/scripts/stl/hlt/hlt_udp_rand_len_9k.py
new file mode 100755
index 00000000..1966823c
--- /dev/null
+++ b/scripts/stl/hlt/hlt_udp_rand_len_9k.py
@@ -0,0 +1,31 @@
+from trex_stl_lib.trex_stl_hltapi import STLHltStream
+
+
+class STLS1(object):
+ '''
+ Create Eth/IP/UDP steam with random packet size (L3 size from 50 to 9*1024)
+ '''
+
+ def get_streams (self, direction = 0, **kwargs):
+ min_size = 50
+ max_size = 9*1024
+ return [STLHltStream(length_mode = 'random',
+ l3_length_min = min_size,
+ l3_length_max = max_size,
+ l3_protocol = 'ipv4',
+ ip_src_addr = '16.0.0.1',
+ ip_dst_addr = '48.0.0.1',
+ l4_protocol = 'udp',
+ udp_src_port = 1025,
+ udp_dst_port = 12,
+ rate_pps = 1000,
+ ignore_macs = True,
+ )
+ ]
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+
diff --git a/scripts/stl/udp_1pkt_simple.py b/scripts/stl/udp_1pkt_simple.py
index 0407f9c9..b84626a1 100644
--- a/scripts/stl/udp_1pkt_simple.py
+++ b/scripts/stl/udp_1pkt_simple.py
@@ -2,18 +2,21 @@ from trex_stl_lib.api import *
class STLS1(object):
- def create_stream (self):
- return STLStream(
- packet =
- STLPktBuilder(
- pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/
- UDP(dport=12,sport=1025)/(10*'x')
- ),
- mode = STLTXCont())
-
- def get_streams (self, direction = 0, **kwargs):
+ def create_stream (self, packet_len, packet_count):
+ base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
+ base_pkt_len = len(base_pkt)
+ base_pkt /= 'x' * max(0, packet_len - base_pkt_len)
+ packets = []
+ for i in range(packet_count):
+ packets.append(STLStream(
+ packet = STLPktBuilder(pkt = base_pkt),
+ mode = STLTXCont()
+ ))
+ return packets
+
+ def get_streams (self, direction = 0, packet_len = 64, packet_count = 1, **kwargs):
# create 1 stream
- return [ self.create_stream() ]
+ return self.create_stream(packet_len - 4, packet_count)
# dynamic load - used for trex console or simulator
diff --git a/scripts/stl/udp_1pkt_tuple_gen.py b/scripts/stl/udp_1pkt_tuple_gen.py
index be8620c8..4e9ab12d 100644
--- a/scripts/stl/udp_1pkt_tuple_gen.py
+++ b/scripts/stl/udp_1pkt_tuple_gen.py
@@ -2,16 +2,12 @@ from trex_stl_lib.api import *
class STLS1(object):
- def __init__ (self):
- self.fsize =64;
-
- def create_stream (self):
+ def create_stream (self, packet_len):
# create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
- pad = max(0, size - len(base_pkt)) * 'x'
+ pad = max(0, packet_len - len(base_pkt)) * 'x'
vm = STLScVmRaw( [ STLVmTupleGen ( ip_min="16.0.0.1", ip_max="16.0.0.2",
port_min=1025, port_max=65535,
@@ -31,9 +27,9 @@ class STLS1(object):
- def get_streams (self, direction = 0, **kwargs):
+ def get_streams (self, direction = 0, packet_len = 64, **kwargs):
# create 1 stream
- return [ self.create_stream() ]
+ return [ self.create_stream(packet_len - 4) ]
# dynamic load - used for trex console or simulator