summaryrefslogtreecommitdiff
path: root/samples/pktgen/pktgen_sample04_many_flows.sh
diff options
context:
space:
mode:
Diffstat (limited to 'samples/pktgen/pktgen_sample04_many_flows.sh')
-rwxr-xr-xsamples/pktgen/pktgen_sample04_many_flows.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/samples/pktgen/pktgen_sample04_many_flows.sh b/samples/pktgen/pktgen_sample04_many_flows.sh
index f60412e445bb..4df92b7176da 100755
--- a/samples/pktgen/pktgen_sample04_many_flows.sh
+++ b/samples/pktgen/pktgen_sample04_many_flows.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
#
# Script example for many flows testing
#
@@ -15,6 +16,7 @@ source ${basedir}/parameters.sh
[ -z "$DEST_IP" ] && DEST_IP="198.18.0.42"
[ -z "$DST_MAC" ] && DST_MAC="90:e2:ba:ff:ff:ff"
[ -z "$CLONE_SKB" ] && CLONE_SKB="0"
+[ -z "$COUNT" ] && COUNT="0" # Zero means indefinitely
# NOTICE: Script specific settings
# =======
@@ -26,7 +28,6 @@ source ${basedir}/parameters.sh
# Base Config
DELAY="0" # Zero means max speed
-COUNT="0" # Zero means indefinitely
if [[ -n "$BURST" ]]; then
err 1 "Bursting not supported for this mode"
@@ -36,7 +37,7 @@ fi
pg_ctrl "reset"
# Threads are specified with parameter -t value in $THREADS
-for ((thread = 0; thread < $THREADS; thread++)); do
+for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
dev=${DEV}@${thread}
# Add remove all other devices and add_device $dev to thread
@@ -78,7 +79,7 @@ done
# Run if user hits control-c
function print_result() {
# Print results
- for ((thread = 0; thread < $THREADS; thread++)); do
+ for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
dev=${DEV}@${thread}
echo "Device: $dev"
cat /proc/net/pktgen/$dev | grep -A2 "Result:"