diff options
author | Lorenzo Bianconi | 2021-05-28 16:06:35 +0200 |
---|---|---|
committer | Jakub Kicinski | 2021-05-28 14:52:13 -0700 |
commit | 460a9aa23de6eda55734411e3301838a9033b8b9 (patch) | |
tree | c7d30647972950442b464cba036337bd8efc83cd /samples/pktgen/parameters.sh | |
parent | 38e9673ce08ff22ede59ecafb2626b7a5c009d30 (diff) |
samples: pktgen: add UDP tx checksum support
Introduce k parameter in pktgen samples in order to toggle UDP tx
checksum
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Link: https://lore.kernel.org/r/cf16417902062c6ea2fd3c79e00510e36a40c31a.1622210713.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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 b4c1b371e4b8..81906f199454 100644 --- a/samples/pktgen/parameters.sh +++ b/samples/pktgen/parameters.sh @@ -11,6 +11,7 @@ function usage() { echo " -d : (\$DEST_IP) destination IP. CIDR (e.g. 198.18.0.0/15) is also allowed" echo " -m : (\$DST_MAC) destination MAC-addr" echo " -p : (\$DST_PORT) destination PORT range (e.g. 433-444) is also allowed" + echo " -k : (\$UDP_CSUM) enable UDP tx checksum" echo " -t : (\$THREADS) threads to start" echo " -f : (\$F_THREAD) index of first thread (zero indexed CPU number)" echo " -c : (\$SKB_CLONE) SKB clones send before alloc new SKB" @@ -26,7 +27,7 @@ function usage() { ## --- Parse command line arguments / parameters --- ## echo "Commandline options:" -while getopts "s:i:d:m:p:f:t:c:n:b:w:vxh6a" option; do +while getopts "s:i:d:m:p:f:t:c:n:b:w:vxh6ak" option; do case $option in i) # interface export DEV=$OPTARG @@ -88,6 +89,10 @@ while getopts "s:i:d:m:p:f:t:c:n:b:w:vxh6a" option; do export APPEND=yes info "Append mode: APPEND=$APPEND" ;; + k) + export UDP_CSUM=yes + info "UDP tx checksum: UDP_CSUM=$UDP_CSUM" + ;; h|?|*) usage; err 2 "[ERROR] Unknown parameters!!!" |