summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/automation/regression/setups/kiwi02/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex-dan/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex04/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex08/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex09/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex12/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex14/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex17/benchmark.yaml38
-rw-r--r--scripts/automation/regression/setups/trex25/benchmark.yaml38
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_general_test.py3
-rw-r--r--scripts/automation/regression/stateless_tests/stl_client_test.py6
-rwxr-xr-xscripts/automation/regression/stateless_tests/stl_examples_test.py26
-rw-r--r--scripts/automation/regression/stateless_tests/stl_general_test.py30
-rwxr-xr-xscripts/automation/regression/stateless_tests/trex_client_pkg_test.py22
-rwxr-xr-xscripts/automation/regression/trex_unit_test.py14
-rw-r--r--scripts/stl/udp_1pkt_simple.py25
-rw-r--r--scripts/stl/udp_for_benchmarks.py29
17 files changed, 269 insertions, 228 deletions
diff --git a/scripts/automation/regression/setups/kiwi02/benchmark.yaml b/scripts/automation/regression/setups/kiwi02/benchmark.yaml
index 343d4120..3332aa5e 100644
--- a/scripts/automation/regression/setups/kiwi02/benchmark.yaml
+++ b/scripts/automation/regression/setups/kiwi02/benchmark.yaml
@@ -124,70 +124,70 @@ test_rx_check_sfr_ipv6:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# 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 c8b046d4..e9f12c45 100644
--- a/scripts/automation/regression/setups/trex-dan/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex-dan/benchmark.yaml
@@ -129,70 +129,70 @@ test_rx_check_sfr_ipv6:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# 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 d2b1c4f2..7b850d8e 100644
--- a/scripts/automation/regression/setups/trex04/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex04/benchmark.yaml
@@ -33,70 +33,70 @@ test_static_routing_imix_asymmetric:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# 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 c5c2fde7..aeeca004 100644
--- a/scripts/automation/regression/setups/trex08/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex08/benchmark.yaml
@@ -53,70 +53,70 @@ test_rx_check_sfr:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# 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 1f8fe47a..5bce90ca 100644
--- a/scripts/automation/regression/setups/trex09/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex09/benchmark.yaml
@@ -53,70 +53,70 @@ test_rx_check_sfr:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
diff --git a/scripts/automation/regression/setups/trex12/benchmark.yaml b/scripts/automation/regression/setups/trex12/benchmark.yaml
index 0ebc2bcb..87bd3114 100644
--- a/scripts/automation/regression/setups/trex12/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex12/benchmark.yaml
@@ -60,70 +60,70 @@ test_rx_check_sfr_ipv6:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# 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 afa27a82..aa4ac2d4 100644
--- a/scripts/automation/regression/setups/trex14/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex14/benchmark.yaml
@@ -123,70 +123,70 @@ test_rx_check_sfr_ipv6:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# 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 d9191a42..6fa28f16 100644
--- a/scripts/automation/regression/setups/trex17/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex17/benchmark.yaml
@@ -33,70 +33,70 @@ test_static_routing_imix_asymmetric:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 9000, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 9000, stream_count: 100}
cpu_util : 1
bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# 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 f87759f9..19fab1fe 100644
--- a/scripts/automation/regression/setups/trex25/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex25/benchmark.yaml
@@ -128,72 +128,72 @@ test_rx_check_sfr_ipv6:
test_CPU_benchmark:
profiles:
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.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}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_count: 10}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
- kwargs : {packet_len: 64, packet_count: 100}
+ - name : stl/udp_for_benchmarks.py
+ kwargs : {packet_len: 64, stream_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}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 64, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 128}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 256}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 512}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 1500}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 4000}
cpu_util : 1
bw_per_core : 1
- - name : stl/udp_1pkt_simple.py
+ - name : stl/udp_for_benchmarks.py
kwargs : {packet_len: 9000}
cpu_util : 1
bw_per_core : 1
# problem stabilizing CPU utilization at this setup
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 10}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 10}
# cpu_util : 1
# bw_per_core : 1
# problem stabilizing CPU utilization at this setup
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 100}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 100}
# cpu_util : 1
# bw_per_core : 1
# not enough memory + queue full if memory increase
-# - name : stl/udp_1pkt_simple.py
-# kwargs : {packet_len: 9000, packet_count: 1000}
+# - name : stl/udp_for_benchmarks.py
+# kwargs : {packet_len: 9000, stream_count: 1000}
# cpu_util : 1
# bw_per_core : 1
diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py
index 4e3e07e8..d2aaefa9 100755
--- a/scripts/automation/regression/stateful_tests/trex_general_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_general_test.py
@@ -274,7 +274,8 @@ class CTRexGeneral_Test(unittest.TestCase):
# e.args += ('T-Rex has crashed!')
# raise
- def unzip_client_package(self):
+ @staticmethod
+ def unzip_client_package():
client_pkg_files = glob('%s/trex_client*.tar.gz' % CTRexScenario.scripts_path)
if not len(client_pkg_files):
raise Exception('Could not find client package')
diff --git a/scripts/automation/regression/stateless_tests/stl_client_test.py b/scripts/automation/regression/stateless_tests/stl_client_test.py
index 10f56b3f..c5e0c3c6 100644
--- a/scripts/automation/regression/stateless_tests/stl_client_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_client_test.py
@@ -10,9 +10,9 @@ def get_error_in_percentage (golden, value):
def get_stl_profiles ():
profiles_path = os.path.join(CTRexScenario.scripts_path, 'stl/')
- profiles = glob.glob(profiles_path + "/*.py") + glob.glob(profiles_path + "yaml/*.yaml")
-
- return profiles
+ py_profiles = glob.glob(profiles_path + "/*.py")
+ yaml_profiles = glob.glob(profiles_path + "yaml/*.yaml")
+ return py_profiles + yaml_profiles
class STLClient_Test(CStlGeneral_Test):
diff --git a/scripts/automation/regression/stateless_tests/stl_examples_test.py b/scripts/automation/regression/stateless_tests/stl_examples_test.py
index 3f7d7b87..283635a7 100755
--- a/scripts/automation/regression/stateless_tests/stl_examples_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_examples_test.py
@@ -2,22 +2,24 @@
from .stl_general_test import CStlGeneral_Test, CTRexScenario
import os, sys
from misc_methods import run_command
+from time import sleep
+
+
+def setUpModule(self):
+ # examples connect by their own
+ if CTRexScenario.stl_trex.is_connected():
+ CTRexScenario.stl_trex.disconnect()
+ sleep(3)
+
+def tearDownModule():
+ # connect back at end of tests
+ if not CTRexScenario.stl_trex.is_connected():
+ CTRexScenario.stl_trex.connect()
+
class STLExamples_Test(CStlGeneral_Test):
"""This class defines the IMIX testcase of the T-Rex traffic generator"""
- def setUp(self):
- CStlGeneral_Test.setUp(self)
- # examples connect by their own
- if self.is_connected():
- CTRexScenario.stl_trex.disconnect()
-
- @classmethod
- def tearDownClass(cls):
- # connect back at end of tests
- if not cls.is_connected():
- CTRexScenario.stl_trex.connect()
-
def test_stl_examples(self):
examples_dir = '../trex_control_plane/stl/examples'
examples_to_test = [
diff --git a/scripts/automation/regression/stateless_tests/stl_general_test.py b/scripts/automation/regression/stateless_tests/stl_general_test.py
index 54388121..0700e7c2 100644
--- a/scripts/automation/regression/stateless_tests/stl_general_test.py
+++ b/scripts/automation/regression/stateless_tests/stl_general_test.py
@@ -10,18 +10,15 @@ from nose.tools import nottest
class CStlGeneral_Test(CTRexGeneral_Test):
"""This class defines the general stateless testcase of the T-Rex traffic generator"""
- #once for all tests under CStlGeneral_Test
- @classmethod
- def setUpClass(cls):
- cls.stl_trex = CTRexScenario.stl_trex
-
def setUp(self):
+ self.stl_trex = CTRexScenario.stl_trex
CTRexGeneral_Test.setUp(self)
# check basic requirements, should be verified at test_connectivity, here only skip test
if CTRexScenario.stl_init_error:
self.skip(CTRexScenario.stl_init_error)
- def connect(self, timeout = 20):
+ def connect(self, timeout = 100):
+ # need delay and check only because TRex process might be still starting
sys.stdout.write('Connecting')
for i in range(timeout):
try:
@@ -31,20 +28,23 @@ class CStlGeneral_Test(CTRexGeneral_Test):
print('')
return True
except:
- time.sleep(1)
+ time.sleep(0.1)
print('')
return False
- def map_ports(self, timeout = 5):
+ def map_ports(self, timeout = 100):
sys.stdout.write('Mapping ports')
for i in range(timeout):
- sys.stdout.write('.')
- sys.stdout.flush()
- CTRexScenario.stl_ports_map = stl_map_ports(self.stl_trex)
- if self.verify_bidirectional(CTRexScenario.stl_ports_map):
- print('')
- return True
- time.sleep(1)
+ try:
+ sys.stdout.write('.')
+ sys.stdout.flush()
+ CTRexScenario.stl_ports_map = stl_map_ports(self.stl_trex)
+ if self.verify_bidirectional(CTRexScenario.stl_ports_map):
+ print('')
+ return True
+ time.sleep(0.1)
+ except:
+ time.sleep()
print('')
return False
diff --git a/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py b/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py
index fe666ac3..e94468e2 100755
--- a/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py
+++ b/scripts/automation/regression/stateless_tests/trex_client_pkg_test.py
@@ -2,16 +2,26 @@
from .stl_general_test import CStlGeneral_Test, CTRexScenario
from misc_methods import run_command
from nose.plugins.attrib import attr
+from time import sleep
+
+
+def setUpModule():
+ # examples connect by their own
+ CStlGeneral_Test.unzip_client_package()
+ if CTRexScenario.stl_trex.is_connected():
+ CTRexScenario.stl_trex.disconnect()
+ sleep(3)
+
+def tearDownModule():
+ # connect back at end of tests
+ if not CTRexScenario.stl_trex.is_connected():
+ CTRexScenario.stl_trex.connect()
@attr('client_package')
class CTRexClientPKG_Test(CStlGeneral_Test):
"""This class tests TRex client package"""
- def setUp(self):
- CStlGeneral_Test.setUp(self)
- self.unzip_client_package()
-
def run_client_package_stl_example(self, python_version):
commands = [
'cd %s' % CTRexScenario.scripts_path,
@@ -20,9 +30,9 @@ class CTRexClientPKG_Test(CStlGeneral_Test):
'cd trex_client/stl/examples',
'$PYTHON stl_imix.py -s %s' % self.configuration.trex['trex_name'],
]
- return_code, _, stderr = run_command("bash -ce '%s'" % '; '.join(commands))
+ return_code, stdout, stderr = run_command("bash -ce '%s'" % '; '.join(commands))
if return_code:
- self.fail('Error in running stf_example using %s: %s' % (python_version, stderr))
+ self.fail('Error in running stf_example using %s: %s' % (python_version, [return_code, stdout, stderr]))
def test_client_python2(self):
self.run_client_package_stl_example(python_version = 'python2')
diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py
index aaf98708..a272fe7b 100755
--- a/scripts/automation/regression/trex_unit_test.py
+++ b/scripts/automation/regression/trex_unit_test.py
@@ -168,13 +168,12 @@ class CTRexTestConfiguringPlugin(Plugin):
CTRexScenario.benchmark = self.benchmark
CTRexScenario.modes = set(self.modes)
CTRexScenario.server_logs = self.server_logs
- CTRexScenario.trex = CTRexClient(trex_host = self.configuration.trex['trex_name'],
- verbose = self.json_verbose)
- if not self.no_daemon and not CTRexScenario.trex.check_master_connectivity():
- print('Could not connect to master daemon')
- sys.exit(-1)
if not self.no_daemon:
- CTRexScenario.scripts_path = CTRexScenario.trex.get_trex_path()
+ CTRexScenario.trex = CTRexClient(trex_host = self.configuration.trex['trex_name'],
+ verbose = self.json_verbose)
+ if not CTRexScenario.trex.check_master_connectivity():
+ print('Could not connect to master daemon')
+ sys.exit(-1)
if options.ga and CTRexScenario.setup_name:
CTRexScenario.GAManager = GAmanager(GoogleID = 'UA-75220362-4',
UserID = CTRexScenario.setup_name,
@@ -241,6 +240,9 @@ class CTRexTestConfiguringPlugin(Plugin):
if self.stateless:
if not self.no_daemon:
CTRexScenario.trex.force_kill(False)
+ if CTRexScenario.stl_trex and CTRexScenario.stl_trex.is_connected():
+ CTRexScenario.stl_trex.disconnect()
+ time.sleep(3)
CTRexScenario.stl_trex = None
diff --git a/scripts/stl/udp_1pkt_simple.py b/scripts/stl/udp_1pkt_simple.py
index b84626a1..0407f9c9 100644
--- a/scripts/stl/udp_1pkt_simple.py
+++ b/scripts/stl/udp_1pkt_simple.py
@@ -2,21 +2,18 @@ from trex_stl_lib.api import *
class STLS1(object):
- 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):
+ 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):
# create 1 stream
- return self.create_stream(packet_len - 4, packet_count)
+ return [ self.create_stream() ]
# dynamic load - used for trex console or simulator
diff --git a/scripts/stl/udp_for_benchmarks.py b/scripts/stl/udp_for_benchmarks.py
new file mode 100644
index 00000000..2033e80e
--- /dev/null
+++ b/scripts/stl/udp_for_benchmarks.py
@@ -0,0 +1,29 @@
+from trex_stl_lib.api import *
+
+class STLS1(object):
+ '''
+ Generalization of udp_1pkt_simple, can specify number of streams and packet length
+ '''
+ def create_stream (self, packet_len, stream_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(stream_count):
+ packets.append(STLStream(
+ packet = STLPktBuilder(pkt = base_pkt),
+ mode = STLTXCont()
+ ))
+ return packets
+
+ def get_streams (self, direction = 0, packet_len = 64, stream_count = 1, **kwargs):
+ # create 1 stream
+ return self.create_stream(packet_len - 4, stream_count)
+
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+