@@ -17,7 +17,6 @@ source ${basedir}/parameters.sh
17
17
[ -z " $COUNT " ] && COUNT=" 100000" # Zero means indefinitely
18
18
19
19
# Base Config
20
- DELAY=" 0" # Zero means max speed
21
20
[ -z " $CLONE_SKB " ] && CLONE_SKB=" 0"
22
21
23
22
# Flow variation random source port between min and max
@@ -39,7 +38,7 @@ if [ -n "$DST_PORT" ]; then
39
38
fi
40
39
41
40
# General cleanup everything since last run
42
- pg_ctrl " reset"
41
+ [ -z " $APPEND " ] && pg_ctrl " reset"
43
42
44
43
# Threads are specified with parameter -t value in $THREADS
45
44
for (( thread = $F_THREAD ; thread <= $L_THREAD ; thread++ )) ; do
@@ -48,7 +47,7 @@ for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
48
47
dev=${DEV} @${thread}
49
48
50
49
# Add remove all other devices and add_device $dev to thread
51
- pg_thread $thread " rem_device_all"
50
+ [ -z " $APPEND " ] && pg_thread $thread " rem_device_all"
52
51
pg_thread $thread " add_device" $dev
53
52
54
53
# Notice config queue to map to cpu (mirrors smp_processor_id())
@@ -82,6 +81,8 @@ for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
82
81
pg_set $dev " udp_src_max $UDP_SRC_MAX "
83
82
done
84
83
84
+ if [ -z " $APPEND " ]; then
85
+
85
86
# start_run
86
87
echo " Running... ctrl^C to stop" >&2
87
88
pg_ctrl " start"
@@ -93,3 +94,7 @@ for ((thread = $F_THREAD; thread <= $L_THREAD; thread++)); do
93
94
echo " Device: $dev "
94
95
cat /proc/net/pktgen/$dev | grep -A2 " Result:"
95
96
done
97
+
98
+ else
99
+ echo " Append mode: config done. Do more or use 'pg_ctrl start' to run"
100
+ fi
0 commit comments