summaryrefslogtreecommitdiff
path: root/samples/pktgen/pktgen_sample01_simple.sh
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2021-05-28 17:06:35 +0300
committerJakub Kicinski <kuba@kernel.org>2021-05-29 00:52:13 +0300
commit460a9aa23de6eda55734411e3301838a9033b8b9 (patch)
treec7d30647972950442b464cba036337bd8efc83cd /samples/pktgen/pktgen_sample01_simple.sh
parent38e9673ce08ff22ede59ecafb2626b7a5c009d30 (diff)
downloadlinux-460a9aa23de6eda55734411e3301838a9033b8b9.tar.xz
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/pktgen_sample01_simple.sh')
-rwxr-xr-xsamples/pktgen/pktgen_sample01_simple.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/samples/pktgen/pktgen_sample01_simple.sh b/samples/pktgen/pktgen_sample01_simple.sh
index a09f3422fbcc..246cfe02bb82 100755
--- a/samples/pktgen/pktgen_sample01_simple.sh
+++ b/samples/pktgen/pktgen_sample01_simple.sh
@@ -72,6 +72,8 @@ if [ -n "$DST_PORT" ]; then
pg_set $DEV "udp_dst_max $UDP_DST_MAX"
fi
+[ ! -z "$UDP_CSUM" ] && pg_set $dev "flag UDPCSUM"
+
# Setup random UDP port src range
pg_set $DEV "flag UDPSRC_RND"
pg_set $DEV "udp_src_min $UDP_SRC_MIN"