From owner-freebsd-current@freebsd.org Thu Sep 13 22:44:17 2018 Return-Path: Delivered-To: freebsd-current@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 74F1B109C9BA for ; Thu, 13 Sep 2018 22:44:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 150D689D9E for ; Thu, 13 Sep 2018 22:44:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id CD6A4109C9B9; Thu, 13 Sep 2018 22:44:16 +0000 (UTC) Delivered-To: current@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 BA4D1109C9B8 for ; Thu, 13 Sep 2018 22:44:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D1EC89D9A; Thu, 13 Sep 2018 22:44:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id C1BD910A87D; Thu, 13 Sep 2018 18:44:14 -0400 (EDT) Subject: Re: Speed problems with both system openssl and security/openssl-devel To: Lev Serebryakov , Kevin Oberman References: <43892083.20180913024646@serebryakov.spb.ru> <7316152.20180913112742@serebryakov.spb.ru> Cc: current , brnrd@freebsd.org, Jung-uk Kim From: John Baldwin Message-ID: <73a0934b-136f-785e-57bc-1f5624eea4fa@FreeBSD.org> Date: Thu, 13 Sep 2018 15:44:13 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <7316152.20180913112742@serebryakov.spb.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 13 Sep 2018 18:44:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2018 22:44:17 -0000 On 9/13/18 1:27 AM, Lev Serebryakov wrote: > Hello Kevin, > > Thursday, September 13, 2018, 6:32:30 AM, you wrote: > > >> This is probably not the issue, but aesni is not in the GENERIC kernel.  Are you sure aesni.ko is loaded? >> % kldstat | grep aesni > I'm not using modules, as it is NanoBSD image build for minimal size ant > maximal efficiency. But I have aesni in my kernel config for sure: > > % grep aesni ~/nanobsd/gatevay.v3/J3160 > device aesni >From my understanding of the OpenSSL code, it doesn't use the kernel driver at all (the kernel driver is only needed for in-kernel crypto such as IPSec or GELI). AESNI are just instructions that can be used in userland, and OpenSSL's AESNI acceleration is purely different routines in userland. I would verify if AESNI shows up in the CPU features in dmesg first (if it doesn't I'd check for a BIOS option disabling it). -- John Baldwin