Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3229438ybn; Fri, 27 Sep 2019 03:12:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaVV+WFsAhQL70/U+2opPIwfB7WucMxRASgrKXaKsSiZZ32rGlyoG21InUYMHRsakpia3x X-Received: by 2002:aa7:d698:: with SMTP id d24mr3599701edr.32.1569579147455; Fri, 27 Sep 2019 03:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569579147; cv=none; d=google.com; s=arc-20160816; b=eHakSLnRJqA3sf1w+bLb60YeOVsms/Ed+jDHKTsDVqHLw1Pb/8p0bQUKegm8V/nc1K IalCYlTtBWr4bkQwAE2m6NTxZWkG9Mu2eEJ2GuDjavN6WxMgLGhqEE1sIPIFocKKuJqB ybrABzk5CEDb4H1nHKkrsp5wdgUrZjQW1j2pFiaYawhi1uJSglHxrWRo60OKCWVKY8l2 bPIRfo5GhllpXFaxevBcyENPc67D/2tegs50Wk3KoLSW08L8vtqidmauG+llOKwzeBX5 a/9G2kOWxiFnYbXsHGD5ZkELTXYhq2oQpa2rUtlti9O75gldvk/aQjMyPcCpUqXicLhA wE1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BUjqmR9/kA43rqRnAKekDd1tngQiicqJRA2Asb2y5FQ=; b=D7CDE+XzdXpng36E84JPCw9s9YM5uWG4fucFoD3V82SEjLcleaagcGJUEMiD4BEWI1 nThRzLWRdfkomab9ogmQZmRxTxGojtA+wNEEOpe0QvVFUtbZmCdlv+3WZGp/xKuPHciC WtMGHW2zjWzCptEzjbJQ2KS67dkqnQJ71UKcqyfwTatnAR+fBC1LIbYRpsXBzIi1XXmi 6mpANd42bdUk2xTZpDKOMEh/f/9PnZmbzgf0kzDhr34oQyRKYvHCslLgK7fSkDDlV4kJ YOsnotIMW0AruemEDqSSQKa4ADL1D/eRaLYelYX9aB3tHlFodpWz6OhOv44h2ZYB3aju owXw== 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 k63si1273745edc.347.2019.09.27.03.11.57; Fri, 27 Sep 2019 03:12:27 -0700 (PDT) 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 S1725882AbfI0KLy (ORCPT + 99 others); Fri, 27 Sep 2019 06:11:54 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:40790 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbfI0KLy (ORCPT ); Fri, 27 Sep 2019 06:11:54 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1iDnDs-0007V8-NH; Fri, 27 Sep 2019 20:11:37 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 27 Sep 2019 20:11:24 +1000 Date: Fri, 27 Sep 2019 20:11:24 +1000 From: Herbert Xu To: Pascal Van Leeuwen Cc: Linus Torvalds , Ard Biesheuvel , Linux Crypto Mailing List , Linux ARM , David Miller , Greg KH , "Jason A . Donenfeld" , Samuel Neves , Dan Carpenter , Arnd Bergmann , Eric Biggers , Andy Lutomirski , Will Deacon , Marc Zyngier , Catalin Marinas Subject: Re: [RFC PATCH 18/18] net: wireguard - switch to crypto API for packet encryption Message-ID: <20190927101124.GA15588@gondor.apana.org.au> References: <20190925161255.1871-1-ard.biesheuvel@linaro.org> <20190925161255.1871-19-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Sep 27, 2019 at 09:58:14AM +0000, Pascal Van Leeuwen wrote: > > But I can see the appeal of getting a "done" response on the _encrypt()/ > _decrypt() call and then being able to immediately continue processing > the result data and having the async response handling separated off. This is how it works today. If your request can be fulfilled right away, you will get a return value other than EINPROGRESS and you just carry on, the completion callback never happens in this case. aesni-intel makes heavy use of this. In most cases it is sync. It only goes async when the FPU is not available. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt