projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-5.13/parisc' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[linux-2.6-microblaze.git]
/
samples
/
pktgen
/
parameters.sh
diff --git
a/samples/pktgen/parameters.sh
b/samples/pktgen/parameters.sh
index
ff0ed47
..
b4c1b37
100644
(file)
--- a/
samples/pktgen/parameters.sh
+++ b/
samples/pktgen/parameters.sh
@@
-19,12
+19,14
@@
function usage() {
echo " -v : (\$VERBOSE) verbose"
echo " -x : (\$DEBUG) debug"
echo " -6 : (\$IP6) IPv6"
echo " -v : (\$VERBOSE) verbose"
echo " -x : (\$DEBUG) debug"
echo " -6 : (\$IP6) IPv6"
+ echo " -w : (\$DELAY) Tx Delay value (ns)"
+ echo " -a : (\$APPEND) Script will not reset generator's state, but will append its config"
echo ""
}
## --- Parse command line arguments / parameters ---
## echo "Commandline options:"
echo ""
}
## --- Parse command line arguments / parameters ---
## echo "Commandline options:"
-while getopts "s:i:d:m:p:f:t:c:n:b:
vxh6
" option; do
+while getopts "s:i:d:m:p:f:t:c:n:b:
w:vxh6a
" option; do
case $option in
i) # interface
export DEV=$OPTARG
case $option in
i) # interface
export DEV=$OPTARG
@@
-66,6
+68,10
@@
while getopts "s:i:d:m:p:f:t:c:n:b:vxh6" option; do
export BURST=$OPTARG
info "SKB bursting: BURST=$BURST"
;;
export BURST=$OPTARG
info "SKB bursting: BURST=$BURST"
;;
+ w)
+ export DELAY=$OPTARG
+ info "DELAY=$DELAY"
+ ;;
v)
export VERBOSE=yes
info "Verbose mode: VERBOSE=$VERBOSE"
v)
export VERBOSE=yes
info "Verbose mode: VERBOSE=$VERBOSE"
@@
-78,6
+84,10
@@
while getopts "s:i:d:m:p:f:t:c:n:b:vxh6" option; do
export IP6=6
info "IP6: IP6=$IP6"
;;
export IP6=6
info "IP6: IP6=$IP6"
;;
+ a)
+ export APPEND=yes
+ info "Append mode: APPEND=$APPEND"
+ ;;
h|?|*)
usage;
err 2 "[ERROR] Unknown parameters!!!"
h|?|*)
usage;
err 2 "[ERROR] Unknown parameters!!!"
@@
-100,6
+110,9
@@
if [ -z "$THREADS" ]; then
export THREADS=1
fi
export THREADS=1
fi
+# default DELAY
+[ -z "$DELAY" ] && export DELAY=0 # Zero means max speed
+
export L_THREAD=$(( THREADS + F_THREAD - 1 ))
if [ -z "$DEV" ]; then
export L_THREAD=$(( THREADS + F_THREAD - 1 ))
if [ -z "$DEV" ]; then