Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp441715pxu; Tue, 1 Dec 2020 15:32:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzFQAPmqsBLZtKhlComKA41AEgmZykHkQTn41lQzwCJLAHrCcegHC0Sb8Kzb6FomcZRley X-Received: by 2002:a17:906:aac1:: with SMTP id kt1mr5175778ejb.329.1606865532013; Tue, 01 Dec 2020 15:32:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606865532; cv=none; d=google.com; s=arc-20160816; b=AbgW7T1rrDz98bzIrjcfRE7Z920EsLi+m8eEGsf8xaiAXFGKgwPmg6kGmQ0gsw9sIQ G58GIZj4Mb0YzcB3yMiC+oBWMlJYR2RD587JHNqI1uedy2lULg85G2S7qHgdBLmARaf5 IAsUT2DP+L/gpb4mH2dQcyKhgGeKovjhHwa9Z8SaPTs9txQxxMZkAEUwF2RDyjbcfwsp 4w2ZD0vr8cNFy5zDKC0VIHBCp/8UJmx5hNB/uJ04Reqsv0FtSYjxPjGC9FDzTki6+LIH LTku217L2cBzBWBvzfWOZdHBYp25ycFxfaSdmp/wNiuyFVIkkFR5/5W9CsVFBmTfmcou NQAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Nz14y/TjZS0tlml99ZvExWkr4cUUBchzIUKEZlBkQvk=; b=r6MdKiNYXeYmSXRcIxbw4Mn2OGnOXXL85MZkRUg2eA4QrwuxNYbVlJsaQYGxBYGZpC 76T6tGlOuaUnQkWOPdVxFroUVxTjS2amO7psTojCMpquWTDUkC4coOyoXAn0ZAPZ1Qdy ePMBRomK/9NpkEYLD/qebINLew6vpcBX8q6KCcJGvvYf1g5qXX5Q8+YOw2mawNXwg5wN Y6hiLykQ3k1ppWgvwcSTLgYNKSuEVQohg0jj/JOVR7+V02glq5dwPwPZ4BnbomVgyqrp Jm4IrO4XEl1ID2eDRuV8+aEKFbXDV/xJnHYWDx0PxB8QVyuegE1u6llcUxaHO0bsQkkv Md3A== 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 mb18si999382ejb.284.2020.12.01.15.31.47; Tue, 01 Dec 2020 15:32:11 -0800 (PST) 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 S1726082AbgLAXbN (ORCPT + 99 others); Tue, 1 Dec 2020 18:31:13 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:51512 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbgLAXbN (ORCPT ); Tue, 1 Dec 2020 18:31:13 -0500 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1kkF6G-0003FC-Fy; Wed, 02 Dec 2020 10:30:25 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Wed, 02 Dec 2020 10:30:24 +1100 Date: Wed, 2 Dec 2020 10:30:24 +1100 From: Herbert Xu To: Ard Biesheuvel Cc: Linux Crypto Mailing List , Ben Greear , Steve deRosier Subject: Re: [PATCH v2] crypto: aesni - add ccm(aes) algorithm implementation Message-ID: <20201201233024.GB32382@gondor.apana.org.au> References: <20201201194556.5220-1-ardb@kernel.org> <20201201215722.GA31941@gondor.apana.org.au> <20201201220431.GA32072@gondor.apana.org.au> <20201201221628.GA32130@gondor.apana.org.au> <20201201231158.GA32274@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) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Dec 02, 2020 at 12:24:47AM +0100, Ard Biesheuvel wrote: > > True. But the fallback only gets executed if the scheduler is stupid > enough to schedule the TX task onto the core that is overloaded doing > RX softirqs. So in the general case, both TX and RX will be using > AES-NI instructions (unless the CCMP is done in hardware which is the > most common case by far) I don't think this makes sense. TX is typically done in response to RX so the natural alignment is for it to be on the same CPU. > Wireless is very different. Wifi uses a medium that is fundamentally > shared, and so the load it can induce is bounded. There is no way a > wifi interface is going to saturate a 64-bit AES-NI core doing CCMP in > software. This sounds pretty tenuous. In any case, even if wireless itself doesn't get you, there could be loads running on top of it, for example, IPsec. > Given the above, can't we be pragmatic here? This code addresses a > niche use case, which is not affected by the general concerns > regarding async crypto. We already have a framework for acceleration that works properly in aesni, I don't want to see us introduce another broken model within the same driver. So either just leave the whole thing along or do it properly by making wireless async. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt