Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8670992rwb; Tue, 13 Dec 2022 09:04:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf6GgSblnB0drw+odJV+B6IxDeZbjoX37CbtVinmon3KP7ljojnwW9NfWxIdbG+9YevYLBKy X-Received: by 2002:a05:6a20:1bd5:b0:ad:7428:d326 with SMTP id cv21-20020a056a201bd500b000ad7428d326mr10038670pzb.30.1670951059279; Tue, 13 Dec 2022 09:04:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670951059; cv=none; d=google.com; s=arc-20160816; b=z0KyDCHA+M9x2E+AmWSHCpm9RsJEjO6AHHMf70DHIKlerrloILqd69JhCxhe6nuWEn p3vUolsC906T1ket+az+VWzOdtSIssUNROMafGfnHXG3aSc0MosPbGiBjD/Y1W4R6HQp niUdHae97SH8Sn6FYIHqXuBQPburs3wDBjDKDF4yCpIw3SBK3SoKUHf9DK31pgS73Pyn k6v2YghOR26yb9iYqdGDuDeGzi0p5alzBTbWHcB3bwk/Wek0jVX49F2mh00lMu4tBMPK IaP2tDwrLAaPLCcoFPDCMk3uRGd91T3InYQWQYbewtfxvqRrDvThGIxXnZtmgyMgcuV9 sT6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nRTsgt2s0CXqejPQIsJcMbCKeu5AtyGMg3jBOd2tFQ0=; b=L89StDmc7tYHMfu0eITI2A6AXJOYOAEX8HgBGoQzhZd777nxAw0ScP6S5WUitdoEzp 6uCym6hY7ZqrZjh/PCnbzxOSXXlEHNmtEXUAkgrXPeouvaDfDidLUmViXuq4O2B8zyk5 oojzTVuGU7lyFS7Bv+6FUIDDnKnI0OENceLwqLxCp8hJ7B820SpSZsUCo1w+t1ZRrB95 343jyMSUsl5ZbhoFS5SRD4YjCULnaj9Q/LvRi4tjB1M95B23I83ExQ70giHa8YAzsI7T kn0MrmEh65zj1/vcb6quQefvJ+rKrKZG5vOEO5Uhv7htBS1udqmkqN1qWeMWT4ucpV0/ B9pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RB2g5tPf; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7-20020a17090a128700b0021859b5fe8asi12416967pja.145.2022.12.13.09.04.02; Tue, 13 Dec 2022 09:04:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RB2g5tPf; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236124AbiLMQ7a (ORCPT + 99 others); Tue, 13 Dec 2022 11:59:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235932AbiLMQ65 (ORCPT ); Tue, 13 Dec 2022 11:58:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F054F24F00 for ; Tue, 13 Dec 2022 08:56:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 78FD9B812A2 for ; Tue, 13 Dec 2022 16:56:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2511AC433D2 for ; Tue, 13 Dec 2022 16:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670950575; bh=nRTsgt2s0CXqejPQIsJcMbCKeu5AtyGMg3jBOd2tFQ0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RB2g5tPftDhnakeRd7e01+EqJkVsB7TTumkWWvldZuQys47lIpFIKlREUyplt97RH 3TAry7FJuNmsvX80Ga7xdNKuaw2mM5+4jo/b2E6ZCz7D0V8qrlPeAAcSCNgNeXGsYE dNw5+T9QK3a4OaRxFMLnRZipLCIRZ2WjUkguI50qDqiXv5lbhIr+jMgEgkR02Nf8yU 7ZwWJAKAwQanRtsFhNyyyHPTrvKLTnCZwIe+habFRX7Q+TSz7SUzzF2K0NABW1iyNN NhdW7u4Z093nl/m7K5FhQQ0LTDmC+HS01GG6pIhT/WluJI/ZwmwDxpk6Hr2ld/4Koi 7DIdNnj8DDLgg== Received: by mail-lj1-f175.google.com with SMTP id f16so3903583ljc.8 for ; Tue, 13 Dec 2022 08:56:15 -0800 (PST) X-Gm-Message-State: ANoB5plKawPvQzgOvxV2XW9wV3MIMBv8MbdkCavqLczfwpgGdU0b6w7h XHMBUqwINV64ZwEBiD6BD4hOLxtvr5rfQSJ97BY= X-Received: by 2002:a05:651c:1603:b0:26d:d603:8df2 with SMTP id f3-20020a05651c160300b0026dd6038df2mr28154018ljq.189.1670950573159; Tue, 13 Dec 2022 08:56:13 -0800 (PST) MIME-Version: 1.0 References: <20221207103936.2198407-1-ardb@kernel.org> <60937acc8b143e552aa41a689c03febb1fd3729a.camel@strongswan.org> In-Reply-To: <60937acc8b143e552aa41a689c03febb1fd3729a.camel@strongswan.org> From: Ard Biesheuvel Date: Tue, 13 Dec 2022 17:56:02 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] ARM: allow kernel mode NEON in softirq context To: Martin Willi Cc: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, linux-crypto@vger.kernel.org, Linus Walleij , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, 12 Dec 2022 at 15:38, Martin Willi wrote: > > Hi Ard, > > > Currently on ARM, we only permit kernel mode NEON in task context [...] > > For IPsec packet encryption involving highly performant crypto > > implementations, this results in a substantial performance hit [...] > > Thanks for your continued work on this. > > > Without these changes, an IPsec tunnel from a 32-bit VM to the 64-bit > > host can achieve a throughput of 9.5 MB/s TX and 11.9 MB/s RX. > > > > When the crypto algorithm is permitted to execute in softirq context, > > the throughput increases to 16.5 MB/s TX and 41 MB/s RX. > > In my tests on an Armada 385, I could increase IPsec throughput with > ChaCha20/Poly1305 on RX from ~230 to ~260 MBit/s when using the NEON > code path. So you may add my: > > Tested-by: Martin Willi > Thanks!