Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1049980pxa; Thu, 20 Aug 2020 00:45:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7Q9zOiaa2LmyDY5KvXcv9UTMLb5qje2luDeRfzhYQNwEKjzAfoW4PeoQy9GRJpnz+jFIx X-Received: by 2002:a17:906:f292:: with SMTP id gu18mr1939522ejb.503.1597909507364; Thu, 20 Aug 2020 00:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597909507; cv=none; d=google.com; s=arc-20160816; b=dUGJQ8L5CJi8jSR1z9Sisa2TDsqnClvDz72So3/ZOgSnclYXtsXnkDaroWBVeQkcZS pnN89WDau93IR+0JX6ysiPmicJGwaEJd1FkaouSsvcjN5sek5J4h1xyz8H7jT1qS9dRZ YZfc7NENgrbXZi6vNNMZU9WHe3bmPwNR2DYzB95h5Kf1c79VuHUK/6lJxgY9FXg5aFPU tbM2hI/Gzy5Socg/fXRdZ92mIXaBQQhiEddX/YhBokNKV0EVJrBWHoHwLhJet+ayWVZ1 8bcYH5mhKytgULVcnCGyNcIkFr0CayHtjFRIsR8Sbr+RSkqVZI6zDoktfDuM0fGAxJ5G H25g== 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=tbFaqjGClZgHoIOXWmtISM05wQrKLzt4tmBr1k+dJZg=; b=fw0AXVWKHslx0PvQNn1wBBWrYhBDZbZF1at7/QTOE7Jjo528hTcaIYNWUL1yKOmEKK 1s1FtyYpFA1lsFqqvS5PotHPHQnNoOEaqDcp6u15lG7VwnNXe408fWa0Y10tuk3Dm5vy kmxY68gB8Hj0MV3RWAkqk9GiFNj3X0p6CgMisxq0YPI9o9Vx4ZTE2hdKsJQGrU6/w6yg VPvWYn0OmPSnLnoIQIDResBBiG4GQPx3GutwKAhuZd0Rn+FFrujfeNsGbyWiLzCmYl8l R64KurLKqwz3pSDl04fkl5GMXXw+kXbJTRBSNulAhNp3L13uunFc/BGxij947UB4+xgA xR6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si914873edt.99.2020.08.20.00.44.37; Thu, 20 Aug 2020 00:45:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725906AbgHTHoS (ORCPT + 99 others); Thu, 20 Aug 2020 03:44:18 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:48980 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbgHTHoR (ORCPT ); Thu, 20 Aug 2020 03:44:17 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1k8fF8-0006RC-Up; Thu, 20 Aug 2020 17:44:16 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 20 Aug 2020 17:44:14 +1000 Date: Thu, 20 Aug 2020 17:44:14 +1000 From: Herbert Xu To: Ard Biesheuvel Cc: Ben Greear , Linux Crypto Mailing List , Eric Biggers Subject: Re: [PATCH 0/5] crypto: Implement cmac based on cbc skcipher Message-ID: <20200820074414.GA21848@gondor.apana.org.au> References: <20200818223359.GA27712@gondor.apana.org.au> <8b248ef3-d4c7-43fd-6ae4-1c3381597579@candelatech.com> <20200820070142.GA21343@gondor.apana.org.au> <20200820070645.GA21395@gondor.apana.org.au> <20200820072910.GA21631@gondor.apana.org.au> 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 Thu, Aug 20, 2020 at 09:33:21AM +0200, Ard Biesheuvel wrote: > > > On my machine the performance difference on a 1472-byte request > > between SIMD and generic is 2161 vs. 7558 (cycles). > > Sure. But your machine does not have the pathological FPU > preserve/restore performance. Why does that matter? These are numbers for cbc-aesni which means just a single preserve/restore for the whole request. Or are you saying on Ben's machine cbc-aesni would have worse performance vs. aes-generic? > The mac80211 CCMP code uses a synchronous ccm aead, which gets backed > by a skcipher+ahash combo by the ccm template. So a synchronous ahash > is fine for this particular case. OK I was just grepping for cmac so didn't see this. For this case, I think it's even more important that it be converted over to async because its sending path is also in user context just like IPsec. So simply by sending wireless packets you can hog the CPU while doing SIMD in kernel context which would then kill the receive path if you're using the generic fallback. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt