Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2018 11:32:53 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        "David P. Discher" <dpd@dpdtech.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Is if_ipsec/ipsec - AESNI accelerated ?
Message-ID:  <e9da62df-90e4-e45b-b073-c4c39555b38d@yandex.ru>
In-Reply-To: <62E0C365-AD64-4383-8BA4-298AA0E292F4@dpdtech.com>
References:  <D47976AF-A0AF-4A58-B80E-31E9DED96D26@dpdtech.com> <dc8bea35-1770-48d0-3662-c58e72bd3d2d@yandex.ru> <62E0C365-AD64-4383-8BA4-298AA0E292F4@dpdtech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--AC2Ythfwcqfo4xb2mMEWBSX15yuL2L1MH
Content-Type: multipart/mixed; boundary="ngDeMMSE6YiFsycvmzibrGoe6MYJJ1phg";
 protected-headers="v1"
From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: "David P. Discher" <dpd@dpdtech.com>
Cc: freebsd-net@freebsd.org
Message-ID: <e9da62df-90e4-e45b-b073-c4c39555b38d@yandex.ru>
Subject: Re: Is if_ipsec/ipsec - AESNI accelerated ?
References: <D47976AF-A0AF-4A58-B80E-31E9DED96D26@dpdtech.com>
 <dc8bea35-1770-48d0-3662-c58e72bd3d2d@yandex.ru>
 <62E0C365-AD64-4383-8BA4-298AA0E292F4@dpdtech.com>
In-Reply-To: <62E0C365-AD64-4383-8BA4-298AA0E292F4@dpdtech.com>

