All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API
@ 2018-07-03  7:42 Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 1/9] net/ipsec: Improve log info messages Petr Vorel
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

Hi,

I addressed issues noted by Alexey
changes v2->v3:
* tst_net.sh: Added TST_LIB_NET_LOADED and simplify that commit.
* tst_net.sh: changes in tst_net.sh split into 2 commits (TST_LIB_NET_LOADED related
one and "Harden library against deadlocks")
* macsec_lib.sh: Move code from virt_macsec_setup to macsec_lib_setup
* virt_lib.sh: Remove unused client_requests=20000

@cyril: tst_test.sh: We use TST_LIB_NET_LOADED (3/8), but I kept TST_LIB_LOADED
(2/8) as I think it's an improvement, even not used yet.

Petr Vorel (9):
  net/ipsec: Improve log info messages
  tst_test.sh: Introduce TST_LIB_LOADED
  tst_net.sh: Introduce TST_LIB_NET_LOADED
  tst_net.sh: Harden library against deadlocks
  net/ipsec: Use ':' as array separator for -s parameter
  net/{stress,virt}: Use SPDX-License-Identifier GPL-2.0-or-later
  net/virt_lib.sh: Remove possibility to pass custom sizes to
    virt_netperf_msg_sizes()
  net/{stress,virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using
    them
  net/virt: Introduce macsec_lib.sh to reduce duplicity

 runtest/net_stress.ipsec_dccp                 | 212 ++++++++---------
 runtest/net_stress.ipsec_icmp                 | 168 +++++++-------
 runtest/net_stress.ipsec_sctp                 | 212 ++++++++---------
 runtest/net_stress.ipsec_tcp                  | 212 ++++++++---------
 runtest/net_stress.ipsec_udp                  | 208 ++++++++---------
 testcases/lib/tst_net.sh                      |  35 ++-
 testcases/lib/tst_test.sh                     |   3 +
 testcases/network/stress/dccp/dccp_ipsec.sh   |  34 +--
 .../network/stress/dccp/dccp_ipsec_vti.sh     |  34 +--
 .../network/stress/icmp/icmp-uni-basic.sh     |  54 ++---
 testcases/network/stress/icmp/icmp-uni-vti.sh |  39 ++--
 testcases/network/stress/ipsec/ipsec_lib.sh   | 171 +++++++-------
 testcases/network/stress/sctp/sctp_ipsec.sh   |  35 +--
 .../network/stress/sctp/sctp_ipsec_vti.sh     |  35 +--
 testcases/network/stress/tcp/tcp_ipsec.sh     |  37 +--
 testcases/network/stress/tcp/tcp_ipsec_vti.sh |  36 +--
 testcases/network/stress/udp/udp_ipsec.sh     |  39 +---
 testcases/network/stress/udp/udp_ipsec_vti.sh |  39 +---
 testcases/network/virt/geneve01.sh            |  57 ++---
 testcases/network/virt/gre01.sh               |  46 ++--
 testcases/network/virt/ipvlan01.sh            |  29 +--
 testcases/network/virt/macsec01.sh            |  44 +---
 testcases/network/virt/macsec02.sh            |  47 +---
 testcases/network/virt/macsec_lib.sh          |  55 +++++
 testcases/network/virt/macvlan01.sh           |  29 +--
 testcases/network/virt/macvtap01.sh           |  29 +--
 testcases/network/virt/virt_lib.sh            | 213 ++++++------------
 testcases/network/virt/vlan01.sh              |  35 +--
 testcases/network/virt/vlan02.sh              |  28 +--
 testcases/network/virt/vlan03.sh              |  65 +++---
 testcases/network/virt/vxlan01.sh             |  31 +--
 testcases/network/virt/vxlan02.sh             |  32 +--
 testcases/network/virt/vxlan03.sh             |  53 ++---
 33 files changed, 984 insertions(+), 1412 deletions(-)
 create mode 100755 testcases/network/virt/macsec_lib.sh

-- 
2.18.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 1/9] net/ipsec: Improve log info messages
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 2/9] tst_test.sh: Introduce TST_LIB_LOADED Petr Vorel
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

* Log all IPsec tst_ipsec_setup calls.
* Remove redundant log output from icmp-uni-basic.sh to make it similar
to icmp-uni-vti.sh.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/stress/icmp/icmp-uni-basic.sh | 14 +-------------
 testcases/network/stress/icmp/icmp-uni-vti.sh   |  2 +-
 testcases/network/stress/ipsec/ipsec_lib.sh     |  1 +
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/testcases/network/stress/icmp/icmp-uni-basic.sh b/testcases/network/stress/icmp/icmp-uni-basic.sh
index fc84899dd..3099b6caa 100755
--- a/testcases/network/stress/icmp/icmp-uni-basic.sh
+++ b/testcases/network/stress/icmp/icmp-uni-basic.sh
@@ -25,23 +25,11 @@ TST_CLEANUP="tst_ipsec_cleanup"
 
 . ipsec_lib.sh
 
-# Test description
-tst_resm TINFO "Sending ICMP messages with the following conditions"
-tst_resm TINFO "- Version of IP is IPv${TST_IPV6:-4}"
-tst_resm TINFO "- Size of packets are ( $IPSEC_SIZE_ARRAY )"
-
-if [ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ]; then
-	case $IPSEC_PROTO in
-	ah)	tst_resm TINFO "- IPsec [ AH / $IPSEC_MODE ]" ;;
-	esp)	tst_resm TINFO "- IPsec [ ESP / $IPSEC_MODE ]" ;;
-	comp)	tst_resm TINFO "- IPcomp [ $IPSEC_MODE ]" ;;
-	esac
-fi
-
 tst_ipsec_setup
 
 PING_MAX="$IPSEC_REQUESTS"
 
+tst_resm TINFO "Sending ICMP messages"
 tst_ping $(tst_iface) $(tst_ipaddr rhost) $IPSEC_SIZE_ARRAY
 
 tst_exit
diff --git a/testcases/network/stress/icmp/icmp-uni-vti.sh b/testcases/network/stress/icmp/icmp-uni-vti.sh
index 7fa211d7f..ea8b5c828 100755
--- a/testcases/network/stress/icmp/icmp-uni-vti.sh
+++ b/testcases/network/stress/icmp/icmp-uni-vti.sh
@@ -26,7 +26,7 @@ do_test()
 {
 	PING_MAX="$IPSEC_REQUESTS"
 
-	tst_resm TINFO "Sending ICMP messages..."
+	tst_resm TINFO "Sending ICMP messages"
 	tst_ping $tst_vti $ip_rmt_tun $IPSEC_SIZE_ARRAY
 }
 
diff --git a/testcases/network/stress/ipsec/ipsec_lib.sh b/testcases/network/stress/ipsec/ipsec_lib.sh
index 2e001c718..9c293ca3e 100644
--- a/testcases/network/stress/ipsec/ipsec_lib.sh
+++ b/testcases/network/stress/ipsec/ipsec_lib.sh
@@ -115,6 +115,7 @@ tst_ipsec_setup()
 {
 	# Configure SAD/SPD
 	if [ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ]; then
+		tst_resm TINFO "IPsec[$IPSEC_PROTO/$IPSEC_MODE]"
 		tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
 		tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
 	fi
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 2/9] tst_test.sh: Introduce TST_LIB_LOADED
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 1/9] net/ipsec: Improve log info messages Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 3/9] tst_net.sh: Introduce TST_LIB_NET_LOADED Petr Vorel
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

to load the library only once.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
---
 testcases/lib/tst_test.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index 73c238ab4..c2460762d 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -21,6 +21,8 @@
 # This is a LTP test library for shell.
 #
 
+[ -n "$TST_LIB_LOADED" ] && return 0
+
 export TST_PASS=0
 export TST_FAIL=0
 export TST_BROK=0
@@ -29,6 +31,7 @@ export TST_CONF=0
 export TST_COUNT=1
 export TST_ITERATIONS=1
 export TST_TMPDIR_RHOST=0
+export TST_LIB_LOADED=1
 
 . tst_ansi_color.sh
 
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 3/9] tst_net.sh: Introduce TST_LIB_NET_LOADED
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 1/9] net/ipsec: Improve log info messages Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 2/9] tst_test.sh: Introduce TST_LIB_LOADED Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 4/9] tst_net.sh: Harden library against deadlocks Petr Vorel
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

to load it only once.

Some tests (macsec0{1,2}.sh) load tst_net.sh twice via loading from
ipsec_lib.sh and virt_lib.sh. That brings duplicity in some variables
(TST_OPTS) and create infinite loop, as tst_net_setup calls itself.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Suggested-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 testcases/lib/tst_net.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index aad701952..507d5b788 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -19,6 +19,9 @@
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 
+[ -n "$TST_LIB_NET_LOADED" ] && return 0
+TST_LIB_NET_LOADED=1
+
 TST_OPTS="6$TST_OPTS"
 TST_PARSE_ARGS_CALLER="$TST_PARSE_ARGS"
 TST_PARSE_ARGS="tst_net_parse_args"
@@ -73,9 +76,7 @@ tst_net_setup()
 	[ -n "$TST_SETUP_CALLER" ] && $TST_SETUP_CALLER
 }
 
-if [ -z "$TST_LIB_LOADED" ]; then
-	[ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh
-fi
+[ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh
 
 if [ -n "$TST_USE_LEGACY_API" ]; then
 	tst_net_read_opts "$@"
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 4/9] tst_net.sh: Harden library against deadlocks
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
                   ` (2 preceding siblings ...)
  2018-07-03  7:42 ` [LTP] [PATCH v3 3/9] tst_net.sh: Introduce TST_LIB_NET_LOADED Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 5/9] net/ipsec: Use ':' as array separator for -s parameter Petr Vorel
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/tst_net.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 507d5b788..e55ac1ddc 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -78,6 +78,19 @@ tst_net_setup()
 
 [ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh
 
+if [ "$TST_PARSE_ARGS_CALLER" = "$TST_PARSE_ARGS" ]; then
+	tst_res TWARN "TST_PARSE_ARGS_CALLER same as TST_PARSE_ARGS, unset it ($TST_PARSE_ARGS)"
+	unset TST_PARSE_ARGS_CALLER
+fi
+if [ "$TST_SETUP_CALLER" = "$TST_SETUP" ]; then
+	tst_res TWARN "TST_SETUP_CALLER same as TST_SETUP, unset it ($TST_SETUP)"
+	unset TST_SETUP_CALLER
+fi
+if [ "$TST_USAGE_CALLER" = "$TST_USAGE" ]; then
+	tst_res TWARN "TST_USAGE_CALLER same as TST_USAGE, unset it ($TST_USAGE)"
+	unset TST_USAGE_CALLER
+fi
+
 if [ -n "$TST_USE_LEGACY_API" ]; then
 	tst_net_read_opts "$@"
 fi
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 5/9] net/ipsec: Use ':' as array separator for -s parameter
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
                   ` (3 preceding siblings ...)
  2018-07-03  7:42 ` [LTP] [PATCH v3 4/9] tst_net.sh: Harden library against deadlocks Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 6/9] net/{stress, virt}: Use SPDX-License-Identifier GPL-2.0-or-later Petr Vorel
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

This is a preparation for new API, which is not able to handle quoted
parameters (problematic is TST_ARGS="$@").
-s parameter, used for $IPSEC_SIZE_ARRAY use space as array separator.
Use ':' instead, so parameter doesn't have to be quoted.

Fixes: 89a83d8a0 ("net/ipsec_lib.sh: Process getopts parameters with
TST_OPTS and TST_PARSE_ARGS")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 runtest/net_stress.ipsec_dccp               | 212 ++++++++++----------
 runtest/net_stress.ipsec_icmp               | 168 ++++++++--------
 runtest/net_stress.ipsec_sctp               | 212 ++++++++++----------
 runtest/net_stress.ipsec_tcp                | 212 ++++++++++----------
 runtest/net_stress.ipsec_udp                | 208 +++++++++----------
 testcases/network/stress/ipsec/ipsec_lib.sh |  12 +-
 6 files changed, 516 insertions(+), 508 deletions(-)

diff --git a/runtest/net_stress.ipsec_dccp b/runtest/net_stress.ipsec_dccp
index d867ab533..cdd10da26 100644
--- a/runtest/net_stress.ipsec_dccp
+++ b/runtest/net_stress.ipsec_dccp
@@ -1,109 +1,109 @@
-dccp4_ipsec01 dccp_ipsec.sh -s "100 500 1000"
-dccp4_ipsec02 dccp_ipsec.sh -p ah -m transport -s "100 500 1000"
-dccp4_ipsec03 dccp_ipsec.sh -p ah -m tunnel -s "100 500 1000"
-dccp4_ipsec04 dccp_ipsec.sh -p esp -m transport -s "100 500 1000"
-dccp4_ipsec05 dccp_ipsec.sh -p esp -m tunnel -s "100 500 1000"
-dccp4_ipsec06 dccp_ipsec.sh -p comp -m transport -s "100 500 1000"
-dccp4_ipsec07 dccp_ipsec.sh -p comp -m tunnel -s "100 500 1000"
-dccp4_ipsec08 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec09 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec10 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec11 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec12 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec13 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec14 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec15 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec16 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec17 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec18 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec19 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec20 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec21 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec22 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec23 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec24 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s "100 500 1000"
-dccp4_ipsec25 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec26 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s "100 500 1000"
-dccp4_ipsec27 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000"
-dccp4_ipsec28 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s "100 500 1000"
-dccp4_ipsec29 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000"
-dccp4_ipsec30 dccp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s "100 500 1000"
-dccp4_ipsec31 dccp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000"
-dccp4_ipsec32 dccp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s "100 500 1000"
-dccp4_ipsec33 dccp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000"
-dccp4_ipsec34 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s "100 500 1000"
-dccp4_ipsec35 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000"
-dccp4_ipsec36 dccp_ipsec.sh -p esp -m beet -s "100 500 1000"
+dccp4_ipsec01 dccp_ipsec.sh -s 100:500:1000
+dccp4_ipsec02 dccp_ipsec.sh -p ah -m transport -s 100:500:1000
+dccp4_ipsec03 dccp_ipsec.sh -p ah -m tunnel -s 100:500:1000
+dccp4_ipsec04 dccp_ipsec.sh -p esp -m transport -s 100:500:1000
+dccp4_ipsec05 dccp_ipsec.sh -p esp -m tunnel -s 100:500:1000
+dccp4_ipsec06 dccp_ipsec.sh -p comp -m transport -s 100:500:1000
+dccp4_ipsec07 dccp_ipsec.sh -p comp -m tunnel -s 100:500:1000
+dccp4_ipsec08 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec09 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec10 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec11 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec12 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec13 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec14 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec15 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec16 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec17 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec18 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec19 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec20 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec21 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec22 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec23 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec24 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s 100:500:1000
+dccp4_ipsec25 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec26 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s 100:500:1000
+dccp4_ipsec27 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000
+dccp4_ipsec28 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s 100:500:1000
+dccp4_ipsec29 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000
+dccp4_ipsec30 dccp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s 100:500:1000
+dccp4_ipsec31 dccp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000
+dccp4_ipsec32 dccp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s 100:500:1000
+dccp4_ipsec33 dccp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000
+dccp4_ipsec34 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s 100:500:1000
+dccp4_ipsec35 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000
+dccp4_ipsec36 dccp_ipsec.sh -p esp -m beet -s 100:500:1000
 
-dccp6_ipsec01 dccp_ipsec.sh -6 -s "100 500 1000"
-dccp6_ipsec02 dccp_ipsec.sh -6 -p ah -m transport -s "100 500 1000"
-dccp6_ipsec03 dccp_ipsec.sh -6 -p ah -m tunnel -s "100 500 1000"
-dccp6_ipsec04 dccp_ipsec.sh -6 -p esp -m transport -s "100 500 1000"
-dccp6_ipsec05 dccp_ipsec.sh -6 -p esp -m tunnel -s "100 500 1000"
-dccp6_ipsec06 dccp_ipsec.sh -6 -p comp -m transport -s "100 500 1000"
-dccp6_ipsec07 dccp_ipsec.sh -6 -p comp -m tunnel -s "100 500 1000"
-dccp6_ipsec08 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec09 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec10 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec11 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec12 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec13 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec14 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec15 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec16 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec17 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec18 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec19 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec20 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec21 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec22 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec23 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec24 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s "100 500 1000"
-dccp6_ipsec25 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec26 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s "100 500 1000"
-dccp6_ipsec27 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000"
-dccp6_ipsec28 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s "100 500 1000"
-dccp6_ipsec29 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000"
-dccp6_ipsec30 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s "100 500 1000"
-dccp6_ipsec31 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000"
-dccp6_ipsec32 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s "100 500 1000"
-dccp6_ipsec33 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000"
-dccp6_ipsec34 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s "100 500 1000"
-dccp6_ipsec35 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000"
-dccp6_ipsec36 dccp_ipsec.sh -6 -p esp -m beet -s "100 500 1000"
+dccp6_ipsec01 dccp_ipsec.sh -6 -s 100:500:1000
+dccp6_ipsec02 dccp_ipsec.sh -6 -p ah -m transport -s 100:500:1000
+dccp6_ipsec03 dccp_ipsec.sh -6 -p ah -m tunnel -s 100:500:1000
+dccp6_ipsec04 dccp_ipsec.sh -6 -p esp -m transport -s 100:500:1000
+dccp6_ipsec05 dccp_ipsec.sh -6 -p esp -m tunnel -s 100:500:1000
+dccp6_ipsec06 dccp_ipsec.sh -6 -p comp -m transport -s 100:500:1000
+dccp6_ipsec07 dccp_ipsec.sh -6 -p comp -m tunnel -s 100:500:1000
+dccp6_ipsec08 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec09 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec10 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec11 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec12 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec13 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec14 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec15 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec16 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec17 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec18 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec19 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec20 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec21 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec22 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec23 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec24 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s 100:500:1000
+dccp6_ipsec25 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec26 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s 100:500:1000
+dccp6_ipsec27 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000
+dccp6_ipsec28 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s 100:500:1000
+dccp6_ipsec29 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000
+dccp6_ipsec30 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s 100:500:1000
+dccp6_ipsec31 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000
+dccp6_ipsec32 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s 100:500:1000
+dccp6_ipsec33 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000
+dccp6_ipsec34 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s 100:500:1000
+dccp6_ipsec35 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000
+dccp6_ipsec36 dccp_ipsec.sh -6 -p esp -m beet -s 100:500:1000
 
-dccp4_ipsec_vti01 dccp_ipsec_vti.sh -p ah -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti02 dccp_ipsec_vti.sh -p esp -m tunnel -s "100 500 1000"
-# dccp4_ipsec_vti03 dccp_ipsec_vti.sh -p comp -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti04 dccp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti05 dccp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti06 dccp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti07 dccp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti08 dccp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti09 dccp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti10 dccp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti11 dccp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti12 dccp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti13 dccp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti14 dccp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti15 dccp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti16 dccp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000"
-dccp4_ipsec_vti17 dccp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000"
+dccp4_ipsec_vti01 dccp_ipsec_vti.sh -p ah -m tunnel -s 100:500:1000
+dccp4_ipsec_vti02 dccp_ipsec_vti.sh -p esp -m tunnel -s 100:500:1000
+# dccp4_ipsec_vti03 dccp_ipsec_vti.sh -p comp -m tunnel -s 100:500:1000
+dccp4_ipsec_vti04 dccp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti05 dccp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti06 dccp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti07 dccp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti08 dccp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti09 dccp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti10 dccp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti11 dccp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti12 dccp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp4_ipsec_vti13 dccp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000
+dccp4_ipsec_vti14 dccp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000
+dccp4_ipsec_vti15 dccp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000
+dccp4_ipsec_vti16 dccp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000
+dccp4_ipsec_vti17 dccp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000
 
-dccp6_ipsec_vti01 dccp_ipsec_vti.sh -6 -p ah -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti02 dccp_ipsec_vti.sh -6 -p esp -m tunnel -s "100 500 1000"
-# dccp6_ipsec_vti03 dccp_ipsec_vti.sh -6 -p comp -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti04 dccp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti05 dccp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti06 dccp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti07 dccp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti08 dccp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti09 dccp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti10 dccp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti11 dccp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti12 dccp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti13 dccp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti14 dccp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti15 dccp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti16 dccp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000"
-dccp6_ipsec_vti17 dccp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000"
+dccp6_ipsec_vti01 dccp_ipsec_vti.sh -6 -p ah -m tunnel -s 100:500:1000
+dccp6_ipsec_vti02 dccp_ipsec_vti.sh -6 -p esp -m tunnel -s 100:500:1000
+# dccp6_ipsec_vti03 dccp_ipsec_vti.sh -6 -p comp -m tunnel -s 100:500:1000
+dccp6_ipsec_vti04 dccp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti05 dccp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti06 dccp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti07 dccp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti08 dccp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti09 dccp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti10 dccp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti11 dccp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti12 dccp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000
+dccp6_ipsec_vti13 dccp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000
+dccp6_ipsec_vti14 dccp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000
+dccp6_ipsec_vti15 dccp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000
+dccp6_ipsec_vti16 dccp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000
+dccp6_ipsec_vti17 dccp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000
diff --git a/runtest/net_stress.ipsec_icmp b/runtest/net_stress.ipsec_icmp
index 0267cf660..58c0924a4 100644
--- a/runtest/net_stress.ipsec_icmp
+++ b/runtest/net_stress.ipsec_icmp
@@ -27,93 +27,93 @@
 # IPsec compression: same message size but different content will result in different data size
 # after compression. So we just use a large enough message size(65000) for testing
 
-icmp4-uni-basic01 icmp-uni-basic.sh -s "10 100 1000 10000 65507"
-icmp4-uni-basic02 icmp-uni-basic.sh -p ah -m transport -s "10 100 1000 10000 65483"
-icmp4-uni-basic03 icmp-uni-basic.sh -p ah -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-basic04 icmp-uni-basic.sh -p esp -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic05 icmp-uni-basic.sh -p esp -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic06 icmp-uni-basic.sh -p comp -m transport -s "10 100 1000 10000 65000"
-icmp4-uni-basic07 icmp-uni-basic.sh -p comp -m tunnel -s "10 100 1000 10000 65000"
-icmp4-uni-basic08 icmp-uni-basic.sh -A rfc4106_128 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic09 icmp-uni-basic.sh -A rfc4106_192 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic10 icmp-uni-basic.sh -A rfc4106_256 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic11 icmp-uni-basic.sh -A rfc4309_128 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic12 icmp-uni-basic.sh -A rfc4309_192 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic13 icmp-uni-basic.sh -A rfc4309_256 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic14 icmp-uni-basic.sh -A rfc4543_128 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic15 icmp-uni-basic.sh -A rfc4543_192 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic16 icmp-uni-basic.sh -A rfc4543_256 -p esp_aead -m transport -s "10 100 1000 10000 65470"
-icmp4-uni-basic17 icmp-uni-basic.sh -A rfc4106_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic18 icmp-uni-basic.sh -A rfc4106_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic19 icmp-uni-basic.sh -A rfc4106_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic20 icmp-uni-basic.sh -A rfc4309_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic21 icmp-uni-basic.sh -A rfc4309_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic22 icmp-uni-basic.sh -A rfc4309_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic23 icmp-uni-basic.sh -A rfc4543_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic24 icmp-uni-basic.sh -A rfc4543_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic25 icmp-uni-basic.sh -A rfc4543_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65450"
-icmp4-uni-basic26 icmp-uni-basic.sh -p esp -m beet -s "10 100 1000 10000 65470"
+icmp4-uni-basic01 icmp-uni-basic.sh -s 10:100:1000:10000:65507
+icmp4-uni-basic02 icmp-uni-basic.sh -p ah -m transport -s 10:100:1000:10000:65483
+icmp4-uni-basic03 icmp-uni-basic.sh -p ah -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-basic04 icmp-uni-basic.sh -p esp -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic05 icmp-uni-basic.sh -p esp -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic06 icmp-uni-basic.sh -p comp -m transport -s 10:100:1000:10000:65000
+icmp4-uni-basic07 icmp-uni-basic.sh -p comp -m tunnel -s 10:100:1000:10000:65000
+icmp4-uni-basic08 icmp-uni-basic.sh -A rfc4106_128 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic09 icmp-uni-basic.sh -A rfc4106_192 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic10 icmp-uni-basic.sh -A rfc4106_256 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic11 icmp-uni-basic.sh -A rfc4309_128 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic12 icmp-uni-basic.sh -A rfc4309_192 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic13 icmp-uni-basic.sh -A rfc4309_256 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic14 icmp-uni-basic.sh -A rfc4543_128 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic15 icmp-uni-basic.sh -A rfc4543_192 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic16 icmp-uni-basic.sh -A rfc4543_256 -p esp_aead -m transport -s 10:100:1000:10000:65470
+icmp4-uni-basic17 icmp-uni-basic.sh -A rfc4106_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic18 icmp-uni-basic.sh -A rfc4106_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic19 icmp-uni-basic.sh -A rfc4106_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic20 icmp-uni-basic.sh -A rfc4309_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic21 icmp-uni-basic.sh -A rfc4309_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic22 icmp-uni-basic.sh -A rfc4309_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic23 icmp-uni-basic.sh -A rfc4543_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic24 icmp-uni-basic.sh -A rfc4543_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic25 icmp-uni-basic.sh -A rfc4543_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65450
+icmp4-uni-basic26 icmp-uni-basic.sh -p esp -m beet -s 10:100:1000:10000:65470
 
-icmp6-uni-basic01 icmp-uni-basic.sh -6 -s "10 100 1000 10000 65527"
-icmp6-uni-basic02 icmp-uni-basic.sh -6 -p ah -m transport -s "10 100 1000 10000 65503"
-icmp6-uni-basic03 icmp-uni-basic.sh -6 -p ah -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic04 icmp-uni-basic.sh -6 -p esp -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic06 icmp-uni-basic.sh -6 -p comp -m transport -s "10 100 1000 10000 65000"
-icmp6-uni-basic07 icmp-uni-basic.sh -6 -p comp -m tunnel -s "10 100 1000 10000 65000"
-icmp6-uni-basic08 icmp-uni-basic.sh -6 -A rfc4106_128 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic09 icmp-uni-basic.sh -6 -A rfc4106_192 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic10 icmp-uni-basic.sh -6 -A rfc4106_256 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic11 icmp-uni-basic.sh -6 -A rfc4309_128 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic12 icmp-uni-basic.sh -6 -A rfc4309_192 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic13 icmp-uni-basic.sh -6 -A rfc4309_256 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic14 icmp-uni-basic.sh -6 -A rfc4543_128 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic15 icmp-uni-basic.sh -6 -A rfc4543_192 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic16 icmp-uni-basic.sh -6 -A rfc4543_256 -p esp_aead -m transport -s "10 100 1000 10000 65490"
-icmp6-uni-basic17 icmp-uni-basic.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic18 icmp-uni-basic.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic19 icmp-uni-basic.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic20 icmp-uni-basic.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic21 icmp-uni-basic.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic22 icmp-uni-basic.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic23 icmp-uni-basic.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic24 icmp-uni-basic.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic25 icmp-uni-basic.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-basic26 icmp-uni-basic.sh -6 -p esp -m beet -s "10 100 1000 10000 65490"
+icmp6-uni-basic01 icmp-uni-basic.sh -6 -s 10:100:1000:10000:65527
+icmp6-uni-basic02 icmp-uni-basic.sh -6 -p ah -m transport -s 10:100:1000:10000:65503
+icmp6-uni-basic03 icmp-uni-basic.sh -6 -p ah -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic04 icmp-uni-basic.sh -6 -p esp -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic05 icmp-uni-basic.sh -6 -p esp -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic06 icmp-uni-basic.sh -6 -p comp -m transport -s 10:100:1000:10000:65000
+icmp6-uni-basic07 icmp-uni-basic.sh -6 -p comp -m tunnel -s 10:100:1000:10000:65000
+icmp6-uni-basic08 icmp-uni-basic.sh -6 -A rfc4106_128 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic09 icmp-uni-basic.sh -6 -A rfc4106_192 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic10 icmp-uni-basic.sh -6 -A rfc4106_256 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic11 icmp-uni-basic.sh -6 -A rfc4309_128 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic12 icmp-uni-basic.sh -6 -A rfc4309_192 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic13 icmp-uni-basic.sh -6 -A rfc4309_256 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic14 icmp-uni-basic.sh -6 -A rfc4543_128 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic15 icmp-uni-basic.sh -6 -A rfc4543_192 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic16 icmp-uni-basic.sh -6 -A rfc4543_256 -p esp_aead -m transport -s 10:100:1000:10000:65490
+icmp6-uni-basic17 icmp-uni-basic.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic18 icmp-uni-basic.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic19 icmp-uni-basic.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic20 icmp-uni-basic.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic21 icmp-uni-basic.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic22 icmp-uni-basic.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic23 icmp-uni-basic.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic24 icmp-uni-basic.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic25 icmp-uni-basic.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-basic26 icmp-uni-basic.sh -6 -p esp -m beet -s 10:100:1000:10000:65490
 
-icmp4-uni-vti01 icmp-uni-vti.sh -p ah -a sha256 -m tunnel -S fffffffe -k 1 -s "10 100 1000 10000 65463"
-icmp4-uni-vti02 icmp-uni-vti.sh -p esp -a sha512 -e des -m tunnel -S fffffffe -k 2 -s "10 100 1000 10000 65450"
-icmp4-uni-vti03 icmp-uni-vti.sh -p esp -a rmd160 -e cast5 -m tunnel -S fffffffe -k 0xffffffff -s "10 100 1000 10000 65463"
-icmp4-uni-vti04 icmp-uni-vti.sh -p esp -e blowfish -m tunnel -S fffffffe -k 3 -s "10 100 1000 10000 65463"
-icmp4-uni-vti05 icmp-uni-vti.sh -p esp -a sha512 -e twofish -m tunnel -S fffffffe -k 0x7fffffff -s "10 100 1000 10000 65463"
-icmp4-uni-vti06 icmp-uni-vti.sh -p esp -a sha384 -e camellia -m tunnel -S fffffffe -k 0x80000000 -s "10 100 1000 10000 65463"
-icmp4-uni-vti07 icmp-uni-vti.sh -p esp -a sha512 -e serpent -m tunnel -S fffffffe -k 0xffff -s "10 100 1000 10000 65463"
-icmp4-uni-vti08 icmp-uni-vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti09 icmp-uni-vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti10 icmp-uni-vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti11 icmp-uni-vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti12 icmp-uni-vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti13 icmp-uni-vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti14 icmp-uni-vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti15 icmp-uni-vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
-icmp4-uni-vti16 icmp-uni-vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65463"
+icmp4-uni-vti01 icmp-uni-vti.sh -p ah -a sha256 -m tunnel -S fffffffe -k 1 -s 10:100:1000:10000:65463
+icmp4-uni-vti02 icmp-uni-vti.sh -p esp -a sha512 -e des -m tunnel -S fffffffe -k 2 -s 10:100:1000:10000:65450
+icmp4-uni-vti03 icmp-uni-vti.sh -p esp -a rmd160 -e cast5 -m tunnel -S fffffffe -k 0xffffffff -s 10:100:1000:10000:65463
+icmp4-uni-vti04 icmp-uni-vti.sh -p esp -e blowfish -m tunnel -S fffffffe -k 3 -s 10:100:1000:10000:65463
+icmp4-uni-vti05 icmp-uni-vti.sh -p esp -a sha512 -e twofish -m tunnel -S fffffffe -k 0x7fffffff -s 10:100:1000:10000:65463
+icmp4-uni-vti06 icmp-uni-vti.sh -p esp -a sha384 -e camellia -m tunnel -S fffffffe -k 0x80000000 -s 10:100:1000:10000:65463
+icmp4-uni-vti07 icmp-uni-vti.sh -p esp -a sha512 -e serpent -m tunnel -S fffffffe -k 0xffff -s 10:100:1000:10000:65463
+icmp4-uni-vti08 icmp-uni-vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti09 icmp-uni-vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti10 icmp-uni-vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti11 icmp-uni-vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti12 icmp-uni-vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti13 icmp-uni-vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti14 icmp-uni-vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti15 icmp-uni-vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
+icmp4-uni-vti16 icmp-uni-vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65463
 icmp4-uni-vti17 icmp-uni-vti.sh -p comp -m tunnel -s 1000
 
-icmp6-uni-vti01 icmp-uni-vti.sh -6 -p ah -m tunnel -S fffffffe -k 0xffffffff -s "10 100 1000 10000 65527"
-icmp6-uni-vti02 icmp-uni-vti.sh -6 -p esp -a sha256 -e des3_ede -m tunnel -S fffffffe -k 0xffffffff -s "10 100 1000 10000 65527"
-icmp6-uni-vti03 icmp-uni-vti.sh -6 -p esp -a sha512 -e cast5 -m tunnel -S fffffffe -k 1 -s "10 100 1000 10000 65527"
-icmp6-uni-vti04 icmp-uni-vti.sh -6 -p esp -a rmd160 -e blowfish -m tunnel -S fffffffe -k 0x80000000 -s "10 100 1000 10000 65527"
-icmp6-uni-vti05 icmp-uni-vti.sh -6 -p esp -e twofish -m tunnel -S fffffffe -k 0xffff -s "10 100 1000 10000 65527"
-icmp6-uni-vti06 icmp-uni-vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -S fffffffe -k 0x7fffffff -s "10 100 1000 10000 65527"
-icmp6-uni-vti07 icmp-uni-vti.sh -6 -p esp -a sha384 -e serpent -m tunnel -S ffffffff -k 0x11111111 -s "10 100 1000 10000 65527"
-icmp6-uni-vti08 icmp-uni-vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti09 icmp-uni-vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti10 icmp-uni-vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti11 icmp-uni-vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti12 icmp-uni-vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti13 icmp-uni-vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti14 icmp-uni-vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti15 icmp-uni-vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
-icmp6-uni-vti16 icmp-uni-vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "10 100 1000 10000 65527"
+icmp6-uni-vti01 icmp-uni-vti.sh -6 -p ah -m tunnel -S fffffffe -k 0xffffffff -s 10:100:1000:10000:65527
+icmp6-uni-vti02 icmp-uni-vti.sh -6 -p esp -a sha256 -e des3_ede -m tunnel -S fffffffe -k 0xffffffff -s 10:100:1000:10000:65527
+icmp6-uni-vti03 icmp-uni-vti.sh -6 -p esp -a sha512 -e cast5 -m tunnel -S fffffffe -k 1 -s 10:100:1000:10000:65527
+icmp6-uni-vti04 icmp-uni-vti.sh -6 -p esp -a rmd160 -e blowfish -m tunnel -S fffffffe -k 0x80000000 -s 10:100:1000:10000:65527
+icmp6-uni-vti05 icmp-uni-vti.sh -6 -p esp -e twofish -m tunnel -S fffffffe -k 0xffff -s 10:100:1000:10000:65527
+icmp6-uni-vti06 icmp-uni-vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -S fffffffe -k 0x7fffffff -s 10:100:1000:10000:65527
+icmp6-uni-vti07 icmp-uni-vti.sh -6 -p esp -a sha384 -e serpent -m tunnel -S ffffffff -k 0x11111111 -s 10:100:1000:10000:65527
+icmp6-uni-vti08 icmp-uni-vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti09 icmp-uni-vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti10 icmp-uni-vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti11 icmp-uni-vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti12 icmp-uni-vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti13 icmp-uni-vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti14 icmp-uni-vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti15 icmp-uni-vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
+icmp6-uni-vti16 icmp-uni-vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 10:100:1000:10000:65527
 icmp6-uni-vti17 icmp-uni-vti.sh -6 -p comp -m tunnel -s 1000
 
diff --git a/runtest/net_stress.ipsec_sctp b/runtest/net_stress.ipsec_sctp
index e71f951c4..a2453fefd 100644
--- a/runtest/net_stress.ipsec_sctp
+++ b/runtest/net_stress.ipsec_sctp
@@ -1,109 +1,109 @@
-sctp4_ipsec01 sctp_ipsec.sh -s "100 1000 65535"
-sctp4_ipsec02 sctp_ipsec.sh -p ah -m transport -s "100 1000 65535"
-sctp4_ipsec03 sctp_ipsec.sh -p ah -m tunnel -s "100 1000 65535"
-sctp4_ipsec04 sctp_ipsec.sh -p esp -m transport -s "100 1000 65535"
-sctp4_ipsec05 sctp_ipsec.sh -p esp -m tunnel -s "100 1000 65535"
-sctp4_ipsec06 sctp_ipsec.sh -p comp -m transport -s "100 1000 65535"
-sctp4_ipsec07 sctp_ipsec.sh -p comp -m tunnel -s "100 1000 65535"
-sctp4_ipsec08 sctp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec09 sctp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec10 sctp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec11 sctp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec12 sctp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec13 sctp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec14 sctp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec15 sctp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec16 sctp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec17 sctp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec18 sctp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec19 sctp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec20 sctp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec21 sctp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec22 sctp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec23 sctp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec24 sctp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s "100 1000 65535"
-sctp4_ipsec25 sctp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec26 sctp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s "100 1000 65535"
-sctp4_ipsec27 sctp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-sctp4_ipsec28 sctp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s "100 1000 65535"
-sctp4_ipsec29 sctp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-sctp4_ipsec30 sctp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s "100 1000 65535"
-sctp4_ipsec31 sctp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-sctp4_ipsec32 sctp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s "100 1000 65535"
-sctp4_ipsec33 sctp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-sctp4_ipsec34 sctp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s "100 1000 65535"
-sctp4_ipsec35 sctp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
-sctp4_ipsec36 sctp_ipsec.sh -p esp -m beet -s "100 1000 65535"
+sctp4_ipsec01 sctp_ipsec.sh -s 100:1000:65535
+sctp4_ipsec02 sctp_ipsec.sh -p ah -m transport -s 100:1000:65535
+sctp4_ipsec03 sctp_ipsec.sh -p ah -m tunnel -s 100:1000:65535
+sctp4_ipsec04 sctp_ipsec.sh -p esp -m transport -s 100:1000:65535
+sctp4_ipsec05 sctp_ipsec.sh -p esp -m tunnel -s 100:1000:65535
+sctp4_ipsec06 sctp_ipsec.sh -p comp -m transport -s 100:1000:65535
+sctp4_ipsec07 sctp_ipsec.sh -p comp -m tunnel -s 100:1000:65535
+sctp4_ipsec08 sctp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec09 sctp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec10 sctp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec11 sctp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec12 sctp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec13 sctp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec14 sctp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec15 sctp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec16 sctp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec17 sctp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec18 sctp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec19 sctp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec20 sctp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec21 sctp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec22 sctp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec23 sctp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec24 sctp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s 100:1000:65535
+sctp4_ipsec25 sctp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec26 sctp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s 100:1000:65535
+sctp4_ipsec27 sctp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+sctp4_ipsec28 sctp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s 100:1000:65535
+sctp4_ipsec29 sctp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+sctp4_ipsec30 sctp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s 100:1000:65535
+sctp4_ipsec31 sctp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+sctp4_ipsec32 sctp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s 100:1000:65535
+sctp4_ipsec33 sctp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+sctp4_ipsec34 sctp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s 100:1000:65535
+sctp4_ipsec35 sctp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
+sctp4_ipsec36 sctp_ipsec.sh -p esp -m beet -s 100:1000:65535
 
-sctp6_ipsec01 sctp_ipsec.sh -6 -s "100 1000 65535"
-sctp6_ipsec02 sctp_ipsec.sh -6 -p ah -m transport -s "100 1000 65535"
-sctp6_ipsec03 sctp_ipsec.sh -6 -p ah -m tunnel -s "100 1000 65535"
-sctp6_ipsec04 sctp_ipsec.sh -6 -p esp -m transport -s "100 1000 65535"
-sctp6_ipsec05 sctp_ipsec.sh -6 -p esp -m tunnel -s "100 1000 65535"
-sctp6_ipsec06 sctp_ipsec.sh -6 -p comp -m transport -s "100 1000 65535"
-sctp6_ipsec07 sctp_ipsec.sh -6 -p comp -m tunnel -s "100 1000 65535"
-sctp6_ipsec08 sctp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec09 sctp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec10 sctp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec11 sctp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec12 sctp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec13 sctp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec14 sctp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec15 sctp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec16 sctp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec17 sctp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec18 sctp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec19 sctp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec20 sctp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec21 sctp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec22 sctp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec23 sctp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec24 sctp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s "100 1000 65535"
-sctp6_ipsec25 sctp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec26 sctp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s "100 1000 65535"
-sctp6_ipsec27 sctp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-sctp6_ipsec28 sctp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s "100 1000 65535"
-sctp6_ipsec29 sctp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-sctp6_ipsec30 sctp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s "100 1000 65535"
-sctp6_ipsec31 sctp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-sctp6_ipsec32 sctp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s "100 1000 65535"
-sctp6_ipsec33 sctp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-sctp6_ipsec34 sctp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s "100 1000 65535"
-sctp6_ipsec35 sctp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
-sctp6_ipsec36 sctp_ipsec.sh -6 -p esp -m beet -s "100 1000 65535"
+sctp6_ipsec01 sctp_ipsec.sh -6 -s 100:1000:65535
+sctp6_ipsec02 sctp_ipsec.sh -6 -p ah -m transport -s 100:1000:65535
+sctp6_ipsec03 sctp_ipsec.sh -6 -p ah -m tunnel -s 100:1000:65535
+sctp6_ipsec04 sctp_ipsec.sh -6 -p esp -m transport -s 100:1000:65535
+sctp6_ipsec05 sctp_ipsec.sh -6 -p esp -m tunnel -s 100:1000:65535
+sctp6_ipsec06 sctp_ipsec.sh -6 -p comp -m transport -s 100:1000:65535
+sctp6_ipsec07 sctp_ipsec.sh -6 -p comp -m tunnel -s 100:1000:65535
+sctp6_ipsec08 sctp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec09 sctp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec10 sctp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec11 sctp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec12 sctp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec13 sctp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec14 sctp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec15 sctp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec16 sctp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec17 sctp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec18 sctp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec19 sctp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec20 sctp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec21 sctp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec22 sctp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec23 sctp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec24 sctp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s 100:1000:65535
+sctp6_ipsec25 sctp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec26 sctp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s 100:1000:65535
+sctp6_ipsec27 sctp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+sctp6_ipsec28 sctp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s 100:1000:65535
+sctp6_ipsec29 sctp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+sctp6_ipsec30 sctp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s 100:1000:65535
+sctp6_ipsec31 sctp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+sctp6_ipsec32 sctp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s 100:1000:65535
+sctp6_ipsec33 sctp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+sctp6_ipsec34 sctp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s 100:1000:65535
+sctp6_ipsec35 sctp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
+sctp6_ipsec36 sctp_ipsec.sh -6 -p esp -m beet -s 100:1000:65535
 
-sctp4_ipsec_vti01 sctp_ipsec_vti.sh -p ah -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti02 sctp_ipsec_vti.sh -p esp -m tunnel -s "100 1000 65535"
-# sctp4_ipsec_vti03 sctp_ipsec_vti.sh -p comp -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti04 sctp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti05 sctp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti06 sctp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti07 sctp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti08 sctp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti09 sctp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti10 sctp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti11 sctp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti12 sctp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti13 sctp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti14 sctp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti15 sctp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti16 sctp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-sctp4_ipsec_vti17 sctp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
+sctp4_ipsec_vti01 sctp_ipsec_vti.sh -p ah -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti02 sctp_ipsec_vti.sh -p esp -m tunnel -s 100:1000:65535
+# sctp4_ipsec_vti03 sctp_ipsec_vti.sh -p comp -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti04 sctp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti05 sctp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti06 sctp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti07 sctp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti08 sctp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti09 sctp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti10 sctp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti11 sctp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti12 sctp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti13 sctp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti14 sctp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti15 sctp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti16 sctp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+sctp4_ipsec_vti17 sctp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
 
-sctp6_ipsec_vti01 sctp_ipsec_vti.sh -6 -p ah -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti02 sctp_ipsec_vti.sh -6 -p esp -m tunnel -s "100 1000 65535"
-# sctp6_ipsec_vti03 sctp_ipsec_vti.sh -6 -p comp -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti04 sctp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti05 sctp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti06 sctp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti07 sctp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti08 sctp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti09 sctp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti10 sctp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti11 sctp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti12 sctp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti13 sctp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti14 sctp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti15 sctp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti16 sctp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-sctp6_ipsec_vti17 sctp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
+sctp6_ipsec_vti01 sctp_ipsec_vti.sh -6 -p ah -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti02 sctp_ipsec_vti.sh -6 -p esp -m tunnel -s 100:1000:65535
+# sctp6_ipsec_vti03 sctp_ipsec_vti.sh -6 -p comp -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti04 sctp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti05 sctp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti06 sctp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti07 sctp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti08 sctp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti09 sctp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti10 sctp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti11 sctp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti12 sctp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti13 sctp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti14 sctp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti15 sctp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti16 sctp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+sctp6_ipsec_vti17 sctp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
diff --git a/runtest/net_stress.ipsec_tcp b/runtest/net_stress.ipsec_tcp
index 30e0f4af0..ae52de518 100644
--- a/runtest/net_stress.ipsec_tcp
+++ b/runtest/net_stress.ipsec_tcp
@@ -1,109 +1,109 @@
-tcp4_ipsec01 tcp_ipsec.sh -s "100 1000 65535"
-tcp4_ipsec02 tcp_ipsec.sh -p ah -m transport -s "100 1000 65535"
-tcp4_ipsec03 tcp_ipsec.sh -p ah -m tunnel -s "100 1000 65535"
-tcp4_ipsec04 tcp_ipsec.sh -p esp -m transport -s "100 1000 65535"
-tcp4_ipsec05 tcp_ipsec.sh -p esp -m tunnel -s "100 1000 65535"
-tcp4_ipsec06 tcp_ipsec.sh -p comp -m transport -s "100 1000 65535"
-tcp4_ipsec07 tcp_ipsec.sh -p comp -m tunnel -s "100 1000 65535"
-tcp4_ipsec08 tcp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec09 tcp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec10 tcp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec11 tcp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec12 tcp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec13 tcp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec14 tcp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec15 tcp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec16 tcp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec17 tcp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec18 tcp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec19 tcp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec20 tcp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec21 tcp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec22 tcp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec23 tcp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec24 tcp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s "100 1000 65535"
-tcp4_ipsec25 tcp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec26 tcp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s "100 1000 65535"
-tcp4_ipsec27 tcp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-tcp4_ipsec28 tcp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s "100 1000 65535"
-tcp4_ipsec29 tcp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-tcp4_ipsec30 tcp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s "100 1000 65535"
-tcp4_ipsec31 tcp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-tcp4_ipsec32 tcp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s "100 1000 65535"
-tcp4_ipsec33 tcp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-tcp4_ipsec34 tcp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s "100 1000 65535"
-tcp4_ipsec35 tcp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
-tcp4_ipsec36 tcp_ipsec.sh -p esp -m beet -s "100 1000 65535"
+tcp4_ipsec01 tcp_ipsec.sh -s 100:1000:65535
+tcp4_ipsec02 tcp_ipsec.sh -p ah -m transport -s 100:1000:65535
+tcp4_ipsec03 tcp_ipsec.sh -p ah -m tunnel -s 100:1000:65535
+tcp4_ipsec04 tcp_ipsec.sh -p esp -m transport -s 100:1000:65535
+tcp4_ipsec05 tcp_ipsec.sh -p esp -m tunnel -s 100:1000:65535
+tcp4_ipsec06 tcp_ipsec.sh -p comp -m transport -s 100:1000:65535
+tcp4_ipsec07 tcp_ipsec.sh -p comp -m tunnel -s 100:1000:65535
+tcp4_ipsec08 tcp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec09 tcp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec10 tcp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec11 tcp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec12 tcp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec13 tcp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec14 tcp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec15 tcp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec16 tcp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec17 tcp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec18 tcp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec19 tcp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec20 tcp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec21 tcp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec22 tcp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec23 tcp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec24 tcp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s 100:1000:65535
+tcp4_ipsec25 tcp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec26 tcp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s 100:1000:65535
+tcp4_ipsec27 tcp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+tcp4_ipsec28 tcp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s 100:1000:65535
+tcp4_ipsec29 tcp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+tcp4_ipsec30 tcp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s 100:1000:65535
+tcp4_ipsec31 tcp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+tcp4_ipsec32 tcp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s 100:1000:65535
+tcp4_ipsec33 tcp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+tcp4_ipsec34 tcp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s 100:1000:65535
+tcp4_ipsec35 tcp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
+tcp4_ipsec36 tcp_ipsec.sh -p esp -m beet -s 100:1000:65535
 
-tcp6_ipsec01 tcp_ipsec.sh -6 -s "100 1000 65535"
-tcp6_ipsec02 tcp_ipsec.sh -6 -p ah -m transport -s "100 1000 65535"
-tcp6_ipsec03 tcp_ipsec.sh -6 -p ah -m tunnel -s "100 1000 65535"
-tcp6_ipsec04 tcp_ipsec.sh -6 -p esp -m transport -s "100 1000 65535"
-tcp6_ipsec05 tcp_ipsec.sh -6 -p esp -m tunnel -s "100 1000 65535"
-tcp6_ipsec06 tcp_ipsec.sh -6 -p comp -m transport -s "100 1000 65535"
-tcp6_ipsec07 tcp_ipsec.sh -6 -p comp -m tunnel -s "100 1000 65535"
-tcp6_ipsec08 tcp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec09 tcp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec10 tcp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec11 tcp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec12 tcp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec13 tcp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec14 tcp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec15 tcp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec16 tcp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec17 tcp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec18 tcp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec19 tcp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec20 tcp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec21 tcp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec22 tcp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec23 tcp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec24 tcp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s "100 1000 65535"
-tcp6_ipsec25 tcp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec26 tcp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s "100 1000 65535"
-tcp6_ipsec27 tcp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-tcp6_ipsec28 tcp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s "100 1000 65535"
-tcp6_ipsec29 tcp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-tcp6_ipsec30 tcp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s "100 1000 65535"
-tcp6_ipsec31 tcp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-tcp6_ipsec32 tcp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s "100 1000 65535"
-tcp6_ipsec33 tcp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-tcp6_ipsec34 tcp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s "100 1000 65535"
-tcp6_ipsec35 tcp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
-tcp6_ipsec36 tcp_ipsec.sh -6 -p esp -m beet -s "100 1000 65535"
+tcp6_ipsec01 tcp_ipsec.sh -6 -s 100:1000:65535
+tcp6_ipsec02 tcp_ipsec.sh -6 -p ah -m transport -s 100:1000:65535
+tcp6_ipsec03 tcp_ipsec.sh -6 -p ah -m tunnel -s 100:1000:65535
+tcp6_ipsec04 tcp_ipsec.sh -6 -p esp -m transport -s 100:1000:65535
+tcp6_ipsec05 tcp_ipsec.sh -6 -p esp -m tunnel -s 100:1000:65535
+tcp6_ipsec06 tcp_ipsec.sh -6 -p comp -m transport -s 100:1000:65535
+tcp6_ipsec07 tcp_ipsec.sh -6 -p comp -m tunnel -s 100:1000:65535
+tcp6_ipsec08 tcp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec09 tcp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec10 tcp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec11 tcp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec12 tcp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec13 tcp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec14 tcp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec15 tcp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec16 tcp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec17 tcp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec18 tcp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec19 tcp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec20 tcp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec21 tcp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec22 tcp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec23 tcp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec24 tcp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s 100:1000:65535
+tcp6_ipsec25 tcp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec26 tcp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s 100:1000:65535
+tcp6_ipsec27 tcp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+tcp6_ipsec28 tcp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s 100:1000:65535
+tcp6_ipsec29 tcp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+tcp6_ipsec30 tcp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s 100:1000:65535
+tcp6_ipsec31 tcp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+tcp6_ipsec32 tcp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s 100:1000:65535
+tcp6_ipsec33 tcp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+tcp6_ipsec34 tcp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s 100:1000:65535
+tcp6_ipsec35 tcp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
+tcp6_ipsec36 tcp_ipsec.sh -6 -p esp -m beet -s 100:1000:65535
 
-tcp4_ipsec_vti01 tcp_ipsec_vti.sh -p ah -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti02 tcp_ipsec_vti.sh -p esp -m tunnel -s "100 1000 65535"
-# tcp4_ipsec_vti03 tcp_ipsec_vti.sh -p comp -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti04 tcp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti05 tcp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti06 tcp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti07 tcp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti08 tcp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti09 tcp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti10 tcp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti11 tcp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti12 tcp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti13 tcp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti14 tcp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti15 tcp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti16 tcp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-tcp4_ipsec_vti17 tcp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
+tcp4_ipsec_vti01 tcp_ipsec_vti.sh -p ah -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti02 tcp_ipsec_vti.sh -p esp -m tunnel -s 100:1000:65535
+# tcp4_ipsec_vti03 tcp_ipsec_vti.sh -p comp -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti04 tcp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti05 tcp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti06 tcp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti07 tcp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti08 tcp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti09 tcp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti10 tcp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti11 tcp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti12 tcp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti13 tcp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti14 tcp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti15 tcp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti16 tcp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+tcp4_ipsec_vti17 tcp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
 
-tcp6_ipsec_vti01 tcp_ipsec_vti.sh -6 -p ah -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti02 tcp_ipsec_vti.sh -6 -p esp -m tunnel -s "100 1000 65535"
-# tcp6_ipsec_vti03 tcp_ipsec_vti.sh -6 -p comp -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti04 tcp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti05 tcp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti06 tcp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti07 tcp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti08 tcp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti09 tcp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti10 tcp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti11 tcp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti12 tcp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti13 tcp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti14 tcp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti15 tcp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti16 tcp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65535"
-tcp6_ipsec_vti17 tcp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65535"
+tcp6_ipsec_vti01 tcp_ipsec_vti.sh -6 -p ah -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti02 tcp_ipsec_vti.sh -6 -p esp -m tunnel -s 100:1000:65535
+# tcp6_ipsec_vti03 tcp_ipsec_vti.sh -6 -p comp -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti04 tcp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti05 tcp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti06 tcp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti07 tcp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti08 tcp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti09 tcp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti10 tcp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti11 tcp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti12 tcp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti13 tcp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti14 tcp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti15 tcp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti16 tcp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65535
+tcp6_ipsec_vti17 tcp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65535
diff --git a/runtest/net_stress.ipsec_udp b/runtest/net_stress.ipsec_udp
index 76c393f59..4b88c4d1b 100644
--- a/runtest/net_stress.ipsec_udp
+++ b/runtest/net_stress.ipsec_udp
@@ -1,109 +1,109 @@
-udp4_ipsec01 udp_ipsec.sh -s "100 1000 65507"
-udp4_ipsec02 udp_ipsec.sh -p ah -m transport -s "100 1000 65483"
-udp4_ipsec03 udp_ipsec.sh -p ah -m tunnel -s "100 1000 65463"
-udp4_ipsec04 udp_ipsec.sh -p esp -m transport -s "100 1000 65470"
-udp4_ipsec05 udp_ipsec.sh -p esp -m tunnel -s "100 1000 65450"
-udp4_ipsec06 udp_ipsec.sh -p comp -m transport -s "100 1000 65000"
-udp4_ipsec07 udp_ipsec.sh -p comp -m tunnel -s "100 1000 65000"
-udp4_ipsec08 udp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec09 udp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec10 udp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec11 udp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec12 udp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec13 udp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec14 udp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec15 udp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec16 udp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec17 udp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec18 udp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec19 udp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec20 udp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec21 udp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec22 udp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec23 udp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec24 udp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s "100 1000 65470"
-udp4_ipsec25 udp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec26 udp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s "100 1000 65470"
-udp4_ipsec27 udp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65450"
-udp4_ipsec28 udp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s "100 1000 65470"
-udp4_ipsec29 udp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65426"
-udp4_ipsec30 udp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s "100 1000 65446"
-udp4_ipsec31 udp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65426"
-udp4_ipsec32 udp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s "100 1000 65446"
-udp4_ipsec33 udp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65426"
-udp4_ipsec34 udp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s "100 1000 65446"
-udp4_ipsec35 udp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65426"
-udp4_ipsec36 udp_ipsec.sh -p esp -m beet -s "100 1000 65446"
+udp4_ipsec01 udp_ipsec.sh -s 100:1000:65507
+udp4_ipsec02 udp_ipsec.sh -p ah -m transport -s 100:1000:65483
+udp4_ipsec03 udp_ipsec.sh -p ah -m tunnel -s 100:1000:65463
+udp4_ipsec04 udp_ipsec.sh -p esp -m transport -s 100:1000:65470
+udp4_ipsec05 udp_ipsec.sh -p esp -m tunnel -s 100:1000:65450
+udp4_ipsec06 udp_ipsec.sh -p comp -m transport -s 100:1000:65000
+udp4_ipsec07 udp_ipsec.sh -p comp -m tunnel -s 100:1000:65000
+udp4_ipsec08 udp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec09 udp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec10 udp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec11 udp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec12 udp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec13 udp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec14 udp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec15 udp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec16 udp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec17 udp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec18 udp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec19 udp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec20 udp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec21 udp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec22 udp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec23 udp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec24 udp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s 100:1000:65470
+udp4_ipsec25 udp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec26 udp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s 100:1000:65470
+udp4_ipsec27 udp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65450
+udp4_ipsec28 udp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s 100:1000:65470
+udp4_ipsec29 udp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65426
+udp4_ipsec30 udp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s 100:1000:65446
+udp4_ipsec31 udp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65426
+udp4_ipsec32 udp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s 100:1000:65446
+udp4_ipsec33 udp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65426
+udp4_ipsec34 udp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s 100:1000:65446
+udp4_ipsec35 udp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65426
+udp4_ipsec36 udp_ipsec.sh -p esp -m beet -s 100:1000:65446
 
-udp6_ipsec01 udp_ipsec.sh -6 -s "100 1000 65527"
-udp6_ipsec02 udp_ipsec.sh -6 -p ah -m transport -s "100 1000 65503"
-udp6_ipsec03 udp_ipsec.sh -6 -p ah -m tunnel -s "100 1000 65527"
-udp6_ipsec04 udp_ipsec.sh -6 -p esp -m transport -s "100 1000 65490"
-udp6_ipsec05 udp_ipsec.sh -6 -p esp -m tunnel -s "100 1000 65527"
-udp6_ipsec06 udp_ipsec.sh -6 -p comp -m transport -s "100 1000 65000"
-udp6_ipsec07 udp_ipsec.sh -6 -p comp -m tunnel -s "100 1000 65000"
-udp6_ipsec08 udp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec09 udp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec10 udp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec11 udp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec12 udp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec13 udp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec14 udp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec15 udp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec16 udp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec17 udp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec18 udp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec19 udp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec20 udp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec21 udp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec22 udp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec23 udp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec24 udp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s "100 1000 65490"
-udp6_ipsec25 udp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec26 udp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s "100 1000 65490"
-udp6_ipsec27 udp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65527"
-udp6_ipsec28 udp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s "100 1000 65490"
-udp6_ipsec29 udp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65527"
-udp6_ipsec30 udp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s "100 1000 65462"
-udp6_ipsec31 udp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65527"
-udp6_ipsec32 udp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s "100 1000 65462"
-udp6_ipsec33 udp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65527"
-udp6_ipsec34 udp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s "100 1000 65478"
-udp6_ipsec35 udp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65527"
-udp6_ipsec36 udp_ipsec.sh -6 -p esp -m beet -s "100 1000 65478"
+udp6_ipsec01 udp_ipsec.sh -6 -s 100:1000:65527
+udp6_ipsec02 udp_ipsec.sh -6 -p ah -m transport -s 100:1000:65503
+udp6_ipsec03 udp_ipsec.sh -6 -p ah -m tunnel -s 100:1000:65527
+udp6_ipsec04 udp_ipsec.sh -6 -p esp -m transport -s 100:1000:65490
+udp6_ipsec05 udp_ipsec.sh -6 -p esp -m tunnel -s 100:1000:65527
+udp6_ipsec06 udp_ipsec.sh -6 -p comp -m transport -s 100:1000:65000
+udp6_ipsec07 udp_ipsec.sh -6 -p comp -m tunnel -s 100:1000:65000
+udp6_ipsec08 udp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec09 udp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec10 udp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec11 udp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec12 udp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec13 udp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec14 udp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec15 udp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec16 udp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec17 udp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec18 udp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec19 udp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec20 udp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec21 udp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec22 udp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec23 udp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec24 udp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s 100:1000:65490
+udp6_ipsec25 udp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec26 udp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s 100:1000:65490
+udp6_ipsec27 udp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65527
+udp6_ipsec28 udp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s 100:1000:65490
+udp6_ipsec29 udp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65527
+udp6_ipsec30 udp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s 100:1000:65462
+udp6_ipsec31 udp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65527
+udp6_ipsec32 udp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s 100:1000:65462
+udp6_ipsec33 udp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65527
+udp6_ipsec34 udp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s 100:1000:65478
+udp6_ipsec35 udp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65527
+udp6_ipsec36 udp_ipsec.sh -6 -p esp -m beet -s 100:1000:65478
 
-udp4_ipsec_vti01 udp_ipsec_vti.sh -p ah -m tunnel -s "100 1000 65463"
-udp4_ipsec_vti02 udp_ipsec_vti.sh -p esp -m tunnel -s "100 1000 65450"
+udp4_ipsec_vti01 udp_ipsec_vti.sh -p ah -m tunnel -s 100:1000:65463
+udp4_ipsec_vti02 udp_ipsec_vti.sh -p esp -m tunnel -s 100:1000:65450
 udp4_ipsec_vti03 udp_ipsec_vti.sh -p comp -m tunnel -s 1500
-udp4_ipsec_vti04 udp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti05 udp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti06 udp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti07 udp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti08 udp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti09 udp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti10 udp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti11 udp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti12 udp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti13 udp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65450"
-udp4_ipsec_vti14 udp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65426"
-udp4_ipsec_vti15 udp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65426"
-udp4_ipsec_vti16 udp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65426"
-udp4_ipsec_vti17 udp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65426"
+udp4_ipsec_vti04 udp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti05 udp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti06 udp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti07 udp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti08 udp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti09 udp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti10 udp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti11 udp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti12 udp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65450
+udp4_ipsec_vti13 udp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65450
+udp4_ipsec_vti14 udp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65426
+udp4_ipsec_vti15 udp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65426
+udp4_ipsec_vti16 udp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65426
+udp4_ipsec_vti17 udp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65426
 
-udp6_ipsec_vti01 udp_ipsec_vti.sh -6 -p ah -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti02 udp_ipsec_vti.sh -6 -p esp -m tunnel -s "100 1000 65527"
+udp6_ipsec_vti01 udp_ipsec_vti.sh -6 -p ah -m tunnel -s 100:1000:65527
+udp6_ipsec_vti02 udp_ipsec_vti.sh -6 -p esp -m tunnel -s 100:1000:65527
 udp6_ipsec_vti03 udp_ipsec_vti.sh -6 -p comp -m tunnel -s 1500
-udp6_ipsec_vti04 udp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti05 udp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti06 udp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti07 udp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti08 udp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti09 udp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti10 udp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti11 udp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti12 udp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti13 udp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti14 udp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti15 udp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti16 udp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 1000 65527"
-udp6_ipsec_vti17 udp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 1000 65527"
+udp6_ipsec_vti04 udp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti05 udp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti06 udp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti07 udp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti08 udp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti09 udp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti10 udp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti11 udp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti12 udp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:1000:65527
+udp6_ipsec_vti13 udp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:1000:65527
+udp6_ipsec_vti14 udp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:1000:65527
+udp6_ipsec_vti15 udp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:1000:65527
+udp6_ipsec_vti16 udp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:1000:65527
+udp6_ipsec_vti17 udp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:1000:65527
diff --git a/testcases/network/stress/ipsec/ipsec_lib.sh b/testcases/network/stress/ipsec/ipsec_lib.sh
index 9c293ca3e..afa7c7c75 100644
--- a/testcases/network/stress/ipsec/ipsec_lib.sh
+++ b/testcases/network/stress/ipsec/ipsec_lib.sh
@@ -30,7 +30,7 @@ AALGO="sha1"
 CALGO="deflate"
 
 IPSEC_REQUESTS="500"
-IPSEC_SIZE_ARRAY="${IPSEC_SIZE_ARRAY:-10 100 1000 2000 10000 65000}"
+IPSEC_SIZE_ARRAY="${IPSEC_SIZE_ARRAY:-10:100:1000:2000:10000:65000}"
 
 ipsec_lib_parse_args()
 {
@@ -41,7 +41,7 @@ ipsec_lib_parse_args()
 		echo "l n      n is the number of test link when tests run"
 		echo "m x      x is ipsec mode, could be transport / tunnel"
 		echo "p x      x is ipsec protocol, could be ah / esp / comp"
-		echo "s x      x is icmp message size array"
+		echo "s x      x is icmp message size array (items separated by ':')"
 		echo "S n      n is IPsec SPI value"
 		echo "k x      key for vti interface"
 		echo "A x      Authenticated encryption with associated data algorithm"
@@ -65,6 +65,14 @@ ipsec_lib_parse_args()
 	r) IPSEC_REQUESTS="$2" ;;
 	*) tst_brkm TBROK "unknown option: $1" ;;
 	esac
