Skip to contentSkip to conversation

network: new random message size test-cases

PATCH New Alexey Kodanev 2 participants 10 messages Feb 19, 2019 – Feb 21, 2019

lore
Share & tools
lore
#0 lore raw

cover network: new random message size test-cases

New tests in the series with random message sizes: geneve02, gre02, macsec03, vxlan04.

This patch-set also introduces "TST_NET_MAX_PKT" environment variable to control the upper limit of the message payload size. By default it is set to 1.1 * MTU (of the test interface).

Alexey Kodanev (4):
network/gre01: move setup to library lib/tst_net.sh: add new TST_NET_MAX_PKT env variable
network: use TST_NET_MAX_PKT
network: add new test-cases with randomized message length

 runtest/net.features                            |    9 +
 runtest/net_stress.ipsec_dccp                   |  208 +++++++++++-----------
 runtest/net_stress.ipsec_sctp                   |  208 +++++++++++-----------
 runtest/net_stress.ipsec_tcp                    |  208 +++++++++++-----------
 runtest/net_stress.ipsec_udp                    |  212 +++++++++++-----------
 testcases/lib/tst_net.sh                        |   10 +-
 testcases/lib/tst_test.sh                       |    1 +
 testcases/network/mpls/mpls02.sh                |    2 +-
 testcases/network/mpls/mpls_lib.sh              |    2 +-
 testcases/network/sockets/bind_noport01.sh      |   15 ++-
 testcases/network/stress/dccp/dccp_ipsec.sh     |    6 +-
 testcases/network/stress/dccp/dccp_ipsec_vti.sh |    6 +-
 testcases/network/stress/sctp/sctp_ipsec.sh     |    6 +-
 testcases/network/stress/sctp/sctp_ipsec_vti.sh |    6 +-
 testcases/network/stress/tcp/tcp_ipsec.sh       |    6 +-
 testcases/network/stress/tcp/tcp_ipsec_vti.sh   |    6 +-
 testcases/network/stress/udp/udp_ipsec.sh       |    7 +-
 testcases/network/stress/udp/udp_ipsec_vti.sh   |    7 +-
 testcases/network/tcp_cc/tcp_cc_lib.sh          |    4 +-
 testcases/network/virt/geneve02.sh              |   38 ++++
 testcases/network/virt/gre01.sh                 |   19 +--
 testcases/network/virt/gre02.sh                 |   11 ++
 testcases/network/virt/macsec03.sh              |   13 ++
 testcases/network/virt/virt_lib.sh              |   27 +++-
 testcases/network/virt/vxlan04.sh               |   39 ++++
 25 files changed, 624 insertions(+), 452 deletions(-)
 create mode 100755 testcases/network/virt/geneve02.sh
 create mode 100755 testcases/network/virt/gre02.sh
 create mode 100755 testcases/network/virt/macsec03.sh
 create mode 100755 testcases/network/virt/vxlan04.sh
#1 lore raw

PATCH 1/4 network/gre01: move setup to library

The same setup can be used with the other gre tests.

---
 testcases/network/virt/gre01.sh    |   19 ++-----------------
 testcases/network/virt/virt_lib.sh |   15 +++++++++++++++
 2 files changed, 17 insertions(+), 17 deletions(-)
testcases/network/virt/gre01.sh +2 -17
index 27373fd..db5be6d 100755
@@ -1,7 +1,7 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2018 Petr Vorel <[email protected]>
-# Copyright (c) 2015-2017 Oracle and/or its affiliates.
+# Copyright (c) 2015-2019 Oracle and/or its affiliates.
 # Author: Alexey Kodanev <[email protected]>
 #
 # It requires remote host. Test will setup IPv4 and IPv6 virtual
@@ -10,23 +10,8 @@
 
 TST_NEEDS_TMPDIR=1
 TST_TESTFUNC=virt_netperf_msg_sizes
-TST_SETUP=do_setup
+TST_SETUP=virt_gre_setup
 TST_CLEANUP=virt_cleanup
 . virt_lib.sh
 
-do_setup()
-{
-	virt_type="gre"
-	[ "$TST_IPV6" ] && virt_type="ip6gre"
-	virt_lib_setup
-
-	if [ -z $ip_local -o -z $ip_remote ]; then
-		tst_brk TBROK "you must specify IP address"
-	fi
-
-	tst_res TINFO "test $virt_type"
-	virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost) dev $(tst_iface)" \
-	"local $(tst_ipaddr rhost) remote $(tst_ipaddr) dev $(tst_iface rhost)"
-}
-
 tst_run
testcases/network/virt/virt_lib.sh +15 -0
index c9fe80c..eb9d052 100644
@@ -355,3 +355,18 @@ virt_test_02()
 	virt_add_delete_test "$2"
 	start_id=$(($start_id + $NS_TIMES))
 }
+
+virt_gre_setup()
+{
+	virt_type="gre"
+	[ "$TST_IPV6" ] && virt_type="ip6gre"
+	virt_lib_setup
+
+	if [ -z $ip_local -o -z $ip_remote ]; then
+		tst_brk TBROK "you must specify IP address"
+	fi
+
+	tst_res TINFO "test $virt_type"
+	virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost) dev $(tst_iface)" \
+	"local $(tst_ipaddr rhost) remote $(tst_ipaddr) dev $(tst_iface rhost)"
+}
Signature · 1 line
1.7.1
#3 lore raw

PATCH 2/4 lib/tst_net.sh: add new TST_NET_MAX_PKT env variable

In reply to Alexey Kodanev

This is critical for performance tests, which compare virtual devices with the real ones. Trigger the fragmentation but keep the number of fragments at the minimum for those cases.

Also improve the test timing if MTU is not large.

The previous numbers can be restored with TST_NET_MAX_PKT environment variable.

---
 testcases/lib/tst_net.sh |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
testcases/lib/tst_net.sh +9 -1
index 06b8ad6..3148643 100644
@@ -710,6 +710,13 @@ tst_cleanup_rhost()
 	tst_rhost_run -c "rm -rf $TST_TMPDIR"
 }
 
+tst_default_max_pkt()
+{
+	local mtu="$(cat /sys/class/net/$(tst_iface)/mtu)"
+
+	echo "$((mtu + mtu / 10))"
+}
+
 # Management Link
 [ -z "$RHOST" ] && TST_USE_NETNS="yes"
 export RHOST="$RHOST"
@@ -797,7 +804,8 @@ export MCASTNUM_HEAVY="${MCASTNUM_HEAVY:-4000}"
 # want to use more ifaces.
 export LHOST_IFACES="${LHOST_IFACES:-eth0}"
 export RHOST_IFACES="${RHOST_IFACES:-eth0}"
-
+# Maximum payload size for 'virt' performance tests, by default eqauls to 1.1 * MTU
+export TST_NET_MAX_PKT="${TST_NET_MAX_PKT:-$(tst_default_max_pkt)}"
 # Set corresponding HW addresses, e.g. "00:00:00:00:00:01 00:00:00:00:00:02"
 export LHOST_HWADDRS="${LHOST_HWADDRS:-$(tst_get_hwaddrs lhost)}"
 export RHOST_HWADDRS="${RHOST_HWADDRS:-$(tst_get_hwaddrs rhost)}"
Signature · 1 line
1.7.1
#4 lore raw

PATCH 2/4 lib/tst_net.sh: add new TST_NET_MAX_PKT env variable

Hi Alexey,

Quoted 8 lines

This is critical for performance tests, which compare virtual devices with the real ones. Trigger the fragmentation but keep the number of fragments at the minimum for those cases.

Also improve the test timing if MTU is not large.

The previous numbers can be restored with TST_NET_MAX_PKT environment variable.

Kind regards,
Petr

#5 lore raw

PATCH 3/4 network: use TST_NET_MAX_PKT

In reply to Alexey Kodanev
---
 testcases/lib/tst_test.sh              |    1 +
 testcases/network/mpls/mpls02.sh       |    2 +-
 testcases/network/mpls/mpls_lib.sh     |    2 +-
 testcases/network/tcp_cc/tcp_cc_lib.sh |    4 ++--
 testcases/network/virt/virt_lib.sh     |    2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)
testcases/lib/tst_test.sh +1 -0
index 3d2f5af..f36051f 100644
@@ -404,6 +404,7 @@ tst_run()
 			NEEDS_DRIVERS);;
 			IPV6|IPVER|TEST_DATA|TEST_DATA_IFS);;
 			RETRY_FUNC|RETRY_FN_EXP_BACKOFF);;
+			NET_MAX_PKT);;
 			*) tst_res TWARN "Reserved variable TST_$_tst_i used!";;
 			esac
 		done
testcases/network/mpls/mpls02.sh +1 -1
index 745a414..c263f8a 100755
@@ -40,7 +40,7 @@ setup()
 do_test()
 {
 	local type=$2
-	local max_size=10000
+	local max_size=$TST_NET_MAX_PKT
 
 	if [ "$type" = "icmp" ]; then
 		tst_ping $ip_loc $ip_rmt 10 100 1000 2000 $max_size
testcases/network/mpls/mpls_lib.sh +1 -1
index c64b46c..84b3236 100755
@@ -84,7 +84,7 @@ mpls_virt_setup()
 mpls_virt_test()
 {
 	local type=$2
-	local max_size=10000
+	local max_size=$TST_NET_MAX_PKT
 
 	if [ "$type" = "icmp" ]; then
 		tst_ping $ip_virt_local $ip_virt_remote 10 100 1000 2000 $max_size
testcases/network/tcp_cc/tcp_cc_lib.sh +2 -2
index 6d41bcf..163ac02 100755
@@ -92,12 +92,12 @@ tcp_cc_test01()
 
 	set_cong_alg "$def_alg"
 
-	tst_netload -H $(tst_ipaddr rhost) -A 15000
+	tst_netload -H $(tst_ipaddr rhost) -A $TST_NET_MAX_PKT
 	local res0="$(cat tst_netload.res)"
 
 	set_cong_alg "$alg"
 
-	tst_netload -H $(tst_ipaddr rhost) -A 15000
+	tst_netload -H $(tst_ipaddr rhost) -A $TST_NET_MAX_PKT
 	local res1="$(cat tst_netload.res)"
 
 	local per=$(( $res0 * 100 / $res1 - 100 ))
testcases/network/virt/virt_lib.sh +1 -1
index eb9d052..92942d3 100644
@@ -327,7 +327,7 @@ virt_check_cmd()
 
 virt_netperf_msg_sizes()
 {
-	local sizes="100 1000 2000 10000"
+	local sizes="100 1000 2000 $TST_NET_MAX_PKT"
 	local s
 
 	for s in $sizes; do
Signature · 1 line
1.7.1
#7 lore raw

PATCH 4/4 network: add new test-cases with randomized message length

In reply to Alexey Kodanev

* Change test-cases in dctcp01 (TCP). Default size changed to random size.

* New test-cases added to tcp, sctp and udp IPsec tests

* Updated bind_noport01

* New tests: gre02, geneve02, macsec03, vxlan04

* Besides random payload changes:
- in macsec03, replay window increased from 300 to 1000
- vxlan04 and geneve02: new checksum testcases
- new tests use different protocol types

---
 runtest/net.features                            |    9 +
 runtest/net_stress.ipsec_dccp                   |  208 +++++++++++-----------
 runtest/net_stress.ipsec_sctp                   |  208 +++++++++++-----------
 runtest/net_stress.ipsec_tcp                    |  208 +++++++++++-----------
 runtest/net_stress.ipsec_udp                    |  212 +++++++++++-----------
 testcases/network/sockets/bind_noport01.sh      |   15 ++-
 testcases/network/stress/dccp/dccp_ipsec.sh     |    6 +-
 testcases/network/stress/dccp/dccp_ipsec_vti.sh |    6 +-
 testcases/network/stress/sctp/sctp_ipsec.sh     |    6 +-
 testcases/network/stress/sctp/sctp_ipsec_vti.sh |    6 +-
 testcases/network/stress/tcp/tcp_ipsec.sh       |    6 +-
 testcases/network/stress/tcp/tcp_ipsec_vti.sh   |    6 +-
 testcases/network/stress/udp/udp_ipsec.sh       |    7 +-
 testcases/network/stress/udp/udp_ipsec_vti.sh   |    7 +-
 testcases/network/virt/geneve02.sh              |   38 ++++
 testcases/network/virt/gre02.sh                 |   11 ++
 testcases/network/virt/macsec03.sh              |   13 ++
 testcases/network/virt/virt_lib.sh              |   10 +
 testcases/network/virt/vxlan04.sh               |   39 ++++
 19 files changed, 592 insertions(+), 429 deletions(-)
 create mode 100755 testcases/network/virt/geneve02.sh
 create mode 100755 testcases/network/virt/gre02.sh
 create mode 100755 testcases/network/virt/macsec03.sh
 create mode 100755 testcases/network/virt/vxlan04.sh
runtest/net.features +9 -0
index c5a36a6..44a9745 100644
@@ -38,6 +38,9 @@ vxlan_uni_03 vxlan03.sh -d uni
 vxlan_ipv6_multi_03 vxlan03.sh -6 -d multi
 vxlan_ipv6_uni_03 vxlan03.sh -6 -d uni
 
+vxlan_uni_04 vxlan04.sh -d uni
+vxlan_ipv6_uni_04 vxlan04.sh -6 -d uni
+
 vlan01 vlan01.sh
 vlan02 vlan02.sh
 vlan03 vlan03.sh
@@ -47,17 +50,23 @@ macvtap01 macvtap01.sh
 
 macsec01 macsec01.sh
 macsec02 macsec02.sh
+macsec03 macsec03.sh
 
 ipvlan01 ipvlan01.sh
 
 gre_ipv4_01 gre01.sh
 gre_ipv6_01 gre01.sh -6
 
+gre_ipv4_02 gre02.sh
+gre_ipv6_02 gre02.sh -6
+
 dctcp_ipv4_01 dctcp01.sh
 dctcp_ipv6_01 dctcp01.sh -6
 
 geneve01 geneve01.sh
 geneve01_ipv6 geneve01.sh -6
+geneve02 geneve02.sh
+geneve02_ipv6 geneve02.sh -6
 
 sit01 sit01.sh
 
runtest/net_stress.ipsec_dccp +104 -104

213 lines not on this page · raw message

runtest/net_stress.ipsec_sctp +104 -104

213 lines not on this page · raw message

runtest/net_stress.ipsec_tcp +104 -104

213 lines not on this page · raw message

runtest/net_stress.ipsec_udp +106 -106

215 lines not on this page · raw message

testcases/network/sockets/bind_noport01.sh +14 -1
index 67b12be..4eec4fd 100755
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2018 Oracle and/or its affiliates.
 
+TST_CNT=2
 TST_TESTFUNC="test"
 TST_MIN_KVER="4.2"
 TST_NEEDS_TMPDIR=1
@@ -9,7 +10,7 @@ TST_TEST_DATA="tcp udp udp_lite dccp"
 
 . tst_net.sh
 
-test()
+test1()
 {
 	local type="$2"
 
@@ -18,4 +19,16 @@ test()
 	tst_netload -T $type -S $(tst_ipaddr) -H $(tst_ipaddr rhost)
 }
 
+test2()
+{
+	local type="$2"
+	local rsize="65000"
+
+	[ "$type" = "dccp" ] && rsize=1300
+
+	tst_res TINFO "test bind() with $type socket and random size payload"
+	tst_netload -T $type -S $(tst_ipaddr) -H $(tst_ipaddr rhost) -A $rsize
+}
+
+
 tst_run
testcases/network/stress/dccp/dccp_ipsec.sh +5 -1
index ef80bf9..ff86063 100755
@@ -12,7 +12,11 @@ TST_CLEANUP=tst_ipsec_cleanup
 
 do_test()
 {
-	tst_netload -H $(tst_ipaddr rhost) -T dccp -n $2 -N $2 -r $IPSEC_REQUESTS
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
+
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $(tst_ipaddr rhost) -T dccp $opts -r $IPSEC_REQUESTS
 }
 
 tst_run
testcases/network/stress/dccp/dccp_ipsec_vti.sh +5 -1
index ee2b0d4..5c8f782 100755
@@ -12,7 +12,11 @@ TST_CLEANUP=tst_ipsec_cleanup
 
 do_test()
 {
-	tst_netload -H $ip_rmt_tun -T dccp -n $2 -N $2 -r $IPSEC_REQUESTS
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
+
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $ip_rmt_tun -T dccp $opts -r $IPSEC_REQUESTS
 }
 
 tst_run
testcases/network/stress/sctp/sctp_ipsec.sh +5 -1
index 8a7b885..4ec2041 100755
@@ -12,7 +12,11 @@ TST_CLEANUP=tst_ipsec_cleanup
 
 do_test()
 {
-	tst_netload -H $(tst_ipaddr rhost) -T sctp -n $2 -N $2 \
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
+
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $(tst_ipaddr rhost) -T sctp $opts \
 		-r $IPSEC_REQUESTS -S $(tst_ipaddr)
 }
 
testcases/network/stress/sctp/sctp_ipsec_vti.sh +5 -1
index d0f24c7..fe6135a 100755
@@ -12,7 +12,11 @@ TST_TESTFUNC=do_test
 
 do_test()
 {
-	tst_netload -H $ip_rmt_tun -T sctp -n $2 -N $2 -r $IPSEC_REQUESTS \
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
+
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $ip_rmt_tun -T sctp $opts -r $IPSEC_REQUESTS \
 		-S $ip_loc_tun
 }
 
testcases/network/stress/tcp/tcp_ipsec.sh +5 -1
index d62272d..5c46703 100755
@@ -14,7 +14,11 @@ max_requests=10
 
 do_test()
 {
-	tst_netload -H $(tst_ipaddr rhost) -n $2 -N $2 -r $IPSEC_REQUESTS \
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
+
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $(tst_ipaddr rhost) $opts -r $IPSEC_REQUESTS \
 		-R $max_requests
 }
 
testcases/network/stress/tcp/tcp_ipsec_vti.sh +5 -1
index f7bbbc6..118db54 100755
@@ -14,7 +14,11 @@ max_requests=10
 
 do_test()
 {
-	tst_netload -H $ip_rmt_tun -n $2 -N $2 -r $IPSEC_REQUESTS -R $max_requests
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
+
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $ip_rmt_tun $opts -r $IPSEC_REQUESTS -R $max_requests
 }
 
 tst_run
testcases/network/stress/udp/udp_ipsec.sh +5 -2
index b59070e..1e10d20 100755
@@ -13,10 +13,13 @@ TST_CLEANUP=tst_ipsec_cleanup
 
 do_test()
 {
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
 	local type="udp"
-	[ $1 -eq 2 ] && type="udp_lite"
 
-	tst_netload -H $(tst_ipaddr rhost) -T $type -n $2 -N $2 -r $IPSEC_REQUESTS
+	[ $1 -eq 2 ] && type="udp_lite"
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $(tst_ipaddr rhost) -T $type $opts -r $IPSEC_REQUESTS
 }
 
 tst_run
testcases/network/stress/udp/udp_ipsec_vti.sh +5 -2
index 65b48ea..2afe70e 100755
@@ -13,10 +13,13 @@ TST_CLEANUP=tst_ipsec_cleanup
 
 do_test()
 {
+	local opts="-n $2 -N $2"
+	local rand_opt="$(echo $2 | cut -d'R' -f2)"
 	local type="udp"
-	[ $1 -eq 2 ] && type="udp_lite"
 
-	tst_netload -H $ip_rmt_tun -T $type -n $2 -N $2 -r $IPSEC_REQUESTS
+	[ $1 -eq 2 ] && type="udp_lite"
+	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
+	tst_netload -H $ip_rmt_tun -T $type $opts -r $IPSEC_REQUESTS
 }
 
 tst_run
testcases/network/virt/geneve02.sh new file +38 -0
new file mode 100755
index 0000000..615f0db
@@ -0,0 +1,38 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2019 Oracle and/or its affiliates.
+
+TST_NEEDS_TMPDIR=1
+TST_OPTS="hi:d:"
+TST_PARSE_ARGS=virt_lib_parse_args
+TST_NEEDS_DRIVERS="geneve"
+virt_type="geneve"
+start_id=16700000
+
+# Setting GENEVE tunnel with 'ip' command is very similar to VxLAN
+# that is why using here 'vxlan_*' library functions.
+vxlan_dst_addr="uni"
+
+TST_TESTFUNC=do_test
+TST_CLEANUP=virt_cleanup
+TST_TEST_DATA="noudpcsum udp6zerocsumtx udp6zerocsumrx, udpcsum"
+TST_TEST_DATA_IFS=","
+
+. virt_lib.sh
+
+VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-160}
+[ "$VIRT_PERF_THRESHOLD" -lt 160 ] && VIRT_PERF_THRESHOLD=160
+
+do_test()
+{
+	virt_check_cmd virt_add ltp_v0 id 1 $2 remote \
+		$(tst_ipaddr rhost) || return 1
+
+	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFE $2"
+	virt_netperf_rand_sizes
+	virt_cleanup_rmt
+
+	return 0
+}
+
+tst_run
testcases/network/virt/gre02.sh new file +11 -0
new file mode 100755
index 0000000..d556606
@@ -0,0 +1,11 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2019 Oracle and/or its affiliates.
+
+TST_NEEDS_TMPDIR=1
+TST_TESTFUNC=virt_netperf_rand_sizes
+TST_SETUP=virt_gre_setup
+TST_CLEANUP=virt_cleanup
+. virt_lib.sh
+
+tst_run
testcases/network/virt/macsec03.sh new file +13 -0
new file mode 100755
index 0000000..b7bd8fe
@@ -0,0 +1,13 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2019 Oracle and/or its affiliates.
+
+IPSEC_PROTO="esp_aead"
+EALGO="aes"
+MACSEC_LIB_SETUP="replay on window 1000 encrypt on protect on"
+
+. macsec_lib.sh
+
+TST_TESTFUNC=virt_netperf_rand_sizes
+
+tst_run
testcases/network/virt/virt_lib.sh +10 -0
index 92942d3..12512db 100644
@@ -335,6 +335,16 @@ virt_netperf_msg_sizes()
 	done
 }
 
+virt_netperf_rand_sizes()
+{
+	local max_pkt_size="$TST_NET_MAX_PKT"
+	local types="tcp udp udp_lite"
+
+	for t in $types; do
+		virt_compare_netperf pass "-A $max_pkt_size -T $t"
+	done
+}
+
 # Check if we can create then delete virtual interface.
 virt_test_01()
 {
testcases/network/virt/vxlan04.sh new file +39 -0
new file mode 100755
index 0000000..45d3592
@@ -0,0 +1,39 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2019 Oracle and/or its affiliates.
+
+TST_NEEDS_TMPDIR=1
+TST_OPTS="hi:d:"
+TST_PARSE_ARGS=virt_lib_parse_args
+TST_USAGE=virt_lib_usage
+TST_NEEDS_TMPDIR=1
+TST_TESTFUNC=do_test
+TST_CLEANUP=virt_cleanup
+TST_TEST_DATA="noudpcsum udp6zerocsumtx udp6zerocsumrx, udpcsum"
+TST_TEST_DATA_IFS=","
+
+virt_type="vxlan"
+start_id=16700000
+vxlan_dst_addr="uni"
+
+. virt_lib.sh
+
+VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-160}
+[ "$VIRT_PERF_THRESHOLD" -lt 160 ] && VIRT_PERF_THRESHOLD=160
+
+do_test()
+{
+	if [ -z $ip_local -o -z $ip_remote ]; then
+		tst_brk TBROK "you must specify IP address"
+	fi
+
+	virt_check_cmd virt_add ltp_v0 id 0 $2 || continue
+
+	tst_res TINFO "the same VNI must work"
+	# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
+	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFE $2"
+	virt_netperf_rand_sizes
+	virt_cleanup_rmt
+}
+
+tst_run
Signature · 1 line
1.7.1
#8 lore raw

PATCH 4/4 network: add new test-cases with randomized message length

Hi Alexey,

Quoted 7 lines

* Change test-cases in dctcp01 (TCP). Default size changed to random size.

* New test-cases added to tcp, sctp and udp IPsec tests

* Updated bind_noport01

* New tests: gre02, geneve02, macsec03, vxlan04

Commit is quite big. I know, that all is related to randomized message length. But maybe these new tests can be added in separate commit.

Quoted 6 lines

* Besides random payload changes:
- in macsec03, replay window increased from 300 to 1000
- vxlan04 and geneve02: new checksum testcases
- new tests use different protocol types

Quoted 25 lines
---
 runtest/net.features                            |    9 +
 runtest/net_stress.ipsec_dccp                   |  208 +++++++++++-----------
 runtest/net_stress.ipsec_sctp                   |  208 +++++++++++-----------
 runtest/net_stress.ipsec_tcp                    |  208 +++++++++++-----------
 runtest/net_stress.ipsec_udp                    |  212 +++++++++++-----------
 testcases/network/sockets/bind_noport01.sh      |   15 ++-
 testcases/network/stress/dccp/dccp_ipsec.sh     |    6 +-
 testcases/network/stress/dccp/dccp_ipsec_vti.sh |    6 +-
 testcases/network/stress/sctp/sctp_ipsec.sh     |    6 +-
 testcases/network/stress/sctp/sctp_ipsec_vti.sh |    6 +-
 testcases/network/stress/tcp/tcp_ipsec.sh       |    6 +-
 testcases/network/stress/tcp/tcp_ipsec_vti.sh   |    6 +-
 testcases/network/stress/udp/udp_ipsec.sh       |    7 +-
 testcases/network/stress/udp/udp_ipsec_vti.sh   |    7 +-
 testcases/network/virt/geneve02.sh              |   38 ++++
 testcases/network/virt/gre02.sh                 |   11 ++
 testcases/network/virt/macsec03.sh              |   13 ++
 testcases/network/virt/virt_lib.sh              |   10 +
 testcases/network/virt/vxlan04.sh               |   39 ++++
 19 files changed, 592 insertions(+), 429 deletions(-)
 create mode 100755 testcases/network/virt/geneve02.sh
 create mode 100755 testcases/network/virt/gre02.sh
 create mode 100755 testcases/network/virt/macsec03.sh
 create mode 100755 testcases/network/virt/vxlan04.sh

...

Quoted 1 line

+++ b/testcases/network/virt/geneve02.sh

...

Review

Quoted 3 lines

+. virt_lib.sh

(quoted diff) +2 -0
+
+VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-160}

VIRT_PERF_THRESHOLD is read in virt_lib.sh. So this first line does not have to be here. That applies also for vxlan04.sh (this commit) + other testcases which already use this variable.

Quoted 1 line

+[ "$VIRT_PERF_THRESHOLD" -lt 160 ] && VIRT_PERF_THRESHOLD=160

Kind regards,
Petr

#9 lore raw

PATCH 4/4 network: add new test-cases with randomized message length

Quoted 11 lines · Petr Vorel

Hi Alexey,

Quoted 7 lines

* Change test-cases in dctcp01 (TCP). Default size changed to random size.

* New test-cases added to tcp, sctp and udp IPsec tests

* Updated bind_noport01

* New tests: gre02, geneve02, macsec03, vxlan04

Commit is quite big. I know, that all is related to randomized message length. But maybe these new tests can be added in separate commit.

Thanks for review Petr! Applied with the below corrections as you suggested:

* moved new tests to another commit,
* added one more commit with the fixes for geneve01 and vxlan03.