aboutsummaryrefslogtreecommitdiff
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.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/samples/pktgen/pktgen_sample04_many_flows.sh b/samples/pktgen/pktgen_sample04_many_flows.sh
index 2cd6b701400d..ddce876635aa 100755
--- a/samples/pktgen/pktgen_sample04_many_flows.sh
+++ b/samples/pktgen/pktgen_sample04_many_flows.sh
@@ -34,9 +34,6 @@ fi
[ -z "$FLOWS" ] && FLOWS="8000"
[ -z "$FLOWLEN" ] && FLOWLEN="10"
-# Base Config
-DELAY="0" # Zero means max speed
-
if [[ -n "$BURST" ]]; then
err 1 "Bursting not supported for this mode"
fi
@@ -45,14 +42,14 @@ fi
read -r SRC_MIN SRC_MAX <<< $(parse_addr 198.18.0.0/15)
# General cleanup everything since last run
-pg_ctrl "reset"
+[ -z "$APPEND" ] && pg_ctrl "reset"
# Threads are specified with parameter -t value in $THREADS
for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
dev=${DEV}@${thread}
# Add remove all other devices and add_device $dev to thread
- pg_thread $thread "rem_device_all"
+ [ -z "$APPEND" ] && pg_thread $thread "rem_device_all"
pg_thread $thread "add_device" $dev
# Base config
@@ -107,7 +104,11 @@ function print_result() {
# trap keyboard interrupt (Ctrl-C)
trap true SIGINT
-echo "Running... ctrl^C to stop" >&2
-pg_ctrl "start"
+if [ -z "$APPEND" ]; then
+ echo "Running... ctrl^C to stop" >&2
+ pg_ctrl "start"
-print_result
+ print_result
+else
+ echo "Append mode: config done. Do more or use 'pg_ctrl start' to run"
+fi