+
+	local IFS=":"
+	local tmp="$IPSEC_SIZE_ARRAY"
+	local p
+	for p in $IPSEC_SIZE_ARRAY; do
+		tmp="$p "
+	done
+	IPSEC_SIZE_ARRAY="$tmp"
 }
 
 TST_OPTS="hl:m:p:s:S:k:A:e:a:c:r:"
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 6/9] net/{stress, virt}: Use SPDX-License-Identifier GPL-2.0-or-later
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
                   ` (4 preceding siblings ...)
  2018-07-03  7:42 ` [LTP] [PATCH v3 5/9] net/ipsec: Use ':' as array separator for -s parameter Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 7/9] net/virt_lib.sh: Remove possibility to pass custom sizes to virt_netperf_msg_sizes() Petr Vorel
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

to save space
+ add author in few cases.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/tst_net.sh                      | 17 +----------------
 testcases/network/stress/dccp/dccp_ipsec.sh   | 15 +--------------
 .../network/stress/dccp/dccp_ipsec_vti.sh     | 15 +--------------
 .../network/stress/icmp/icmp-uni-basic.sh     | 18 ++----------------
 testcases/network/stress/icmp/icmp-uni-vti.sh | 15 +--------------
 testcases/network/stress/ipsec/ipsec_lib.sh   | 19 ++-----------------
 testcases/network/stress/sctp/sctp_ipsec.sh   | 15 +--------------
 .../network/stress/sctp/sctp_ipsec_vti.sh     | 15 +--------------
 testcases/network/stress/tcp/tcp_ipsec.sh     | 15 +--------------
 testcases/network/stress/tcp/tcp_ipsec_vti.sh | 15 +--------------
 testcases/network/stress/udp/udp_ipsec.sh     | 15 +--------------
 testcases/network/stress/udp/udp_ipsec_vti.sh | 15 +--------------
 testcases/network/virt/geneve01.sh            | 15 +--------------
 testcases/network/virt/gre01.sh               | 15 +--------------
 testcases/network/virt/ipvlan01.sh            | 15 +--------------
 testcases/network/virt/macsec01.sh            | 15 ++-------------
 testcases/network/virt/macsec02.sh            | 15 ++-------------
 testcases/network/virt/macvlan01.sh           | 15 +--------------
 testcases/network/virt/macvtap01.sh           | 15 +--------------
 testcases/network/virt/virt_lib.sh            | 16 +---------------
 testcases/network/virt/vlan01.sh              | 16 +---------------
 testcases/network/virt/vlan02.sh              | 16 +---------------
 testcases/network/virt/vlan03.sh              | 15 +--------------
 testcases/network/virt/vxlan01.sh             | 16 +---------------
 testcases/network/virt/vxlan02.sh             | 16 +---------------
 testcases/network/virt/vxlan03.sh             | 15 +--------------
 26 files changed, 30 insertions(+), 374 deletions(-)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index e55ac1ddc..65fbe2c28 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -1,23 +1,8 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved.
 # Copyright (c) 2016-2018 Petr Vorel <pvorel@suse.cz>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
