Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working hw crypto with snapshot openwrt #19

Open
proffust opened this issue Apr 28, 2022 · 2 comments
Open

not working hw crypto with snapshot openwrt #19

proffust opened this issue Apr 28, 2022 · 2 comments

Comments

@proffust
Copy link

proffust commented Apr 28, 2022

Hello.
I build snapshot release openwrt and no acceleration crypto. iperf show me 50mbit/s with encryption and 130 without. connection l2tp with ipsec

root@OpenWrt:~# dmesg | grep eip
[    1.470845] mtk-eip93 1e004000.crypto: EIP93 Crypto Engine Initialized.
root@OpenWrt:~#  swanctl -l
myvpn: #1, ESTABLISHED, IKEv1, b9f11af4286b6b7b_i* 8f8e92f4d7df4da3_r
  local  '10.43.8.34' @ 10.43.8.34[4500]
  remote '80.82.49.19' @ 80.82.49.19[4500]
  AES_CBC-256/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048
  established 631s ago, rekeying in 12460s
  myvpn: #1, reqid 1, INSTALLED, TRANSPORT-in-UDP, ESP:AES_CBC-256/HMAC_SHA2_256_128/MODP_2048
    installed 631s ago, rekeying in 2685s, expires in 3330s
    in  c0db5e29, 3435588 bytes, 37613 packets,     5s ago
    out 08c19687, 104779986 bytes, 72168 packets,    15s ago
    local  10.43.8.34/32[0/l2f]
    remote 80.82.49.19/32
root@OpenWrt:~# iperf3 -c 2001:470:78b9:6666:e65f:1ff:fe44:457
Connecting to host 2001:470:78b9:6666:e65f:1ff:fe44:457, port 5201
[  5] local 2001:470:78b9:13::1 port 47700 connected to 2001:470:78b9:6666:e65f:1ff:fe44:457 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  6.07 MBytes  50.9 Mbits/sec    0    140 KBytes       
[  5]   1.00-2.00   sec  6.25 MBytes  52.5 Mbits/sec    0    148 KBytes       
[  5]   2.00-3.00   sec  6.01 MBytes  50.4 Mbits/sec    0    156 KBytes       
[  5]   3.00-4.00   sec  6.19 MBytes  51.9 Mbits/sec    0    158 KBytes       
[  5]   4.00-5.00   sec  6.01 MBytes  50.4 Mbits/sec    0    174 KBytes       
[  5]   5.00-6.02   sec  5.84 MBytes  48.2 Mbits/sec    0    198 KBytes       
[  5]   6.02-7.00   sec  6.81 MBytes  58.1 Mbits/sec    0    198 KBytes       
[  5]   7.00-8.00   sec  6.68 MBytes  56.1 Mbits/sec    0    198 KBytes       
[  5]   8.00-9.00   sec  6.38 MBytes  53.5 Mbits/sec    0    198 KBytes       
[  5]   9.00-10.00  sec  6.50 MBytes  54.5 Mbits/sec    0    198 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  62.7 MBytes  52.6 Mbits/sec    0             sender
[  5]   0.00-10.01  sec  62.3 MBytes  52.2 Mbits/sec                  receiver

terminate ipsec

iperf Done.
root@OpenWrt:~# swanctl --terminate --child myvpn
[IKE] closing CHILD_SA myvpn{1} with SPIs c0db5e29_i (5709511 bytes) 08c19687_o (174454475 bytes) and TS 10.43.8.34/32[0/l2f] === 80.82.49.19/32
terminate completed successfully

root@OpenWrt:~# iperf3 -c 2001:470:78b9:6666:e65f:1ff:fe44:457
Connecting to host 2001:470:78b9:6666:e65f:1ff:fe44:457, port 5201
[  5] local 2001:470:78b9:13::1 port 47706 connected to 2001:470:78b9:6666:e65f:1ff:fe44:457 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.02   sec  16.5 MBytes   136 Mbits/sec    0    236 KBytes       
[  5]   1.02-2.03   sec  17.5 MBytes   145 Mbits/sec    0    238 KBytes       
[  5]   2.03-3.02   sec  15.0 MBytes   126 Mbits/sec    0    252 KBytes       
[  5]   3.02-4.04   sec  17.5 MBytes   145 Mbits/sec    0    252 KBytes       
[  5]   4.04-5.04   sec  16.8 MBytes   140 Mbits/sec    0    362 KBytes       
[  5]   5.04-6.03   sec  13.8 MBytes   117 Mbits/sec    0    378 KBytes       
[  5]   6.03-7.00   sec  17.5 MBytes   150 Mbits/sec    0    378 KBytes       
[  5]   7.00-8.06   sec  18.8 MBytes   149 Mbits/sec    0    378 KBytes       
[  5]   8.06-9.04   sec  15.0 MBytes   128 Mbits/sec    0    378 KBytes       
[  5]   9.04-10.01  sec  17.5 MBytes   152 Mbits/sec    0    574 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec   166 MBytes   139 Mbits/sec    0             sender
[  5]   0.00-10.01  sec   165 MBytes   138 Mbits/sec                  receiver

iperf Done.
root@OpenWrt:~# uname -a
Linux OpenWrt 5.10.112 #0 SMP Sun Apr 24 21:09:51 2022 mips GNU/Linux
@proffust
Copy link
Author

compilation from final branch, according to instructions "add the 999-patch to the OpenWrt /target/linux/ramips/patch-5.10 folder and the crypto/mtk-eip93 folder to the /target/linux/files/drivers folder"

@rdslw
Copy link

rdslw commented Apr 29, 2022

I confirm that building openwrt 21.02 with these patches, significantly improves FDE (cryptsetup) benchmarks. I did a custom build.
Intuition tells me, that without specific CFG, vpn traffic, due to small sizes of packets will not gain from it, or even will lose (worse performance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants