From 460a9aa23de6eda55734411e3301838a9033b8b9 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Fri, 28 May 2021 16:06:35 +0200 Subject: 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 Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/cf16417902062c6ea2fd3c79e00510e36a40c31a.1622210713.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski --- samples/pktgen/pktgen_sample01_simple.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'samples/pktgen/pktgen_sample01_simple.sh') 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" -- cgit v1.2.3