-#
 
 [ -n "$TST_LIB_NET_LOADED" ] && return 0
 TST_LIB_NET_LOADED=1
diff --git a/testcases/network/stress/dccp/dccp_ipsec.sh b/testcases/network/stress/dccp/dccp_ipsec.sh
index 624f8e0af..d1afd4569 100755
--- a/testcases/network/stress/dccp/dccp_ipsec.sh
+++ b/testcases/network/stress/dccp/dccp_ipsec.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=dccp_ipsec
diff --git a/testcases/network/stress/dccp/dccp_ipsec_vti.sh b/testcases/network/stress/dccp/dccp_ipsec_vti.sh
index 878f88ccf..f5ff1029d 100755
--- a/testcases/network/stress/dccp/dccp_ipsec_vti.sh
+++ b/testcases/network/stress/dccp/dccp_ipsec_vti.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=dccp_ipsec_vti
diff --git a/testcases/network/stress/icmp/icmp-uni-basic.sh b/testcases/network/stress/icmp/icmp-uni-basic.sh
index 3099b6caa..b168a821c 100755
--- a/testcases/network/stress/icmp/icmp-uni-basic.sh
+++ b/testcases/network/stress/icmp/icmp-uni-basic.sh
@@ -1,23 +1,9 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2016 Red Hat Inc.,  All Rights Reserved.
 # Copyright (c) International Business Machines  Corp., 2005
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Hangbin Liu <haliu@redhat.com>
-#
-################################################################################
+
 TCID=${TCID:-icmp-uni-basic}
 TST_TOTAL=1
 TST_COUNT=1
diff --git a/testcases/network/stress/icmp/icmp-uni-vti.sh b/testcases/network/stress/icmp/icmp-uni-vti.sh
index ea8b5c828..9a7fba59f 100755
--- a/testcases/network/stress/icmp/icmp-uni-vti.sh
+++ b/testcases/network/stress/icmp/icmp-uni-vti.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=icmp-uni-vti
diff --git a/testcases/network/stress/ipsec/ipsec_lib.sh b/testcases/network/stress/ipsec/ipsec_lib.sh
index afa7c7c75..e851d46e4 100644
--- a/testcases/network/stress/ipsec/ipsec_lib.sh
+++ b/testcases/network/stress/ipsec/ipsec_lib.sh
@@ -1,24 +1,9 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2016 Red Hat Inc.,  All Rights Reserved.
 # Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved.
-# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Hangbin Liu <haliu@redhat.com>
-#
-#######################################################################
 
 # Authenticated encryption with associated data
 AEALGO="rfc4106_128"
