Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp961614ybl; Thu, 12 Dec 2019 07:36:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwtsE9SqBOshQyGfHVwIlwdzV8EC54P8u6GD3GBhVyYstLBKF0dCNFWCEeaKWHGSntW5vmi X-Received: by 2002:aca:4cc7:: with SMTP id z190mr5584770oia.10.1576164971355; Thu, 12 Dec 2019 07:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576164971; cv=none; d=google.com; s=arc-20160816; b=N2FA2Fx0QzO6Q6mB8PjwSK4+mf5aHLcWca9fL+mCYLH0N9YCnb2DGqx345uXKcRl0O fZ2uI/vKj3BXoDJpVrQuiTchwCECXwyNSYxDZ8m2+IizXYYu88UrGITXZ7NQTd6jjxY7 bWxdMKHFdaGCokWUdWcy3eBKe1K0sNHMkQjRW7dI7yV26qkh2AYeZRDMZReHUEZ7/C6e RwTwIecFzuv6d5qjdLSWtJwNzWg9/w4dpiUcTYS8W/PhAiQVxCNOs9cm+9rD+UZ5jDie J+GYqfUx67jCICWu/LEejDJiZirJHpV1kJuNavHV3O0TW62JnsYt8Sv+SFccwDYlA7ig 4l7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=ciwp1Htl9ZV50q0rhvJrhpAGyqqW5LCkUqoLtMGaX6Q=; b=VcPJ4hzetz+vBsRxAoQq2X3B2gTdJ9QqY48PFxQg2QQVHoWHvsTg3Fv4R8rVz2Rmb9 VfDpqZEWzZxkUDQMtBr7e0rwJsonGgz87D6PdEGzDOC6q93nP/dsCXATeZgX6FLhFAvS oPtJ1ekxo/NOYFV0KwKFQuHzaB3E7KdS7yEUFAEbEdxCRCaAIcqyD1tQOmgjK0Hw9yzn bJP8MUNE92lLfkobIeioNeWd5GUoNau7qXb9I0cao0FzMKrJfq/RXdjJwyLHvvnzLHIo 8fdt9SkgZf1JbO8mMgQRcOiv01cvol15CEesDGThkQiFs+0M+rELUrfK5bYvbhY1Z7Ec W8xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k130si3034197oih.135.2019.12.12.07.35.59; Thu, 12 Dec 2019 07:36:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729260AbfLLPeg (ORCPT + 99 others); Thu, 12 Dec 2019 10:34:36 -0500 Received: from sitav-80046.hsr.ch ([152.96.80.46]:54412 "EHLO mail.strongswan.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729013AbfLLPeg (ORCPT ); Thu, 12 Dec 2019 10:34:36 -0500 Received: from obook.fritz.box (unknown [IPv6:2a01:2a8:8500:5c01:6946:d015:47d4:9c3d]) by mail.strongswan.org (Postfix) with ESMTPSA id CCF5B401A2; Thu, 12 Dec 2019 16:34:34 +0100 (CET) Message-ID: Subject: Re: [PATCH crypto-next v2 2/3] crypto: x86_64/poly1305 - add faster implementations From: Martin Willi To: "Jason A. Donenfeld" , linux-crypto@vger.kernel.org, ebiggers@kernel.org Cc: Samuel Neves , Andy Polyakov Date: Thu, 12 Dec 2019 16:34:34 +0100 In-Reply-To: <20191212093008.217086-2-Jason@zx2c4.com> References: <20191211170936.385572-1-Jason@zx2c4.com> <20191212093008.217086-1-Jason@zx2c4.com> <20191212093008.217086-2-Jason@zx2c4.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org > These x86_64 vectorized implementations are based on Andy Polyakov's > implementation, and support AVX, AVX-2, and AVX512F. The AVX-512F > implementation is disabled on Skylake, due to throttling, but it is > quite fast on >= Cannonlake. > arch/x86/crypto/poly1305-avx2-x86_64.S | 390 --- > arch/x86/crypto/poly1305-sse2-x86_64.S | 590 ---- > arch/x86/crypto/poly1305-x86_64.pl | 4266 ++++++++++++++++++++++++ As the author of the removed code, I'm certainly biased, so I won't hinder the adaption of the new code. Nonetheless some final remarks from my side: * It removes the existing SSE2 code path. Most likely not that much of an issue due to the new AVX variant. * I certainly would favor gradual improvement, and I think the code would allow it. But as said, not my pick. * Those 4000+ lines perl/asm are a lot and a hard review; I won't find time and motivation to do it. ;-) Thanks! Martin