--ngDeMMSE6YiFsycvmzibrGoe6MYJJ1phg
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 09.08.2018 10:00, David P. Discher wrote:
> 	[ pts/0 sjc2 util201:~ ]
> 	[ dpd ] > iperf3 -c 10.245.0.202 -i 8 -t 16
> 	Connecting to host 10.245.0.202, port 5201
> 	[  5] local 10.245.0.201 port 55165 connected to 10.245.0.202 port 520=
1
> 	[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
> 	[  5]   0.00-8.00   sec   887 MBytes   930 Mbits/sec    0    419 KByte=
s
> 	[  5]   8.00-16.00  sec   898 MBytes   941 Mbits/sec    0    419 KByte=
s
> 	- - - - - - - - - - - - - - - - - - - - - - - - -
> 	[ ID] Interval           Transfer     Bitrate         Retr
> 	[  5]   0.00-16.00  sec  1.74 GBytes   936 Mbits/sec    0             =
sender
> 	[  5]   0.00-16.01  sec  1.74 GBytes   935 Mbits/sec                  =
receiver
>=20
> 	iperf Done.
>=20
> 	[ pts/0 sjc2 util201:~ ]
> 	[ dpd ] > iperf3 -c 172.30.1.14 -i 8 -t 16
> 	Connecting to host 172.30.1.14, port 5201
> 	[  5] local 172.30.1.13 port 41671 connected to 172.30.1.14 port 5201
> 	[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
> 	[  5]   0.00-8.00   sec   166 MBytes   174 Mbits/sec    0   64.3 KByte=
s
> 	[  5]   8.00-16.00  sec   168 MBytes   176 Mbits/sec    0   64.3 KByte=
s
> 	- - - - - - - - - - - - - - - - - - - - - - - - -
> 	[ ID] Interval           Transfer     Bitrate         Retr
> 	[  5]   0.00-16.00  sec   334 MBytes   175 Mbits/sec    0             =
sender
> 	[  5]   0.00-16.01  sec   334 MBytes   175 Mbits/sec                  =
receiver
I did some tests and here are my results:

# ifconfig ipsec0
ipsec0: flags=3D8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1400
	tunnel inet 10.0.0.15 --> 10.0.0.25
	inet 192.168.0.15 --> 192.168.0.25 netmask 0xffffff00
	inet6 fe80::225:90ff:fef9:3c92%ipsec0 prefixlen 64 scopeid 0x8
	nd6 options=3D23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
	reqid: 16385
	groups: ipsec

# iperf -c 10.0.0.25 -i 8 -t 16
------------------------------------------------------------
Client connecting to 10.0.0.25, TCP port 5001
TCP window size: 35.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.15 port 21371 connected with 10.0.0.25 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 8.0 sec  9.09 GBytes  9.77 Gbits/sec
[  3]  8.0-16.0 sec  9.22 GBytes  9.90 Gbits/sec
[  3]  0.0-16.0 sec  18.3 GBytes  9.83 Gbits/sec

# iperf -c 192.168.0.25 -i 8 -t 16
------------------------------------------------------------
Client connecting to 192.168.0.25, TCP port 5001
TCP window size: 33.2 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.15 port 30394 connected with 192.168.0.25 port 5001=

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 8.0 sec   607 MBytes   636 Mbits/sec
[  3]  8.0-16.0 sec   606 MBytes   636 Mbits/sec
[  3]  0.0-16.0 sec  1.19 GBytes   636 Mbits/sec


# sysctl net.inet.ipsec.async_crypto=3D1
net.inet.ipsec.async_crypto: 0 -> 1

# iperf -c 192.168.0.25 -i 8 -t 16
------------------------------------------------------------
Client connecting to 192.168.0.25, TCP port 5001
TCP window size: 33.2 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.15 port 17716 connected with 192.168.0.25 port 5001=

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 8.0 sec  1.38 GBytes  1.48 Gbits/sec
[  3]  8.0-16.0 sec  1.40 GBytes  1.51 Gbits/sec
[  3]  0.0-16.0 sec  2.78 GBytes  1.50 Gbits/sec


# kldload aesni
# setkey -DF
# setkey -c
add 10.0.0.25 10.0.0.15 esp 10000 -m tunnel -u 16385 -E rijndael-cbc
"0123456789123456";
add 10.0.0.15 10.0.0.25 esp 20000 -m tunnel -u 16385 -E rijndael-cbc
"0123456789123456";

# sysctl net.inet.ipsec.async_crypto=3D0
net.inet.ipsec.async_crypto: 1 -> 0

# iperf -c 192.168.0.25 -i 8 -t 16
------------------------------------------------------------
Client connecting to 192.168.0.25, TCP port 5001
TCP window size: 33.2 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.15 port 57206 connected with 192.168.0.25 port 5001=

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 8.0 sec  1.08 GBytes  1.16 Gbits/sec
[  3]  8.0-16.0 sec  1.11 GBytes  1.19 Gbits/sec
[  3]  0.0-16.0 sec  2.19 GBytes  1.18 Gbits/sec

# sysctl net.inet.ipsec.async_crypto=3D1
net.inet.ipsec.async_crypto: 0 -> 1

# ifconfig ipsec0 mtu 8000 down up

# iperf -c 192.168.0.25 -i 8 -t 16
------------------------------------------------------------
Client connecting to 192.168.0.25, TCP port 5001
TCP window size: 38.9 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.15 port 37641 connected with 192.168.0.25 port 5001=

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 8.0 sec  5.64 GBytes  6.06 Gbits/sec
[  3]  8.0-16.0 sec  5.76 GBytes  6.19 Gbits/sec
[  3]  0.0-16.0 sec  11.4 GBytes  6.12 Gbits/sec


--=20
WBR, Andrey V. Elsukov


--ngDeMMSE6YiFsycvmzibrGoe6MYJJ1phg--

--AC2Ythfwcqfo4xb2mMEWBSX15yuL2L1MH
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAltr/DUACgkQAcXqBBDI
oXq4XggAi1Ps7fy/d/HQddhE78gYYey/BQelz+9cu/pfI/Fy3P7sR3K+4du0n+A3
ZqeFXca2mtXSSxkClmmEDwl6YhVO73mQmLVz/c+7y1yhmZBTujE+gu0T/y3pLGgA
aDUNoSeUJ4SIVAb813AhzNPUxNtoqj+Ke0xD3AmgVKi1L0RJFy4BVcZ92YYPcLTG
VHrWsF2XQIe6XsOBeYnI0ttM5G+5jgPISUAxkV5ks9sYVByyxB9vGIyR11XiH0Rz
ERRRTrRdf1qHvEE2cd+OW738aO2DD4sHRMOGz/6ekhbY7kScXMKr2UCtSeH8M0r8
MJEa0IimO1AUnwk64x8/GT3jPSxIIw==
=biPU
-----END PGP SIGNATURE-----

--AC2Ythfwcqfo4xb2mMEWBSX15yuL2L1MH--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e9da62df-90e4-e45b-b073-c4c39555b38d>