From owner-freebsd-net@freebsd.org Thu Aug 9 08:33:20 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5829105C4E7 for ; Thu, 9 Aug 2018 08:33:19 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::606]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 555F7871C6 for ; Thu, 9 Aug 2018 08:33:19 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 5B963588384D; Thu, 9 Aug 2018 11:33:16 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ZrqGtXKGd7-XG9qZh3q; Thu, 09 Aug 2018 11:33:16 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1533803596; bh=sFxvMGVSiRjwL3HDNacNUuWl/4PYVBuX4KxvNsDYHmY=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=XuMMAfc6e0EvvxOIzDuAuk4ycyNyeFZX6groqFQj6y77dOkE2Xic8RdliXeXz2FWM in1w883yDpOhSj874MWGson/KF2kLHd5SzrFC7ooAgKqJalI4+7g8dDYYKiED4/jFA q8CiSvylaeXULwGBUaYa+Nkr6Oa8FwtQrzlvcExo= Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id A9ueWv6dmr-XF8ejCRR; Thu, 09 Aug 2018 11:33:15 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1533803595; bh=sFxvMGVSiRjwL3HDNacNUuWl/4PYVBuX4KxvNsDYHmY=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=v0ZuyWioeveO8PsOFvilgIAV02Up4cPPDUsfu9RRgr++Ga570VImtgqhmTvTZ9/oD hhQ85443YpuI7ZobEk7+YP+3cij5U1rgg0P7dq1qUgFnCb4U9EIKBOoLXv0ivN19UB dfczQM6LzXTIcZptwloGUM9Lqkg/v1IXQpLk5Wk4= Authentication-Results: smtp4j.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: Is if_ipsec/ipsec - AESNI accelerated ? To: "David P. Discher" Cc: freebsd-net@freebsd.org References: <62E0C365-AD64-4383-8BA4-298AA0E292F4@dpdtech.com> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= xsBNBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAHNIkFuZHJleSBWLiBFbHN1a292IDxhZUBmcmVlYnNkLm9yZz7CwHsEE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LpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: Date: Thu, 9 Aug 2018 11:32:53 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <62E0C365-AD64-4383-8BA4-298AA0E292F4@dpdtech.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AC2Ythfwcqfo4xb2mMEWBSX15yuL2L1MH" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 08:33:20 -0000 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" To: "David P. Discher" Cc: freebsd-net@freebsd.org Message-ID: Subject: Re: Is if_ipsec/ipsec - AESNI accelerated ? References: <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 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 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--