diff --git a/testcases/network/stress/sctp/sctp_ipsec.sh b/testcases/network/stress/sctp/sctp_ipsec.sh
index 5f99bc7df..ee9018f01 100755
--- a/testcases/network/stress/sctp/sctp_ipsec.sh
+++ b/testcases/network/stress/sctp/sctp_ipsec.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=sctp_ipsec
diff --git a/testcases/network/stress/sctp/sctp_ipsec_vti.sh b/testcases/network/stress/sctp/sctp_ipsec_vti.sh
index 3fa3a738b..ed851475a 100755
--- a/testcases/network/stress/sctp/sctp_ipsec_vti.sh
+++ b/testcases/network/stress/sctp/sctp_ipsec_vti.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=sctp_ipsec_vti
diff --git a/testcases/network/stress/tcp/tcp_ipsec.sh b/testcases/network/stress/tcp/tcp_ipsec.sh
index 86f455532..0f875948c 100755
--- a/testcases/network/stress/tcp/tcp_ipsec.sh
+++ b/testcases/network/stress/tcp/tcp_ipsec.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=tcp_ipsec
diff --git a/testcases/network/stress/tcp/tcp_ipsec_vti.sh b/testcases/network/stress/tcp/tcp_ipsec_vti.sh
index a793ef63c..13a67d3bb 100755
--- a/testcases/network/stress/tcp/tcp_ipsec_vti.sh
+++ b/testcases/network/stress/tcp/tcp_ipsec_vti.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=tcp_ipsec_vti
diff --git a/testcases/network/stress/udp/udp_ipsec.sh b/testcases/network/stress/udp/udp_ipsec.sh
index 9b5ac07b2..9c46fc6c0 100755
--- a/testcases/network/stress/udp/udp_ipsec.sh
+++ b/testcases/network/stress/udp/udp_ipsec.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=udp_ipsec
diff --git a/testcases/network/stress/udp/udp_ipsec_vti.sh b/testcases/network/stress/udp/udp_ipsec_vti.sh
index 36a50bb3d..1b138afb6 100755
--- a/testcases/network/stress/udp/udp_ipsec_vti.sh
+++ b/testcases/network/stress/udp/udp_ipsec_vti.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=udp_ipsec_vti
diff --git a/testcases/network/virt/geneve01.sh b/testcases/network/virt/geneve01.sh
index 1385604d3..91d03883d 100755
--- a/testcases/network/virt/geneve01.sh
+++ b/testcases/network/virt/geneve01.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2016-2017 Oracle and/or its affiliates.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
 TCID=geneve01
diff --git a/testcases/network/virt/gre01.sh b/testcases/network/virt/gre01.sh
index 4da396986..efb78a940 100755
--- a/testcases/network/virt/gre01.sh
+++ b/testcases/network/virt/gre01.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015-2017 Oracle and/or its affiliates.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # It requires remote host. Test will setup IPv4 and IPv6 virtual
diff --git a/testcases/network/virt/ipvlan01.sh b/testcases/network/virt/ipvlan01.sh
index 36b07f027..426b2cb6b 100755
--- a/testcases/network/virt/ipvlan01.sh
+++ b/testcases/network/virt/ipvlan01.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete ipvlan
diff --git a/testcases/network/virt/macsec01.sh b/testcases/network/virt/macsec01.sh
index 52d6f071a..cf038e7ca 100755
--- a/testcases/network/virt/macsec01.sh
+++ b/testcases/network/virt/macsec01.sh
@@ -1,18 +1,7 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Test-case: setup two MACsec drivers and run TCP traffic over them
 # with default MACsec configuration, compare performance with similar
diff --git a/testcases/network/virt/macsec02.sh b/testcases/network/virt/macsec02.sh
index 617860d41..63c035e44 100755
--- a/testcases/network/virt/macsec02.sh
+++ b/testcases/network/virt/macsec02.sh
@@ -1,18 +1,7 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Test-case: setup two MACsec drivers and run TCP traffic over them
 # with enabled frame encryption and replay protection, compare
diff --git a/testcases/network/virt/macvlan01.sh b/testcases/network/virt/macvlan01.sh
index cafca75e2..f37851f50 100755
--- a/testcases/network/virt/macvlan01.sh
+++ b/testcases/network/virt/macvlan01.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete macvlan
diff --git a/testcases/network/virt/macvtap01.sh b/testcases/network/virt/macvtap01.sh
index 7b90213a1..21fd96777 100755
--- a/testcases/network/virt/macvtap01.sh
+++ b/testcases/network/virt/macvtap01.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete macvtap
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 7579907ff..eaec33d8f 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -1,20 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved.
-# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # VxLAN
diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
index 5ac412b32..4dceae82f 100755
--- a/testcases/network/virt/vlan01.sh
+++ b/testcases/network/virt/vlan01.sh
@@ -1,23 +1,9 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create multiple VLAN interfaces.
-#
 
 TCID=vlan01
 TST_TOTAL=9
diff --git a/testcases/network/virt/vlan02.sh b/testcases/network/virt/vlan02.sh
index 748f9c44c..2b84a7cd0 100755
--- a/testcases/network/virt/vlan02.sh
+++ b/testcases/network/virt/vlan02.sh
@@ -1,24 +1,10 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete VLAN
 # interface 4095 times.
-#
 
 TCID=vlan02
 TST_TOTAL=1
diff --git a/testcases/network/virt/vlan03.sh b/testcases/network/virt/vlan03.sh
index 7a8f74295..33bfaf84c 100755
--- a/testcases/network/virt/vlan03.sh
+++ b/testcases/network/virt/vlan03.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2015-2017 Oracle and/or its affiliates.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual
diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
index 6195b00b3..49bcb942a 100755
--- a/testcases/network/virt/vxlan01.sh
+++ b/testcases/network/virt/vxlan01.sh
@@ -1,23 +1,9 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create multiple VXLAN interfaces.
-#
 
 TCID=vxlan01
 TST_TOTAL=5
diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
index a93e7802d..dde1dabc8 100755
--- a/testcases/network/virt/vxlan02.sh
+++ b/testcases/network/virt/vxlan02.sh
@@ -1,24 +1,10 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete VXLAN
 # interface 5000 times.
-#
 
 TCID=vxlan02
 TST_TOTAL=1
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
index 37a172e4c..d8c533cb3 100755
--- a/testcases/network/virt/vxlan03.sh
+++ b/testcases/network/virt/vxlan03.sh
@@ -1,19 +1,6 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Copyright (c) 2014-2017 Oracle and/or its affiliates.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 7/9] net/virt_lib.sh: Remove possibility to pass custom sizes to virt_netperf_msg_sizes()
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
                   ` (5 preceding siblings ...)
  2018-07-03  7:42 ` [LTP] [PATCH v3 6/9] net/{stress, virt}: Use SPDX-License-Identifier GPL-2.0-or-later Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-03  7:42 ` [LTP] [PATCH v3 8/9] net/{stress, virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using them Petr Vorel
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

+ remove unused client_requests=20000

Custom sizes haven't been used yet.
This is a preparation for next commit, which (while rewriting tests into
new shell API) start using virt_netperf_msg_sizes() as test functions
directly (as in new API it gets $1 for test number since 4bcc0addf.

    TST_TESTFUNC="virt_netperf_msg_sizes"

instead of wrapping it into function:

    TST_TESTFUNC="do_test"
    do_test()
    {
	virt_netperf_msg_sizes
    }

Actually the best would be to replace sizes array in function with
TST_TEST_DATA, but that would require split tests cases, which use
virt_netperf_msg_sizes() with other functions, which are without arrays
(e.g. virt_compare_netperf() and virt_minimize_timeout() in vlan03.sh,
geneve01.sh abd vxlan03.sh)

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/virt/virt_lib.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index eaec33d8f..66f10bd41 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -328,8 +328,7 @@ virt_macsec_setup()
 
 virt_netperf_msg_sizes()
 {
-	local sizes="${@:-100 1000 2000 10000}"
-	client_requests=20000
+	local sizes="100 1000 2000 10000"
 
 	for s in $sizes; do
 		virt_compare_netperf pass "-n $s -N $s"
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 8/9] net/{stress, virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using them
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
                   ` (6 preceding siblings ...)
  2018-07-03  7:42 ` [LTP] [PATCH v3 7/9] net/virt_lib.sh: Remove possibility to pass custom sizes to virt_netperf_msg_sizes() Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-04 17:19   ` Alexey Kodanev
  2018-07-03  7:42 ` [LTP] [PATCH v3 9/9] net/virt: Introduce macsec_lib.sh to reduce duplicity Petr Vorel
  2018-07-04 15:56 ` [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
  9 siblings, 1 reply; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

It was needed to migrate it all in once, as macsec0{1,2}.sh tests are
using both libraries.

This includes:
* Create setup, getopts and helper function for both libraries.
* Using TST_TEST_DATA and TST_TEST_DATA_IFS in many test cases
(simplify tests and allow to have more TST_CNT to keep readability of
output + required by udp_ipsec.sh and udp_ipsec_vti.sh otherwise it'd
need to use getopts to determine type of udp, as passing parameter to
tst_run is not not recommended to new API).
* Put code into TST_TESTFUNC functions.
* Move anything based on TST_IPV6 to TST_SETUP setup functions (as
TST_IPV6 is not set until setup)

Other changes:
* udp_ipsec{,_vti}.sh: were calling do_test() twice, with parameter.
Now they use correctly TST_CNT and no params.
Order of running tests changed. Before first were run udp tests for all
items in $IPSEC_SIZE_ARRAY, then all udp_lite tests. Now for each item
in $IPSEC_SIZE_ARRAY both udp and udp_lite tests are run.
* gre01.sh: Move back device type setting (changed in 57738337a
"network/gre01: fix device type setting").

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/stress/dccp/dccp_ipsec.sh   |  19 +-
 .../network/stress/dccp/dccp_ipsec_vti.sh     |  19 +-
 .../network/stress/icmp/icmp-uni-basic.sh     |  26 +--
 testcases/network/stress/icmp/icmp-uni-vti.sh |  24 +--
 testcases/network/stress/ipsec/ipsec_lib.sh   | 159 ++++++++---------
 testcases/network/stress/sctp/sctp_ipsec.sh   |  20 +--
 .../network/stress/sctp/sctp_ipsec_vti.sh     |  20 +--
 testcases/network/stress/tcp/tcp_ipsec.sh     |  22 +--
 testcases/network/stress/tcp/tcp_ipsec_vti.sh |  21 +--
 testcases/network/stress/udp/udp_ipsec.sh     |  24 ++-
 testcases/network/stress/udp/udp_ipsec_vti.sh |  24 ++-
 testcases/network/virt/geneve01.sh            |  42 ++---
 testcases/network/virt/gre01.sh               |  31 ++--
 testcases/network/virt/ipvlan01.sh            |  14 +-
 testcases/network/virt/macsec01.sh            |  36 ++--
 testcases/network/virt/macsec02.sh            |  38 ++--
 testcases/network/virt/macvlan01.sh           |  14 +-
 testcases/network/virt/macvtap01.sh           |  14 +-
 testcases/network/virt/virt_lib.sh            | 167 +++++++-----------
 testcases/network/virt/vlan01.sh              |  19 +-
 testcases/network/virt/vlan02.sh              |  12 +-
 testcases/network/virt/vlan03.sh              |  50 +++---
 testcases/network/virt/vxlan01.sh             |  15 +-
 testcases/network/virt/vxlan02.sh             |  16 +-
 testcases/network/virt/vxlan03.sh             |  38 ++--
 25 files changed, 404 insertions(+), 480 deletions(-)

diff --git a/testcases/network/stress/dccp/dccp_ipsec.sh b/testcases/network/stress/dccp/dccp_ipsec.sh
index d1afd4569..ef80bf979 100755
--- a/testcases/network/stress/dccp/dccp_ipsec.sh
+++ b/testcases/network/stress/dccp/dccp_ipsec.sh
@@ -1,25 +1,18 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=dccp_ipsec
-TST_TOTAL=3
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_TESTFUNC=do_test
+TST_SETUP=tst_ipsec_setup
+TST_CLEANUP=tst_ipsec_cleanup
 . ipsec_lib.sh
 
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $(tst_ipaddr rhost) -T dccp -n $p -N $p \
-			-r $IPSEC_REQUESTS
-	done
+	tst_netload -H $(tst_ipaddr rhost) -T dccp -n $2 -N $2 -r $IPSEC_REQUESTS
 }
 
-tst_ipsec_setup
-
-do_test
-
-tst_exit
+tst_run
diff --git a/testcases/network/stress/dccp/dccp_ipsec_vti.sh b/testcases/network/stress/dccp/dccp_ipsec_vti.sh
index f5ff1029d..ee2b0d4ca 100755
--- a/testcases/network/stress/dccp/dccp_ipsec_vti.sh
+++ b/testcases/network/stress/dccp/dccp_ipsec_vti.sh
@@ -1,25 +1,18 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=dccp_ipsec_vti
-TST_TOTAL=3
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_TESTFUNC=do_test
+TST_SETUP=tst_ipsec_setup_vti
+TST_CLEANUP=tst_ipsec_cleanup
 . ipsec_lib.sh
 
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $ip_rmt_tun -T dccp -n $p -N $p \
-			-r $IPSEC_REQUESTS
-	done
+	tst_netload -H $ip_rmt_tun -T dccp -n $2 -N $2 -r $IPSEC_REQUESTS
 }
 
-tst_ipsec_setup_vti
-
-do_test
-
-tst_exit
+tst_run
diff --git a/testcases/network/stress/icmp/icmp-uni-basic.sh b/testcases/network/stress/icmp/icmp-uni-basic.sh
index b168a821c..5980b81e5 100755
--- a/testcases/network/stress/icmp/icmp-uni-basic.sh
+++ b/testcases/network/stress/icmp/icmp-uni-basic.sh
@@ -1,21 +1,25 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2016 Red Hat Inc.,  All Rights Reserved.
 # Copyright (c) International Business Machines  Corp., 2005
 # Author: Hangbin Liu <haliu@redhat.com>
 
-TCID=${TCID:-icmp-uni-basic}
-TST_TOTAL=1
-TST_COUNT=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_TESTFUNC=do_test
+TST_SETUP=do_setup
+TST_CLEANUP=tst_ipsec_cleanup
 . ipsec_lib.sh
 
-tst_ipsec_setup
-
-PING_MAX="$IPSEC_REQUESTS"
+do_setup()
+{
+	tst_ipsec_setup
+	PING_MAX="$IPSEC_REQUESTS"
+	tst_res TINFO "Sending ICMP messages"
+}
 
-tst_resm TINFO "Sending ICMP messages"
-tst_ping $(tst_iface) $(tst_ipaddr rhost) $IPSEC_SIZE_ARRAY
+do_test()
+{
+	tst_ping $(tst_iface) $(tst_ipaddr rhost) $2
+}
 
-tst_exit
+tst_run
diff --git a/testcases/network/stress/icmp/icmp-uni-vti.sh b/testcases/network/stress/icmp/icmp-uni-vti.sh
index 9a7fba59f..24eca177c 100755
--- a/testcases/network/stress/icmp/icmp-uni-vti.sh
+++ b/testcases/network/stress/icmp/icmp-uni-vti.sh
@@ -1,24 +1,24 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=icmp-uni-vti
-TST_TOTAL=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_TESTFUNC=do_test
+TST_SETUP=do_setup
+TST_CLEANUP=tst_ipsec_cleanup
 . ipsec_lib.sh
 
-do_test()
+do_setup()
 {
+	tst_ipsec_setup_vti
 	PING_MAX="$IPSEC_REQUESTS"
-
-	tst_resm TINFO "Sending ICMP messages"
-	tst_ping $tst_vti $ip_rmt_tun $IPSEC_SIZE_ARRAY
+	tst_res TINFO "Sending ICMP messages"
 }
 
-tst_ipsec_setup_vti
-
-do_test
+do_test()
+{
+	tst_ping $tst_vti $ip_rmt_tun $2
+}
 
-tst_exit
+tst_run
diff --git a/testcases/network/stress/ipsec/ipsec_lib.sh b/testcases/network/stress/ipsec/ipsec_lib.sh
index e851d46e4..aedba9b7c 100644
--- a/testcases/network/stress/ipsec/ipsec_lib.sh
+++ b/testcases/network/stress/ipsec/ipsec_lib.sh
@@ -15,54 +15,78 @@ AALGO="sha1"
 CALGO="deflate"
 
 IPSEC_REQUESTS="500"
-IPSEC_SIZE_ARRAY="${IPSEC_SIZE_ARRAY:-10:100:1000:2000:10000:65000}"
+
+ipsec_lib_usage()
+{
+	echo "l n     n is the number of test link when tests run"
+	echo "m x     x is ipsec mode, could be transport / tunnel"
+	echo "p x     x is ipsec protocol, could be ah / esp / comp"
+	echo "s x     x is icmp message size array"
+	echo "S n     n is IPsec SPI value"
+	echo "k x     key for vti interface"
+	echo "A x     Authenticated encryption with associated data algorithm"
+	echo "e x     Encryption algorithm"
+	echo "a x     Authentication algorithm"
+	echo "c x     Compression algorithm"
+	echo "r x     Num of requests, PING_MAX or netstress' '-r' opt"
+}
 
 ipsec_lib_parse_args()
 {
 	case "$1" in
-	h)
-		echo "Usage:"
-		echo "h        help"
-		echo "l n      n is the number of test link when tests run"
-		echo "m x      x is ipsec mode, could be transport / tunnel"
-		echo "p x      x is ipsec protocol, could be ah / esp / comp"
-		echo "s x      x is icmp message size array (items separated by ':')"
-		echo "S n      n is IPsec SPI value"
-		echo "k x      key for vti interface"
-		echo "A x      Authenticated encryption with associated data algorithm"
-		echo "e x      Encryption algorithm"
-		echo "a x      Authentication algorithm"
-		echo "c x      Compression algorithm"
-		echo "r x      Num of requests, PING_MAX or netstress' '-r' opt"
-		echo "6        run over IPv6"
-		exit 0
-	;;
-	l) LINK_NUM=$2 ;;
-	m) IPSEC_MODE=$2 ;;
-	p) IPSEC_PROTO=$2 ;;
-	s) IPSEC_SIZE_ARRAY="$2" ;;
-	S) SPI=$2 ;;
-	k) VTI_KEY=$2 ;;
-	A) AEALGO=$2 ;;
-	e) EALGO=$2 ;;
-	a) AALGO=$2 ;;
-	c) CALGO=$2 ;;
-	r) IPSEC_REQUESTS="$2" ;;
-	*) tst_brkm TBROK "unknown option: $1" ;;
+	l) LINK_NUM=$2;;
+	m) IPSEC_MODE=$2;;
+	p) IPSEC_PROTO=$2;;
+	s) TST_TEST_DATA="$2"; TST_TEST_DATA_IFS=":";;
+	S) SPI=$2;;
+	k) VTI_KEY=$2;;
+	A) AEALGO=$2;;
+	e) EALGO=$2;;
+	a) AALGO=$2;;
+	c) CALGO=$2;;
+	r) IPSEC_REQUESTS="$2";;
+	esac
+}
+
+ipsec_lib_setup()
+{
+	case $AEALGO in
+	rfc4106_128|rfc4543_128) AEALGO_KEY=$(get_key 160);;
+	rfc4106_192|rfc4543_192) AEALGO_KEY=$(get_key 224);;
+	rfc4106_256|rfc4543_256) AEALGO_KEY=$(get_key 288);;
+	rfc4309_128) AEALGO_KEY=$(get_key 152);;
+	rfc4309_192) AEALGO_KEY=$(get_key 216);;
+	rfc4309_256) AEALGO_KEY=$(get_key 280);;
 	esac
 
