Skip to content

Commit f7bd83e

Browse files
committed
network/virt: add wireguard02: ipsec vs wireguard
Compare multi-threading performance with IPSec/vti. Signed-off-by: Alexey Kodanev <[email protected]> Reviewed-by: Petr Vorel <[email protected]>
1 parent 4c2704b commit f7bd83e

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

runtest/net.features

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,5 @@ fanout01 fanout01
8181

8282
wireguard01 wireguard01.sh
8383
wireguard01_ipv6 wireguard01.sh -6
84+
wireguard02 wireguard02.sh
85+
wireguard02_ipv6 wireguard02.sh -6

testcases/lib/tst_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ tst_run()
506506
NEEDS_DRIVERS|FS_TYPE|MNTPOINT|MNT_PARAMS);;
507507
IPV6|IPVER|TEST_DATA|TEST_DATA_IFS);;
508508
RETRY_FUNC|RETRY_FN_EXP_BACKOFF|TIMEOUT);;
509-
NET_DATAROOT|NET_MAX_PKT|NET_RHOST_RUN_DEBUG);;
509+
NET_DATAROOT|NET_MAX_PKT|NET_RHOST_RUN_DEBUG|NETLOAD_CLN_NUMBER);;
510510
*) tst_res TWARN "Reserved variable TST_$_tst_i used!";;
511511
esac
512512
done

testcases/network/virt/wireguard02.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/sh
2+
# SPDX-License-Identifier: GPL-2.0-or-later
3+
# Copyright (c) 2020 Oracle and/or its affiliates. All Rights Reserved.
4+
5+
TST_CLEANUP=cleanup
6+
TST_TESTFUNC=test1
7+
TST_SETUP=wireguard_lib_setup
8+
9+
. ipsec_lib.sh
10+
. wireguard_lib.sh
11+
12+
IPSEC_MODE="tunnel"
13+
IPSEC_PROTO="esp_aead"
14+
AEALGO="rfc4106_256"
15+
EALGO="aes"
16+
AALGO="sha256"
17+
18+
cleanup()
19+
{
20+
wireguard_lib_cleanup
21+
tst_ipsec_cleanup
22+
}
23+
24+
test1()
25+
{
26+
local wgaddr
27+
local clients_num="$TST_NETLOAD_CLN_NUMBER"
28+
29+
# Enforce multi-threading test, at least with 10 TCP clients
30+
[ $clients_num -lt 10 ] && clients_num=10
31+
32+
tst_res TINFO "test wireguard"
33+
34+
[ -n "$TST_IPV6" ] && wgaddr="$ip6_virt_remote" || wgaddr="$ip_virt_remote"
35+
tst_netload -H $wgaddr -a $clients_num -D ltp_v0
36+
local time_wg=$(cat tst_netload.res)
37+
wireguard_lib_cleanup
38+
39+
tst_res TINFO "test IPSec $IPSEC_MODE/$IPSEC_PROTO $EALGO"
40+
tst_ipsec_setup_vti
41+
tst_netload -H $ip_rmt_tun -a $clients_num -D $tst_vti
42+
local time_ipsec=$(cat tst_netload.res)
43+
tst_ipsec_cleanup
44+
45+
tst_netload_compare $time_ipsec $time_wg -100
46+
}
47+
48+
tst_run

0 commit comments

Comments
 (0)