From owner-freebsd-current@freebsd.org Mon Sep 17 08:31:51 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 A01291095F88 for ; Mon, 17 Sep 2018 08:31:51 +0000 (UTC) (envelope-from dnebdal@gmail.com) 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 397BE73445 for ; Mon, 17 Sep 2018 08:31:51 +0000 (UTC) (envelope-from dnebdal@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id F2D4D1095F87; Mon, 17 Sep 2018 08:31:50 +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 D0D051095F83 for ; Mon, 17 Sep 2018 08:31:50 +0000 (UTC) (envelope-from dnebdal@gmail.com) Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37E2B73437; Mon, 17 Sep 2018 08:31:50 +0000 (UTC) (envelope-from dnebdal@gmail.com) Received: by mail-yb1-xb44.google.com with SMTP id o63-v6so1727973yba.2; Mon, 17 Sep 2018 01:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=01fp3VNrg8y6AwTkr84OIUCzELGxWV7hqSAr6E2wcz4=; b=VKMGdErM4TbZqKwP8qnBFLwoqB0ForzhU7V7xlyFaxVCI7v3+GLwkxhL77Xy3MUSWt V/Mlp1c27jw0xmqVzOpG4rk8b//wXoScCQtpUQWQTn8WmW+7vRsBDhbRXId4sk7OCYhB fn11i2dsqOOXqcMibbR1civOFM217mPwlAXy9DoJ0HtSSBQwxr9f0Yft2Y7YGjUA1NUs PMdOSsbelq54Zp8CBZ+ofSZhSW8Ez5gbJf96chsPdGqT3zhY2LjC/9kjwBiiqjDk1TnW eilLVe2r1W2JgnOBpWxYfOYdc4Fu+RJmeCfil4izvFOmWdgpiAiCLvbhxYPTalpk+4z5 Rk0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=01fp3VNrg8y6AwTkr84OIUCzELGxWV7hqSAr6E2wcz4=; b=V2Egj5iSHYiujdIITqC0b4KTA7hqnr+fmxsJYvxn1Nkg7wowcdFdUy0H++ZUW/VJA5 7kKl5kOrW09x2qAPumsS6wJJHnzyds5si3ar5ncDp9YD4VOQS8H2jRw3s88DjdBQOSy2 L+UhUxeMmTvkbtfVIiC2oBGCVKRKkJ1kIGQmYNBfZiWl9L4xqmy/lPtKGwnkuS20KXWI daBzwVbvuflkhn3TO050IBL59M6r60hPsdpgOsyX/bG+TpBIVWH4XLoiUTyzIwIdneS1 +cbZ8z/tOXpQ3aNadiVedh0xKFhFFxaHVgzaWsLZA+OBCvBa7Ob2qd2RXgNJkBjoUHo2 MF5A== X-Gm-Message-State: APzg51DqN1cd8Ao39pR+yeyyC7qxNTZx/PnX+bPcDI9ECsk3/k1x/vKj N/bEbtAUbjHlf+pzLAQgXRHRGUm7OuhTIW2tfL4snQ== X-Google-Smtp-Source: ANB0VdZGCRRnEqY13jT9I7GBSfdkxKywaNzowHt2/lG23WLaPJpnbNjTYxC1PcFswZbJtslkAIXTz0JseuRfjgHd2zg= X-Received: by 2002:a5b:44b:: with SMTP id s11-v6mr9570589ybp.505.1537173109435; Mon, 17 Sep 2018 01:31:49 -0700 (PDT) MIME-Version: 1.0 References: <43892083.20180913024646@serebryakov.spb.ru> <7316152.20180913112742@serebryakov.spb.ru> <73a0934b-136f-785e-57bc-1f5624eea4fa@FreeBSD.org> <594107633.20180914031133@serebryakov.spb.ru> In-Reply-To: <594107633.20180914031133@serebryakov.spb.ru> From: Daniel Nebdal Date: Mon, 17 Sep 2018 09:40:13 +0200 Message-ID: Subject: Re: Speed problems with both system openssl and security/openssl-devel To: lev@freebsd.org Cc: John Baldwin , Kevin Oberman , current@freebsd.org, brnrd@freebsd.org, jkim@freebsd.org Content-Type: text/plain; charset="UTF-8" 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: Mon, 17 Sep 2018 08:31:52 -0000 On Fri, 14 Sep 2018 at 02:12, Lev Serebryakov wrote: > > Hello John, > > Friday, September 14, 2018, 1:44:13 AM, you wrote: > > >> % 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). > It is my understanding too. > > > 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). > It is enabled. It is used for sure by openssl 1.1.0 on Linux and bu openssl 1.1.1 > on FreeBSD, but not by openssl 1.0.2 and 1.1.0 on FreeBSD. Problem is, > openssl 1.1.1 is not used by anything on FreeBSD (yet) and almost > everything uses system (1.0.2) and only some other ports could use 1.1.0 > from ports. > > -- > Best regards, > Lev mailto:lev@FreeBSD.org > Could it be relevant that the Debian binary was probably compiled with gcc, and the FreeBSD binary with clang? This seems like the sort of code that plausibly could bring out some compiler corner cases. (It's weird that 1.1.1 is fine, though.) -- Daniel Nebdal