-	local IFS=":"
-	local tmp="$IPSEC_SIZE_ARRAY"
-	local p
-	for p in $IPSEC_SIZE_ARRAY; do
-		tmp="$p "
-	done
-	IPSEC_SIZE_ARRAY="$tmp"
+	case $EALGO in
+	des) EALGO_KEY=$(get_key 64);;
+	des3_ede) EALGO_KEY=$(get_key 192);;
+	cast5) EALGO_KEY=$(get_key 128);;
+	blowfish) EALGO_KEY=$(get_key 448);;
+	aes|twofish|camellia|serpent) EALGO_KEY=$(get_key 256);;
+	*) tst_brk TBROK "unknown enc alg: $EALGO";;
+	esac
+
+	case $AALGO in
+	sha1|rmd160) AALGO_KEY=$(get_key 160);;
+	sha256) AALGO_KEY=$(get_key 256);;
+	sha384) AALGO_KEY=$(get_key 384);;
+	sha512) AALGO_KEY=$(get_key 512);;
+	*) tst_brk TBROK "unknown auth alg: $AALGO";;
+	esac
+
+	SPI=${SPI:-1000}
+	VTI_KEY=${VTI_KEY:-10}
+	cleanup_vti=
+	ALG=
+	ALGR=
 }
 
-TST_OPTS="hl:m:p:s:S:k:A:e:a:c:r:"
+TST_OPTS="l:m:p:s:S:k:A:e:a:c:r:"
 TST_PARSE_ARGS=ipsec_lib_parse_args
-TST_USE_LEGACY_API=1
+TST_SETUP=${TST_SETUP:-ipsec_lib_setup}
+TST_USAGE=ipsec_lib_usage
 . tst_net.sh
 
 get_key()
@@ -72,43 +96,12 @@ get_key()
 	echo "0x$(hexdump -vn $bytes -e '1/1 "%02x"' /dev/urandom)"
 }
 
-case $AEALGO in
-rfc4106_128|rfc4543_128) AEALGO_KEY=$(get_key 160) ;;
-rfc4106_192|rfc4543_192) AEALGO_KEY=$(get_key 224) ;;
-rfc4106_256|rfc4543_256) AEALGO_KEY=$(get_key 288) ;;
-rfc4309_128) AEALGO_KEY=$(get_key 152) ;;
-rfc4309_192) AEALGO_KEY=$(get_key 216) ;;
-rfc4309_256) AEALGO_KEY=$(get_key 280) ;;
-esac
-
-case $EALGO in
-des) EALGO_KEY=$(get_key 64) ;;
-des3_ede) EALGO_KEY=$(get_key 192) ;;
-cast5) EALGO_KEY=$(get_key 128) ;;
-blowfish) EALGO_KEY=$(get_key 448) ;;
-aes|twofish|camellia|serpent) EALGO_KEY=$(get_key 256) ;;
-*) tst_brkm TBROK "unknown enc alg: $EALGO" ;;
-esac
-
-case $AALGO in
-sha1|rmd160) AALGO_KEY=$(get_key 160) ;;
-sha256) AALGO_KEY=$(get_key 256) ;;
-sha384) AALGO_KEY=$(get_key 384) ;;
-sha512) AALGO_KEY=$(get_key 512) ;;
-*) tst_brkm TBROK "unknown auth alg: $AALGO" ;;
-esac
-
-SPI=${SPI:-1000}
-VTI_KEY=${VTI_KEY:-10}
-cleanup_vti=
-ALG=
-ALGR=
-
 tst_ipsec_setup()
 {
+	ipsec_lib_setup
 	# Configure SAD/SPD
 	if [ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ]; then
-		tst_resm TINFO "IPsec[$IPSEC_PROTO/$IPSEC_MODE]"
+		tst_res TINFO "IPsec[$IPSEC_PROTO/$IPSEC_MODE]"
 		tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
 		tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
 	fi
@@ -125,8 +118,6 @@ tst_ipsec_cleanup()
 		ip li del $cleanup_vti 2>/dev/null
 		tst_rhost_run -c "ip li del $cleanup_vti 2>/dev/null"
 	fi
-
-	[ "$TST_NEEDS_TMPDIR" = 1 ] && tst_rmdir
 }
 
 ipsec_set_algoline()
@@ -161,7 +152,7 @@ ipsec_set_algoline()
 		ALGR=$ALG
 		;;
 	*)
-		tst_brkm TCONF "tst_ipsec protocol mismatch"
+		tst_brk TCONF "tst_ipsec protocol mismatch"
 		;;
 	esac
 }
@@ -173,11 +164,11 @@ ipsec_try()
 	if echo "$output" | grep -q "TERR"; then
 		echo "$output" | grep -q \
 			'RTNETLINK answers: Function not implemented' && \
-			tst_brkm TCONF "'$@': not implemented"
+			tst_brk TCONF "'$@': not implemented"
 		echo "$output" | grep -q \
 			'RTNETLINK answers: Operation not supported' && \
-			tst_brkm TCONF "'$@': not supported (maybe missing 'ip${TST_IPV6}_vti' kernel module)"
-		tst_brkm TBROK "$@ failed: $output"
+			tst_brk TCONF "'$@': not supported (maybe missing 'ip${TST_IPV6}_vti' kernel module)"
+		tst_brk TBROK "$@ failed: $output"
 	fi
 }
 
@@ -189,7 +180,7 @@ ipsec_try()
 tst_ipsec()
 {
 	if [ $# -ne 3 ]; then
-		tst_brkm TCONF "tst_ipsec parameter mismatch"
+		tst_brk TCONF "tst_ipsec parameter mismatch"
 	fi
 
 	local target=$1
@@ -237,7 +228,7 @@ tst_ipsec()
 tst_ipsec_vti()
 {
 	if [ $# -ne 4 ]; then
-		tst_brkm TCONF "tst_ipsec_vti parameter mismatch"
+		tst_brk TCONF "tst_ipsec_vti parameter mismatch"
 	fi
 
 	local target=$1
@@ -255,7 +246,7 @@ tst_ipsec_vti()
 	local rd="dev $(tst_iface rhost)"
 
 	ip li add type vti help 2>&1 | grep -q vti || \
-		tst_brkm TCONF "iproute doesn't support 'vti'"
+		tst_brk TCONF "iproute doesn't support 'vti'"
 
 	ipsec_set_algoline
 
@@ -296,6 +287,8 @@ tst_ipsec_vti()
 #  * ip_rmt_tun - remote IP address
 tst_ipsec_setup_vti()
 {
+	ipsec_lib_setup
+
 	if_loc=$(tst_iface)
 	if_rmt=$(tst_iface rhost)
 
@@ -304,7 +297,7 @@ tst_ipsec_setup_vti()
 
 	tst_vti="ltp_vti0"
 
-	tst_resm TINFO "Test vti$TST_IPV6 + IPsec[$IPSEC_PROTO/$IPSEC_MODE]"
+	tst_res TINFO "Test vti$TST_IPV6 + IPsec[$IPSEC_PROTO/$IPSEC_MODE]"
 
 	tst_ipsec_vti lhost $ip_loc $ip_rmt $tst_vti
 	tst_ipsec_vti rhost $ip_rmt $ip_loc $tst_vti
@@ -322,7 +315,7 @@ tst_ipsec_setup_vti()
 		ROD ip route add ${IPV4_NET16_UNUSED}.1.0/$mask dev $tst_vti
 	fi
 
-	tst_resm TINFO "Add IPs to vti tunnel, " \
+	tst_res TINFO "Add IPs to vti tunnel, " \
 		       "loc: $ip_loc_tun/$mask, rmt: $ip_rmt_tun/$mask"
 
 	ROD ip a add $ip_loc_tun/$mask dev $tst_vti nodad
diff --git a/testcases/network/stress/sctp/sctp_ipsec.sh b/testcases/network/stress/sctp/sctp_ipsec.sh
index ee9018f01..8a7b885d9 100755
--- a/testcases/network/stress/sctp/sctp_ipsec.sh
+++ b/testcases/network/stress/sctp/sctp_ipsec.sh
@@ -1,25 +1,19 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=sctp_ipsec
-TST_TOTAL=3
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_TESTFUNC=do_test
+TST_SETUP=tst_ipsec_setup
+TST_CLEANUP=tst_ipsec_cleanup
 . ipsec_lib.sh
 
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $(tst_ipaddr rhost) -T sctp -n $p -N $p \
-			-r $IPSEC_REQUESTS -S $(tst_ipaddr)
-	done
+	tst_netload -H $(tst_ipaddr rhost) -T sctp -n $2 -N $2 \
+		-r $IPSEC_REQUESTS -S $(tst_ipaddr)
 }
 
-tst_ipsec_setup
-
-do_test
-
-tst_exit
+tst_run
diff --git a/testcases/network/stress/sctp/sctp_ipsec_vti.sh b/testcases/network/stress/sctp/sctp_ipsec_vti.sh
index ed851475a..d0f24c727 100755
--- a/testcases/network/stress/sctp/sctp_ipsec_vti.sh
+++ b/testcases/network/stress/sctp/sctp_ipsec_vti.sh
@@ -1,25 +1,19 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=sctp_ipsec_vti
-TST_TOTAL=3
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_SETUP=tst_ipsec_setup_vti
+TST_CLEANUP=tst_ipsec_cleanup
+TST_TESTFUNC=do_test
 . ipsec_lib.sh
 
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $ip_rmt_tun -T sctp -n $p -N $p \
-			-r $IPSEC_REQUESTS -S $ip_loc_tun
-	done
+	tst_netload -H $ip_rmt_tun -T sctp -n $2 -N $2 -r $IPSEC_REQUESTS \
+		-S $ip_loc_tun
 }
 
-tst_ipsec_setup_vti
-
-do_test
-
-tst_exit
+tst_run
diff --git a/testcases/network/stress/tcp/tcp_ipsec.sh b/testcases/network/stress/tcp/tcp_ipsec.sh
index 0f875948c..d62272db0 100755
--- a/testcases/network/stress/tcp/tcp_ipsec.sh
+++ b/testcases/network/stress/tcp/tcp_ipsec.sh
@@ -1,27 +1,21 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=tcp_ipsec
-TST_TOTAL=3
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
+TST_TESTFUNC=do_test
+TST_SETUP=tst_ipsec_setup
+TST_CLEANUP=tst_ipsec_cleanup
+. ipsec_lib.sh
 
 max_requests=10
 
-. ipsec_lib.sh
-
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $(tst_ipaddr rhost) -n $p -N $p \
-			-r $IPSEC_REQUESTS -R $max_requests
-	done
+	tst_netload -H $(tst_ipaddr rhost) -n $2 -N $2 -r $IPSEC_REQUESTS \
+		-R $max_requests
 }
 
-tst_ipsec_setup
-
-do_test
-
-tst_exit
+tst_run
diff --git a/testcases/network/stress/tcp/tcp_ipsec_vti.sh b/testcases/network/stress/tcp/tcp_ipsec_vti.sh
index 13a67d3bb..f7bbbc6e9 100755
--- a/testcases/network/stress/tcp/tcp_ipsec_vti.sh
+++ b/testcases/network/stress/tcp/tcp_ipsec_vti.sh
@@ -1,27 +1,20 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=tcp_ipsec_vti
-TST_TOTAL=3
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
+TST_TESTFUNC=do_test
+TST_SETUP=tst_ipsec_setup_vti
+TST_CLEANUP=tst_ipsec_cleanup
+. ipsec_lib.sh
 
 max_requests=10
 
-. ipsec_lib.sh
-
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $ip_rmt_tun -n $p -N $p \
-			-r $IPSEC_REQUESTS -R $max_requests
-	done
+	tst_netload -H $ip_rmt_tun -n $2 -N $2 -r $IPSEC_REQUESTS -R $max_requests
 }
 
-tst_ipsec_setup_vti
-
-do_test
-
-tst_exit
+tst_run
diff --git a/testcases/network/stress/udp/udp_ipsec.sh b/testcases/network/stress/udp/udp_ipsec.sh
index 9c46fc6c0..b59070ebe 100755
--- a/testcases/network/stress/udp/udp_ipsec.sh
+++ b/testcases/network/stress/udp/udp_ipsec.sh
@@ -1,26 +1,22 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=udp_ipsec
-TST_TOTAL=6
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_TESTFUNC=do_test
+TST_SETUP=tst_ipsec_setup
+TST_CNT=2
+TST_CLEANUP=tst_ipsec_cleanup
 . ipsec_lib.sh
 
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $(tst_ipaddr rhost) -T $1 -n $p -N $p \
-			-r $IPSEC_REQUESTS
-	done
-}
+	local type="udp"
+	[ $1 -eq 2 ] && type="udp_lite"
 
-tst_ipsec_setup
-
-do_test udp
-do_test udp_lite
+	tst_netload -H $(tst_ipaddr rhost) -T $type -n $2 -N $2 -r $IPSEC_REQUESTS
+}
 
-tst_exit
+tst_run
diff --git a/testcases/network/stress/udp/udp_ipsec_vti.sh b/testcases/network/stress/udp/udp_ipsec_vti.sh
index 1b138afb6..65b48eaa4 100755
--- a/testcases/network/stress/udp/udp_ipsec_vti.sh
+++ b/testcases/network/stress/udp/udp_ipsec_vti.sh
@@ -1,26 +1,22 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=udp_ipsec_vti
-TST_TOTAL=6
 TST_NEEDS_TMPDIR=1
-TST_CLEANUP="tst_ipsec_cleanup"
-
+TST_TESTFUNC=do_test
+TST_CNT=2
+TST_SETUP=tst_ipsec_setup_vti
+TST_CLEANUP=tst_ipsec_cleanup
 . ipsec_lib.sh
 
 do_test()
 {
-	for p in $IPSEC_SIZE_ARRAY; do
-		tst_netload -H $ip_rmt_tun -T $1 -n $p -N $p \
-			-r $IPSEC_REQUESTS
-	done
-}
+	local type="udp"
+	[ $1 -eq 2 ] && type="udp_lite"
 
-tst_ipsec_setup_vti
-
-do_test udp
-do_test udp_lite
+	tst_netload -H $ip_rmt_tun -T $type -n $2 -N $2 -r $IPSEC_REQUESTS
+}
 
-tst_exit
+tst_run
diff --git a/testcases/network/virt/geneve01.sh b/testcases/network/virt/geneve01.sh
index 91d03883d..8ddb97258 100755
--- a/testcases/network/virt/geneve01.sh
+++ b/testcases/network/virt/geneve01.sh
@@ -1,10 +1,9 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2016-2017 Oracle and/or its affiliates.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 
-TCID=geneve01
-TST_TOTAL=1
 TST_NEEDS_TMPDIR=1
 TST_OPTS="hi:d:"
 TST_PARSE_ARGS=virt_lib_parse_args
@@ -16,26 +15,29 @@ start_id=16700000
 # that is why using here 'vxlan_*' library functions.
 vxlan_dst_addr="uni"
 
+TST_TESTFUNC=do_test
+TST_CLEANUP=virt_cleanup
 . virt_lib.sh
 
 VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-160}
 [ "$VIRT_PERF_THRESHOLD" -lt 160 ] && VIRT_PERF_THRESHOLD=160
 
-TST_CLEANUP="virt_cleanup"
-
-if [ -z $ip_local -o -z $ip_remote ]; then
-	tst_brkm TBROK "you must specify IP address"
-fi
-
-tst_resm 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" "id 0xFFFFFE"
-virt_netperf_msg_sizes
-virt_cleanup_rmt
-
-tst_resm TINFO "different VNI shall not work together"
-vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE" "id 0xFFFFFD"
-virt_minimize_timeout
-virt_compare_netperf "fail"
-
-tst_exit
+do_test()
+{
+	if [ -z $ip_local -o -z $ip_remote ]; then
+		tst_brk TBROK "you must specify IP address"
+	fi
+
+	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" "id 0xFFFFFE"
+	virt_netperf_msg_sizes
+	virt_cleanup_rmt
+
+	tst_res TINFO "different VNI shall not work together"
+	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE" "id 0xFFFFFD"
+	virt_minimize_timeout
+	virt_compare_netperf "fail"
+}
+
+tst_run
diff --git a/testcases/network/virt/gre01.sh b/testcases/network/virt/gre01.sh
index efb78a940..27373fd4a 100755
--- a/testcases/network/virt/gre01.sh
+++ b/testcases/network/virt/gre01.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2015-2017 Oracle and/or its affiliates.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
@@ -7,23 +8,25 @@
 # tunnel between two hosts, then will compare TCP performance
 # with and without GRE using ping or netstress test.
 
-TCID=gre01
-TST_TOTAL=1
 TST_NEEDS_TMPDIR=1
-
-virt_type="gre"
+TST_TESTFUNC=virt_netperf_msg_sizes
+TST_SETUP=do_setup
+TST_CLEANUP=virt_cleanup
 . virt_lib.sh
 
-TST_CLEANUP="virt_cleanup"
-
-if [ -z $ip_local -o -z $ip_remote ]; then
-	tst_brkm TBROK "you must specify IP address"
-fi
+do_setup()
+{
+	virt_type="gre"
+	[ "$TST_IPV6" ] && virt_type="ip6gre"
+	virt_lib_setup
 
-tst_resm 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)"
+	if [ -z $ip_local -o -z $ip_remote ]; then
+		tst_brk TBROK "you must specify IP address"
+	fi
 
-virt_netperf_msg_sizes
+	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_exit
+tst_run
diff --git a/testcases/network/virt/ipvlan01.sh b/testcases/network/virt/ipvlan01.sh
index 426b2cb6b..f0a546668 100755
--- a/testcases/network/virt/ipvlan01.sh
+++ b/testcases/network/virt/ipvlan01.sh
@@ -1,20 +1,16 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete ipvlan
 # interface multiple times.
 
-TCID=ipvlan01
-TST_TOTAL=2
-
 virt_type="ipvlan"
-
+TST_TEST_DATA="mode l2,mode l3"
+TST_TEST_DATA_IFS=","
+TST_TESTFUNC=virt_test_02
 . virt_lib.sh
 
-options="mode l2,mode l3"
-
-virt_test_02 "$options"
-
-tst_exit
+tst_run
diff --git a/testcases/network/virt/macsec01.sh b/testcases/network/virt/macsec01.sh
index cf038e7ca..725d469e7 100755
--- a/testcases/network/virt/macsec01.sh
+++ b/testcases/network/virt/macsec01.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
@@ -7,30 +8,33 @@
 # with default MACsec configuration, compare performance with similar
 # IPsec configuration on master interface.
 
