diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2017-06-15 19:07:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-16 12:32:34 -0400 |
commit | 69137ea60c9dad58773a1918de6c1b00b088520c (patch) | |
tree | 6300bfe517a2d5cb0c0e8edb71fd6119988d2ec4 /samples/pktgen/parameters.sh | |
parent | cb7fbb6470aaadf6786d00af1664703f794788ac (diff) | |
download | blackbird-op-linux-69137ea60c9dad58773a1918de6c1b00b088520c.tar.gz blackbird-op-linux-69137ea60c9dad58773a1918de6c1b00b088520c.zip |
pktgen: Specify num packets per thread
Use -n <num>, to specify the number of packets every
thread sends.
Zero means indefinitely.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/pktgen/parameters.sh')
-rw-r--r-- | samples/pktgen/parameters.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/samples/pktgen/parameters.sh b/samples/pktgen/parameters.sh index f70ea7dd5660..036147594a20 100644 --- a/samples/pktgen/parameters.sh +++ b/samples/pktgen/parameters.sh @@ -11,6 +11,7 @@ function usage() { echo " -m : (\$DST_MAC) destination MAC-addr" echo " -t : (\$THREADS) threads to start" echo " -c : (\$SKB_CLONE) SKB clones send before alloc new SKB" + echo " -n : (\$COUNT) num messages to send per thread, 0 means indefinitely" echo " -b : (\$BURST) HW level bursting of SKBs" echo " -v : (\$VERBOSE) verbose" echo " -x : (\$DEBUG) debug" @@ -20,7 +21,7 @@ function usage() { ## --- Parse command line arguments / parameters --- ## echo "Commandline options:" -while getopts "s:i:d:m:t:c:b:vxh6" option; do +while getopts "s:i:d:m:t:c:n:b:vxh6" option; do case $option in i) # interface export DEV=$OPTARG @@ -48,6 +49,10 @@ while getopts "s:i:d:m:t:c:b:vxh6" option; do export CLONE_SKB=$OPTARG info "CLONE_SKB=$CLONE_SKB" ;; + n) + export COUNT=$OPTARG + info "COUNT=$COUNT" + ;; b) export BURST=$OPTARG info "SKB bursting: BURST=$BURST" |