-TCID=macsec01
-TST_TOTAL=16
-TST_NEEDS_TMPDIR=1
-
 virt_type="macsec"
 VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100}
+IPSEC_MODE="transport"
+IPSEC_PROTO="ah"
 
+TST_NEEDS_TMPDIR=1
+TST_TESTFUNC=virt_netperf_msg_sizes
+TST_SETUP=do_setup
+TST_CLEANUP=do_cleanup
 . ipsec_lib.sh
 . virt_lib.sh
 
-cleanup()
+do_setup()
+{
+	ipsec_lib_setup
+
+	tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
+	tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
+	tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
+
+	virt_macsec_setup
+}
+
+do_cleanup()
 {
 	virt_cleanup
 	tst_ipsec_cleanup
 }
-TST_CLEANUP="cleanup"
-
-IPSEC_MODE=transport
-IPSEC_PROTO=ah
-tst_resm TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
-tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
-tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
-
-virt_macsec_setup
-virt_netperf_msg_sizes
 
-tst_exit
+tst_run
diff --git a/testcases/network/virt/macsec02.sh b/testcases/network/virt/macsec02.sh
index 63c035e44..575b5c4e0 100755
--- a/testcases/network/virt/macsec02.sh
+++ b/testcases/network/virt/macsec02.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
@@ -7,31 +8,34 @@
 # with enabled frame encryption and replay protection, compare
 # performance with similar IPsec configuration on master interface.
 
-TCID=macsec02
-TST_TOTAL=16
-TST_NEEDS_TMPDIR=1
-
 virt_type="macsec"
 VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100}
+IPSEC_MODE="transport"
+IPSEC_PROTO="esp_aead"
+EALGO="aes"
 
+TST_NEEDS_TMPDIR=1
+TST_TESTFUNC=virt_netperf_msg_sizes
+TST_SETUP=do_setup
+TST_CLEANUP=do_cleanup
 . ipsec_lib.sh
 . virt_lib.sh
 
-cleanup()
+do_setup()
+{
+	ipsec_lib_setup
+
+	tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
+	tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
+	tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
+
+	virt_macsec_setup "replay on window 300 encrypt on protect on"
+}
+
+do_cleanup()
 {
 	virt_cleanup
 	tst_ipsec_cleanup
 }
-TST_CLEANUP="cleanup"
-
-IPSEC_MODE=transport
-IPSEC_PROTO=esp_aead
-EALGO=aes
-tst_resm TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
-tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
-tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
-
-virt_macsec_setup "replay on window 300 encrypt on protect on"
-virt_netperf_msg_sizes
 
-tst_exit
+tst_run
diff --git a/testcases/network/virt/macvlan01.sh b/testcases/network/virt/macvlan01.sh
index f37851f50..3c4fda50b 100755
--- a/testcases/network/virt/macvlan01.sh
+++ b/testcases/network/virt/macvlan01.sh
@@ -1,20 +1,16 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete macvlan
 # interface multiple times.
 
-TCID=macvlan01
-TST_TOTAL=4
-
 virt_type="macvlan"
-
+TST_TEST_DATA="mode private,mode vepa,mode bridge,mode passthru"
+TST_TEST_DATA_IFS=","
+TST_TESTFUNC=virt_test_02
 . virt_lib.sh
 
-options="mode private,mode vepa,mode bridge,mode passthru"
-
-virt_test_02 "$options"
-
-tst_exit
+tst_run
diff --git a/testcases/network/virt/macvtap01.sh b/testcases/network/virt/macvtap01.sh
index 21fd96777..93a3d34f7 100755
--- a/testcases/network/virt/macvtap01.sh
+++ b/testcases/network/virt/macvtap01.sh
@@ -1,20 +1,16 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete macvtap
 # interface multiple times.
 
-TCID=macvtap01
-TST_TOTAL=4
-
 virt_type="macvtap"
-
+TST_TEST_DATA="mode private,mode vepa,mode bridge,mode passthru"
+TST_TEST_DATA_IFS=","
+TST_TESTFUNC=virt_test_02
 . virt_lib.sh
 
-options="mode private,mode vepa,mode bridge,mode passthru"
-
-virt_test_02 "$options"
-
-tst_exit
+tst_run
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index 66f10bd41..c40747ac4 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
@@ -15,30 +16,52 @@
 #          them in cleanup function. See "start_vni" variable which can
 #          solve it.
 
+TST_SETUP="${TST_SETUP:-virt_lib_setup}"
+TST_CLEANUP="${TST_CLEANUP:-cleanup_vifaces}"
+trap "tst_brk TBROK 'test interrupted'" INT
+
+virt_lib_usage()
+{
+	echo "i n     start ID to use"
+	echo "d x     VxLAN destination address, 'uni' or 'multi'"
+}
+
 virt_lib_parse_args()
 {
 	case "$1" in
-	h)
-		echo "Usage:"
-		echo "h        help"
-		echo "i n      start ID to use"
-		echo "d x      VxLAN destination address, 'uni' or 'multi'"
-		echo "6        run over IPv6"
-		exit 0
-	;;
 	i) start_id=$2 ;;
 	d) vxlan_dst_addr=$2 ;;
-	*)
-		tst_brkm TBROK "unknown option: $1"
+	esac
+}
+
+virt_lib_setup()
+{
+	case "$virt_type" in
+	vxlan|geneve)
+		if tst_kvcmp -lt "3.8"; then
+			tst_brk TCONF "test must be run with kernel 3.8 or newer"
+		fi
+
+		if [ "$TST_IPV6" ] && tst_kvcmp -lt "3.12"; then
+			tst_brk TCONF "test must be run with kernels >= 3.12"
+		fi
+
+		# newer versions of 'ip' complain if this option not set
+		ip li add type vxlan help 2>&1 | grep -q dstport && vxlan_dstport=1
 	;;
 	esac
+
+	tst_check_cmds "ip"
+
+	virt_add ltp_v0 || \
+		tst_brk TCONF "iproute2 or kernel doesn't support $virt_type"
+
+	ROD_SILENT "ip link delete ltp_v0"
 }
 
-TST_USE_LEGACY_API=1
+TST_NEEDS_ROOT=1
 . tst_net.sh
 
-[ -n "$TST_IPV6" -a "$virt_type" = "gre" ] && virt_type="ip6gre"
-
 ip_local=$(tst_ipaddr)
 ip_virt_local="$(TST_IPV6= tst_ipaddr_un)"
 ip6_virt_local="$(TST_IPV6=6 tst_ipaddr_un)"
@@ -53,7 +76,7 @@ vxlan_dstport=0
 
 cleanup_vifaces()
 {
-	tst_resm TINFO "cleanup virtual interfaces..."
+	tst_res TINFO "cleanup virtual interfaces..."
 	local viface=`ip li | sed -nE 's/^[0-9]+: (ltp_v[0-9]+)[@:].+/\1/p'`
 	for vx in $viface; do
 		ip link delete $vx
@@ -73,12 +96,8 @@ virt_cleanup_rmt()
 virt_cleanup()
 {
 	virt_cleanup_rmt
-	[ "$TST_NEEDS_TMPDIR" = 1 ] && tst_rmdir
 }
 
-TST_CLEANUP="cleanup_vifaces"
-trap "tst_brkm TBROK 'test interrupted'" INT
-
 virt_add()
 {
 	local vname=$1
@@ -137,12 +156,13 @@ virt_multiple_add_test()
 {
 	local opt="$@"
 	local max=$(($start_id + $NS_TIMES - 1))
+	local i
 
-	tst_resm TINFO "add $NS_TIMES $virt_type, then delete"
+	tst_res TINFO "add $NS_TIMES $virt_type, then delete"
 
 	for i in $(seq $start_id $max); do
 		virt_add ltp_v$i id $i $opt || \
-			tst_brkm TFAIL "failed to create 'ltp_v0 $opt'"
+			tst_brk TFAIL "failed to create 'ltp_v0 $opt'"
 		ROD_SILENT "ip link set ltp_v$i up"
 	done
 
@@ -151,23 +171,24 @@ virt_multiple_add_test()
 		ROD_SILENT "ip link delete ltp_v$i"
 	done
 
-	tst_resm TPASS "done"
+	tst_res TPASS "done"
 }
 
 virt_add_delete_test()
 {
 	local opt="$@"
 	local max=$(($NS_TIMES - 1))
+	local i
 
-	tst_resm TINFO "add/del $virt_type $NS_TIMES times"
+	tst_res TINFO "add/del $virt_type $NS_TIMES times"
 
 	for i in $(seq 0 $max); do
 		virt_add ltp_v0 $opt || \
-			tst_brkm TFAIL "failed to create 'ltp_v0 $opt'"
+			tst_brk TFAIL "failed to create 'ltp_v0 $opt'"
 		ROD_SILENT "ip link set ltp_v0 up"
 		ROD_SILENT "ip link delete ltp_v0"
 	done
-	tst_resm TPASS "done"
+	tst_res TPASS "done"
 }
 
 virt_setup()
@@ -175,11 +196,11 @@ virt_setup()
 	local opt="$1"
 	local opt_r="${2:-$1}"
 
-	tst_resm TINFO "setup local ${virt_type} with '$opt'"
+	tst_res TINFO "setup local ${virt_type} with '$opt'"
 	virt_add ltp_v0 $opt || \
-		tst_brkm TBROK "failed to create 'ltp_v0 $opt'"
+		tst_brk TBROK "failed to create 'ltp_v0 $opt'"
 
-	tst_resm TINFO "setup rhost ${virt_type} with '$opt_r'"
+	tst_res TINFO "setup rhost ${virt_type} with '$opt_r'"
 	virt_add_rhost "$opt_r"
 
 	ROD_SILENT "ip addr add ${ip6_virt_local}/64 dev ltp_v0 nodad"
@@ -212,11 +233,11 @@ virt_minimize_timeout()
 vxlan_setup_subnet_uni()
 {
 	if tst_kvcmp -lt "3.10"; then
-		tst_brkm TCONF "test must be run with kernel 3.10 or newer"
+		tst_brk TCONF "test must be run with kernel 3.10 or newer"
 	fi
 
 	[ "$(ip li add type $virt_type help 2>&1 | grep remote)" ] || \
-		tst_brkm TCONF "iproute doesn't support remote unicast address"
+		tst_brk TCONF "iproute doesn't support remote unicast address"
 
 	local opt="$1 remote $(tst_ipaddr rhost)"
 	local opt_r="$2 remote $(tst_ipaddr)"
@@ -265,26 +286,26 @@ virt_compare_netperf()
 	tst_netload -H $ip_remote $opts -d res_ipv4
 
 	local lt="$(cat res_ipv4)"
-	tst_resm TINFO "time lan($lt) $virt_type IPv4($vt) and IPv6($vt6) ms"
+	tst_res TINFO "time lan($lt) $virt_type IPv4($vt) and IPv6($vt6) ms"
 
 	per=$(( $vt * 100 / $lt - 100 ))
 	per6=$(( $vt6 * 100 / $lt - 100 ))
 
 	case "$virt_type" in
 	vxlan|geneve)
-		tst_resm TINFO "IP4 $virt_type over IP$TST_IPVER slower by $per %"
-		tst_resm TINFO "IP6 $virt_type over IP$TST_IPVER slower by $per6 %"
+		tst_res TINFO "IP4 $virt_type over IP$TST_IPVER slower by $per %"
+		tst_res TINFO "IP6 $virt_type over IP$TST_IPVER slower by $per6 %"
 	;;
 	*)
-		tst_resm TINFO "IP4 $virt_type slower by $per %"
-		tst_resm TINFO "IP6 $virt_type slower by $per6 %"
+		tst_res TINFO "IP4 $virt_type slower by $per %"
+		tst_res TINFO "IP6 $virt_type slower by $per6 %"
 	esac
 
 	if [ "$per" -ge "$VIRT_PERF_THRESHOLD" -o \
 	     "$per6" -ge "$VIRT_PERF_THRESHOLD" ]; then
-		tst_resm TFAIL "Test failed, threshold: $VIRT_PERF_THRESHOLD %"
+		tst_res TFAIL "Test failed, threshold: $VIRT_PERF_THRESHOLD %"
 	else
-		tst_resm TPASS "Test passed, threshold: $VIRT_PERF_THRESHOLD %"
+		tst_res TPASS "Test passed, threshold: $VIRT_PERF_THRESHOLD %"
 	fi
 }
 
@@ -292,7 +313,7 @@ virt_check_cmd()
 {
 	$@ > /dev/null 2>&1
 	if [ $? -ne 0 ]; then
-		tst_resm TCONF "'$@' option(s) not supported, skipping it"
+		tst_res TCONF "'$@' option(s) not supported, skipping it"
 		return 1
 	fi
 	ROD_SILENT "ip li delete ltp_v0"
@@ -329,82 +350,30 @@ virt_macsec_setup()
 virt_netperf_msg_sizes()
 {
 	local sizes="100 1000 2000 10000"
+	local s
 
 	for s in $sizes; do
 		virt_compare_netperf pass "-n $s -N $s"
 	done
 }
 
-# Check if we can create then delete virtual interface n times.
-# virt_test_01 [OPTIONS]
-# OPTIONS - different options separated by comma.
+# Check if we can create then delete virtual interface.
 virt_test_01()
 {
 	start_id="${start_id:-1}"
-	local opts="${1:-}"
-	local n=0
-
-	while true; do
-		n=$((n + 1))
-		p="$(echo $opts | cut -d',' -f$n)"
-		if [ -z "$p" -a $n -gt 1 ]; then
-			break
-		fi
-
-		tst_resm TINFO "add $virt_type with '$p'"
 
-		virt_check_cmd virt_add ltp_v0 id 0 $p || continue
-
-		virt_multiple_add_test "$p"
-	done
+	tst_res TINFO "add $virt_type with '$2'"
+	virt_check_cmd virt_add ltp_v0 id 0 $2 || return
+	virt_multiple_add_test "$2"
 }
 
-# Check if we can create then delete virtual interface n times.
-# virt_test_02 [OPTIONS]
-# OPTIONS - different options separated by comma.
+# Check if we can create then delete virtual interface.
 virt_test_02()
 {
 	start_id="${start_id:-1}"
-	local opts="${1:-}"
-	local n=0
-
-	while true; do
-		n=$((n + 1))
-		p="$(echo $opts | cut -d',' -f$n)"
-		if [ -z "$p" -a $n -gt 1 ]; then
-			break
-		fi
-
-		tst_resm TINFO "add and then delete $virt_type with '$p'"
-
-		virt_check_cmd virt_add ltp_v0 $p || continue
 
-		virt_add_delete_test "$p"
-
-		start_id=$(($start_id + $NS_TIMES))
-	done
+	tst_res TINFO "add and then delete $virt_type with '$2'"
+	virt_check_cmd virt_add ltp_v0 $2 || return
+	virt_add_delete_test "$2"
+	start_id=$(($start_id + $NS_TIMES))
 }
-
-tst_require_root
-
-case "$virt_type" in
-vxlan|geneve)
-	if tst_kvcmp -lt "3.8"; then
-		tst_brkm TCONF "test must be run with kernel 3.8 or newer"
-	fi
-
-	if [ "$TST_IPV6" ] && tst_kvcmp -lt "3.12"; then
-		tst_brkm TCONF "test must be run with kernels >= 3.12"
-	fi
-
-	# newer versions of 'ip' complain if this option not set
-	ip li add type vxlan help 2>&1 | grep -q dstport && vxlan_dstport=1
-;;
-esac
-
-tst_check_cmds "ip"
-
-virt_add ltp_v0 || \
-	tst_brkm TCONF "iproute2 or kernel doesn't support $virt_type"
-
-ROD_SILENT "ip link delete ltp_v0"
diff --git a/testcases/network/virt/vlan01.sh b/testcases/network/virt/vlan01.sh
index 4dceae82f..69d2564cb 100755
--- a/testcases/network/virt/vlan01.sh
+++ b/testcases/network/virt/vlan01.sh
@@ -1,17 +1,11 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create multiple VLAN interfaces.
 
-TCID=vlan01
-TST_TOTAL=9
-
-virt_type="vlan"
-
-. virt_lib.sh
-
 p0="protocol 802.1Q"
 p1="protocol 802.1ad"
 lb0="loose_binding off"
@@ -19,9 +13,12 @@ lb1="loose_binding on"
 rh0="reorder_hdr off"
 rh1="reorder_hdr on"
 
-options=" ,$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\
-$p1 $lb0 $rh0,$p1 $lb0 $rh1,$p1 $lb1 $rh0,$p1 $lb1 $rh1,"
+virt_type="vlan"
 
-virt_test_01 "$options"
+TST_TEST_DATA=",$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\
+$p1 $lb0 $rh0,$p1 $lb0 $rh1,$p1 $lb1 $rh0,$p1 $lb1 $rh1"
+TST_TEST_DATA_IFS=","
+TST_TESTFUNC=virt_test_01
+. virt_lib.sh
 
-tst_exit
+tst_run
diff --git a/testcases/network/virt/vlan02.sh b/testcases/network/virt/vlan02.sh
index 2b84a7cd0..04a8a5c60 100755
--- a/testcases/network/virt/vlan02.sh
+++ b/testcases/network/virt/vlan02.sh
@@ -1,18 +1,20 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete VLAN
 # interface 4095 times.
 
-TCID=vlan02
-TST_TOTAL=1
-
 virt_type="vlan"
 
+TST_TESTFUNC=do_test
 . virt_lib.sh
 
-virt_add_delete_test "id 4094"
+do_test()
+{
+	virt_add_delete_test "id 4094"
+}
 
-tst_exit
+tst_run
diff --git a/testcases/network/virt/vlan03.sh b/testcases/network/virt/vlan03.sh
index 33bfaf84c..adadd76fd 100755
--- a/testcases/network/virt/vlan03.sh
+++ b/testcases/network/virt/vlan03.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2015-2017 Oracle and/or its affiliates.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
@@ -10,20 +11,6 @@
 # Test-case 2: The same as above but must fail, because VLAN allows
 #              to communicate only within the same VLAN segment.
 
-TCID=vlan03
-TST_TOTAL=6
-TST_NEEDS_TMPDIR=1
-
-virt_type="vlan"
-
-. virt_lib.sh
-
-TST_CLEANUP="virt_cleanup"
-
-if [ -z $ip_local -o -z $ip_remote ]; then
-	tst_brkm TBROK "you must specify IP address"
-fi
-
 p0="protocol 802.1Q"
 p1="protocol 802.1ad"
 lb0="loose_binding off"
@@ -31,23 +18,38 @@ lb1="loose_binding on"
 rh0="reorder_hdr off"
 rh1="reorder_hdr on"
 
-opts=" ,$p0 $lb0 $rh1,$p1 $lb1 $rh1"
+virt_type="vlan"
+
+TST_NEEDS_TMPDIR=1
+TST_TEST_DATA=",$p0 $lb0 $rh1,$p1 $lb1 $rh1"
+TST_TEST_DATA_IFS=","
+TST_TESTFUNC=do_test
+TST_SETUP=do_setup
+TST_CLEANUP=virt_cleanup
+. virt_lib.sh
 
-for n in $(seq 1 3); do
-	p="$(echo $opts | cut -d',' -f$n)"
+do_setup()
+{
+	if [ -z $ip_local -o -z $ip_remote ]; then
+		tst_brk TBROK "you must specify IP address"
+	fi
+	virt_lib_setup
+}
 
-	virt_check_cmd virt_add ltp_v0 id 0 $p || continue
+do_test()
+{
+	virt_check_cmd virt_add ltp_v0 id 0 $2 || return
 
-	tst_resm TINFO "networks with the same VLAN ID must work"
-	virt_setup "id 4094 $p" "id 4094 $p"
+	tst_res TINFO "networks with the same VLAN ID must work"
+	virt_setup "id 4094 $2" "id 4094 $2"
 	virt_netperf_msg_sizes
 	virt_cleanup_rmt
 
-	tst_resm TINFO "different VLAN ID shall not work together"
-	virt_setup "id 4093 $p" "id 4094 $p"
+	tst_res TINFO "different VLAN ID shall not work together"
+	virt_setup "id 4093 $2" "id 4094 $2"
 	virt_minimize_timeout
 	virt_compare_netperf "fail"
 	virt_cleanup_rmt
-done
+}
 
-tst_exit
+tst_run
diff --git a/testcases/network/virt/vxlan01.sh b/testcases/network/virt/vxlan01.sh
index 49bcb942a..531691531 100755
--- a/testcases/network/virt/vxlan01.sh
+++ b/testcases/network/virt/vxlan01.sh
@@ -1,23 +1,22 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create multiple VXLAN interfaces.
 
-TCID=vxlan01
-TST_TOTAL=5
 TST_OPTS="hi:d:"
 TST_PARSE_ARGS=virt_lib_parse_args
+TST_USAGE=virt_lib_usage
 
 virt_type="vxlan"
 start_id=16700000
 
-. virt_lib.sh
-
-options="l2miss l3miss,norsc nolearning noproxy,\
+TST_TEST_DATA="l2miss l3miss,norsc nolearning noproxy,\
 ttl 0x01 tos 0x01,ttl 0xff tos 0xff,gbp"
+TST_TEST_DATA_IFS=","
+TST_TESTFUNC=virt_test_01
+. virt_lib.sh
 
-virt_test_01 "$options"
-
-tst_exit
+tst_run
diff --git a/testcases/network/virt/vxlan02.sh b/testcases/network/virt/vxlan02.sh
index dde1dabc8..04036a0df 100755
--- a/testcases/network/virt/vxlan02.sh
+++ b/testcases/network/virt/vxlan02.sh
@@ -1,24 +1,28 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
 # Local test, check if we can create and then delete VXLAN
 # interface 5000 times.
 
-TCID=vxlan02
-TST_TOTAL=1
 TST_OPTS="hi:d:"
 TST_PARSE_ARGS=virt_lib_parse_args
+TST_USAGE=virt_lib_usage
 
 virt_type="vxlan"
 start_id=16700000
 
+TST_TESTFUNC=do_test
 . virt_lib.sh
 
-[ "$TST_IPV6" ] && mult_addr="ff02::abc" || mult_addr="239.1.1.1"
-opt="group $mult_addr"
+do_test()
+{
+	local mult_addr="239.1.1.1"
+	[ "$TST_IPV6" ] && mult_addr="ff02::abc"
 
-virt_add_delete_test "id $start_id $opt"
+	virt_add_delete_test "id $start_id group $mult_addr"
+}
 
-tst_exit
+tst_run
diff --git a/testcases/network/virt/vxlan03.sh b/testcases/network/virt/vxlan03.sh
index d8c533cb3..5e6ccd448 100755
--- a/testcases/network/virt/vxlan03.sh
+++ b/testcases/network/virt/vxlan03.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
 # Copyright (c) 2014-2017 Oracle and/or its affiliates.
 # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
 #
@@ -10,11 +11,10 @@
 # Test-case 2: The same as above but must fail, because VXLAN allows
 #              to communicate only within the same VXLAN segment.
 
-TCID=vxlan03
-TST_TOTAL=4
 TST_NEEDS_TMPDIR=1
 TST_OPTS="hi:d:"
 TST_PARSE_ARGS=virt_lib_parse_args
+TST_USAGE=virt_lib_usage
 
 virt_type="vxlan"
 start_id=16700000
@@ -22,6 +22,11 @@ start_id=16700000
 # Destination address, can be unicast or multicast address
 vxlan_dst_addr="uni"
 
+TST_TEST_DATA=",gbp"
+TST_TEST_DATA_IFS=","
+TST_NEEDS_TMPDIR=1
+TST_TESTFUNC=do_test
+TST_CLEANUP=virt_cleanup
 . virt_lib.sh
 
 # In average cases (with small packets less then 150 bytes) VxLAN slower
@@ -31,30 +36,25 @@ vxlan_dst_addr="uni"
 VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-160}
 [ "$VIRT_PERF_THRESHOLD" -lt 160 ] && VIRT_PERF_THRESHOLD=160
 
-TST_CLEANUP="virt_cleanup"
-
-if [ -z $ip_local -o -z $ip_remote ]; then
-	tst_brkm TBROK "you must specify IP address"
-fi
-
-opts=" ,gbp"
-
-for n in $(seq 1 2); do
-	p="$(echo $opts | cut -d',' -f$n)"
+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 $p || continue
+	virt_check_cmd virt_add ltp_v0 id 0 $2 || continue
 
-	tst_resm TINFO "the same VNI must work"
+	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 $p" "id 0xFFFFFE $p"
+	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFE $2"
 	virt_netperf_msg_sizes
 	virt_cleanup_rmt
 
-	tst_resm TINFO "different VNI shall not work together"
-	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $p" "id 0xFFFFFD $p"
+	tst_res TINFO "different VNI shall not work together"
+	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFD $2"
 	virt_minimize_timeout
 	virt_compare_netperf "fail"
 	virt_cleanup_rmt
-done
+}
 
-tst_exit
+tst_run
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 9/9] net/virt: Introduce macsec_lib.sh to reduce duplicity
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
                   ` (7 preceding siblings ...)
  2018-07-03  7:42 ` [LTP] [PATCH v3 8/9] net/{stress, virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using them Petr Vorel
@ 2018-07-03  7:42 ` Petr Vorel
  2018-07-04 15:56 ` [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-03  7:42 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/virt/macsec01.sh   | 27 +-------------
 testcases/network/virt/macsec02.sh   | 28 +-------------
 testcases/network/virt/macsec_lib.sh | 55 ++++++++++++++++++++++++++++
 testcases/network/virt/virt_lib.sh   | 27 --------------
 4 files changed, 58 insertions(+), 79 deletions(-)
 create mode 100755 testcases/network/virt/macsec_lib.sh

diff --git a/testcases/network/virt/macsec01.sh b/testcases/network/virt/macsec01.sh
index 725d469e7..d9d6e73a6 100755
--- a/testcases/network/virt/macsec01.sh
+++ b/testcases/network/virt/macsec01.sh
@@ -8,33 +8,8 @@
 # with default MACsec configuration, compare performance with similar
 # IPsec configuration on master interface.
 
-virt_type="macsec"
-VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100}
-IPSEC_MODE="transport"
 IPSEC_PROTO="ah"
 
-TST_NEEDS_TMPDIR=1
-TST_TESTFUNC=virt_netperf_msg_sizes
-TST_SETUP=do_setup
-TST_CLEANUP=do_cleanup
-. ipsec_lib.sh
-. virt_lib.sh
-
-do_setup()
-{
-	ipsec_lib_setup
-
-	tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
-	tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
-	tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
-
-	virt_macsec_setup
-}
-
-do_cleanup()
-{
-	virt_cleanup
-	tst_ipsec_cleanup
-}
+. macsec_lib.sh
 
 tst_run
diff --git a/testcases/network/virt/macsec02.sh b/testcases/network/virt/macsec02.sh
index 575b5c4e0..0c40b25a1 100755
--- a/testcases/network/virt/macsec02.sh
+++ b/testcases/network/virt/macsec02.sh
@@ -8,34 +8,10 @@
 # with enabled frame encryption and replay protection, compare
 # performance with similar IPsec configuration on master interface.
 
-virt_type="macsec"
-VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100}
-IPSEC_MODE="transport"
 IPSEC_PROTO="esp_aead"
 EALGO="aes"
+MACSEC_LIB_SETUP="replay on window 300 encrypt on protect on"
 
-TST_NEEDS_TMPDIR=1
-TST_TESTFUNC=virt_netperf_msg_sizes
-TST_SETUP=do_setup
-TST_CLEANUP=do_cleanup
-. ipsec_lib.sh
-. virt_lib.sh
-
-do_setup()
-{
-	ipsec_lib_setup
-
-	tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
-	tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
-	tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
-
-	virt_macsec_setup "replay on window 300 encrypt on protect on"
-}
-
-do_cleanup()
-{
-	virt_cleanup
-	tst_ipsec_cleanup
-}
+. macsec_lib.sh
 
 tst_run
diff --git a/testcases/network/virt/macsec_lib.sh b/testcases/network/virt/macsec_lib.sh
new file mode 100755
index 000000000..9b21af7d6
--- /dev/null
+++ b/testcases/network/virt/macsec_lib.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
+# Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved.
+# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
+
+virt_type="macsec"
+VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100}
+IPSEC_MODE="transport"
+
+TST_NEEDS_TMPDIR=1
+TST_TESTFUNC=virt_netperf_msg_sizes
+TST_SETUP=macsec_lib_setup
+TST_CLEANUP=macsec_lib_cleanup
+. ipsec_lib.sh
+. virt_lib.sh
+
+# MACSEC_LIB_SETUP:
+# [ cipher { default | gcm-aes-128 } ] [ encrypt { on | off } ]
+# [ protect { on | off } ] [ replay { on | off } ] [ window WINDOW ]
+# [ validate { strict | check | disabled } ]
+macsec_lib_setup()
+{
+	local keyid0="01"
+	local keyid1="02"
+	local sa=0
+	local h0=$(tst_hwaddr)
+	local h1=$(tst_hwaddr rhost)
+	local cmd="ip macsec add ltp_v0"
+	local key0="01234567890123456789012345678901"
+	local key1="98765432109876543210987612343434"
+
+	ipsec_lib_setup
+
+	tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
+	tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost)
+	tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr)
+
+	virt_setup "icvlen 16 encodingsa $sa $MACSEC_LIB_SETUP"
+
+	ROD $cmd tx sa $sa pn 100 on key $keyid0 $key0
+	ROD $cmd rx address $h1 port 1
+	ROD $cmd rx address $h1 port 1 sa $sa pn 100 on key $keyid1 $key1
+
+	tst_rhost_run -s -c "$cmd tx sa $sa pn 100 on key $keyid1 $key1"
+	tst_rhost_run -s -c "$cmd rx address $h0 port 1"
+	tst_rhost_run -s -c \
+		"$cmd rx address $h0 port 1 sa $sa pn 100 on key $keyid0 $key0"
+}
+
+macsec_lib_cleanup()
+{
+	virt_cleanup
+	tst_ipsec_cleanup
+}
diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
index c40747ac4..e4b24822f 100644
--- a/testcases/network/virt/virt_lib.sh
+++ b/testcases/network/virt/virt_lib.sh
@@ -320,33 +320,6 @@ virt_check_cmd()
 	return 0
 }
 
-# virt_macsec_setup [OPTIONS]
-# OPTIONS - [ cipher { default | gcm-aes-128 } ] [ encrypt { on | off } ]
-#           [ protect { on | off } ] [ replay { on | off } ] [ window WINDOW ]
-#           [ validate { strict | check | disabled } ]
-virt_macsec_setup()
-{
-	local keyid0=01
-	local keyid1=02
-	local sa=0
-	local h0=$(tst_hwaddr)
-	local h1=$(tst_hwaddr rhost)
-	local cmd="ip macsec add ltp_v0"
-	local key0="01234567890123456789012345678901"
-	local key1="98765432109876543210987612343434"
-
-	virt_setup "icvlen 16 encodingsa $sa $@"
-
-	ROD $cmd tx sa $sa pn 100 on key $keyid0 $key0
-	ROD $cmd rx address $h1 port 1
-	ROD $cmd rx address $h1 port 1 sa $sa pn 100 on key $keyid1 $key1
-
-	tst_rhost_run -s -c "$cmd tx sa $sa pn 100 on key $keyid1 $key1"
-	tst_rhost_run -s -c "$cmd rx address $h0 port 1"
-	tst_rhost_run -s -c \
-		"$cmd rx address $h0 port 1 sa $sa pn 100 on key $keyid0 $key0"
-}
-
 virt_netperf_msg_sizes()
 {
 	local sizes="100 1000 2000 10000"
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API
  2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
                   ` (8 preceding siblings ...)
  2018-07-03  7:42 ` [LTP] [PATCH v3 9/9] net/virt: Introduce macsec_lib.sh to reduce duplicity Petr Vorel
@ 2018-07-04 15:56 ` Petr Vorel
  9 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2018-07-04 15:56 UTC (permalink / raw)
  To: ltp

Hi Alexey,

> I addressed issues noted by Alexey
> changes v2->v3:
> * tst_net.sh: Added TST_LIB_NET_LOADED and simplify that commit.
> * tst_net.sh: changes in tst_net.sh split into 2 commits (TST_LIB_NET_LOADED related
> one and "Harden library against deadlocks")
> * macsec_lib.sh: Move code from virt_macsec_setup to macsec_lib_setup
> * virt_lib.sh: Remove unused client_requests=20000

> @cyril: tst_test.sh: We use TST_LIB_NET_LOADED (3/8), but I kept TST_LIB_LOADED
> (2/8) as I think it's an improvement, even not used yet.

> Petr Vorel (9):

Pushed whole patchset, I added your Reviewed-by as you did in previous
versions and suggested all the changes.
Thanks a lot!

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3 8/9] net/{stress, virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using them
  2018-07-03  7:42 ` [LTP] [PATCH v3 8/9] net/{stress, virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using them Petr Vorel
@ 2018-07-04 17:19   ` Alexey Kodanev
  0 siblings, 0 replies; 12+ messages in thread
From: Alexey Kodanev @ 2018-07-04 17:19 UTC (permalink / raw)
  To: ltp

On 03.07.2018 10:42, Petr Vorel wrote:
> It was needed to migrate it all in once, as macsec0{1,2}.sh tests are
> using both libraries.
> 
> This includes:
> * Create setup, getopts and helper function for both libraries.
> * Using TST_TEST_DATA and TST_TEST_DATA_IFS in many test cases
> (simplify tests and allow to have more TST_CNT to keep readability of
> output + required by udp_ipsec.sh and udp_ipsec_vti.sh otherwise it'd
> need to use getopts to determine type of udp, as passing parameter to
> tst_run is not not recommended to new API).
> * Put code into TST_TESTFUNC functions.
> * Move anything based on TST_IPV6 to TST_SETUP setup functions (as
> TST_IPV6 is not set until setup)
> 
> Other changes:
> * udp_ipsec{,_vti}.sh: were calling do_test() twice, with parameter.
> Now they use correctly TST_CNT and no params.
> Order of running tests changed. Before first were run udp tests for all
> items in $IPSEC_SIZE_ARRAY, then all udp_lite tests. Now for each item
> in $IPSEC_SIZE_ARRAY both udp and udp_lite tests are run.
> * gre01.sh: Move back device type setting (changed in 57738337a
> "network/gre01: fix device type setting").
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
...
> -TCID=geneve01
> -TST_TOTAL=1
>  TST_NEEDS_TMPDIR=1
>  TST_OPTS="hi:d:"

Do we need "hi:" options with the new lib? The same in the vxlan tests...

>  TST_PARSE_ARGS=virt_lib_parse_args
> @@ -16,26 +15,29 @@ start_id=16700000
>  # that is why using here 'vxlan_*' library functions.
>  vxlan_dst_addr="uni"
>  
...
> diff --git a/testcases/network/virt/virt_lib.sh b/testcases/network/virt/virt_lib.sh
> index 66f10bd41..c40747ac4 100644
> --- a/testcases/network/virt/virt_lib.sh
> +++ b/testcases/network/virt/virt_lib.sh
> @@ -1,5 +1,6 @@
>  #!/bin/sh
>  # SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
>  # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved.
>  # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
>  #
> @@ -15,30 +16,52 @@
>  #          them in cleanup function. See "start_vni" variable which can
>  #          solve it.
>  
> +TST_SETUP="${TST_SETUP:-virt_lib_setup}"
> +TST_CLEANUP="${TST_CLEANUP:-cleanup_vifaces}"
> +trap "tst_brk TBROK 'test interrupted'" INT

"trap..." also included in the new lib.

The rest looks good.

Thanks,
Alexey

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-04 17:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03  7:42 [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 1/9] net/ipsec: Improve log info messages Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 2/9] tst_test.sh: Introduce TST_LIB_LOADED Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 3/9] tst_net.sh: Introduce TST_LIB_NET_LOADED Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 4/9] tst_net.sh: Harden library against deadlocks Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 5/9] net/ipsec: Use ':' as array separator for -s parameter Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 6/9] net/{stress, virt}: Use SPDX-License-Identifier GPL-2.0-or-later Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 7/9] net/virt_lib.sh: Remove possibility to pass custom sizes to virt_netperf_msg_sizes() Petr Vorel
2018-07-03  7:42 ` [LTP] [PATCH v3 8/9] net/{stress, virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using them Petr Vorel
2018-07-04 17:19   ` Alexey Kodanev
2018-07-03  7:42 ` [LTP] [PATCH v3 9/9] net/virt: Introduce macsec_lib.sh to reduce duplicity Petr Vorel
2018-07-04 15:56 ` [LTP] [PATCH v3 0/9] Migrate tests using virt_lib.sh and ipsec_lib.sh to new API Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.