Netdev List
 help / color / mirror / Atom feed
From: Hendrik Donner <hd@os-cillation.de>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-crypto@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH 1/2] crypto: pcrypt - Remove pcrypt
Date: Fri, 24 Jul 2026 21:12:55 +0200	[thread overview]
Message-ID: <d3f65083-896e-4f79-87fe-95cace11c5eb@os-cillation.de> (raw)
In-Reply-To: <20260724185116.GB1572592@google.com>

Hello,

On 7/24/26 20:51, Eric Biggers wrote:
> On Fri, Jul 24, 2026 at 08:19:02PM +0200, Hendrik Donner wrote:
>>
>> so i'm now on 7.1.4 with
>>
>>    PCI: imx6: Keep i.MX6 Root Port MSI/MSI-X Capabilities with iMSI-RX to
>> work around hardware bug
>>
>> on top to be able to tune queue settings. And to have a working ethernet
>> in the first place, without the patch the NETDEV WATCHDOG resets the
>> card all the time due to queues stalling. But now more than 1 CPU are
>> serving IRQs.
>>
>> With pcrypt
>> (seqiv(rfc4106(pcrypt(gcm_base(ctr-aes-neonbs,ghash-lib))))):
>>
>> Upload:
>> [  4]   0.00-60.00  sec   901 MBytes   126 Mbits/sec
>>
>> Download:
>> [  4]   0.00-60.00  sec  1.23 GBytes   177 Mbits/sec
>>
>> Without pcrypt
>> (seqiv(rfc4106(gcm_base(ctr-aes-neonbs,ghash-lib)))):
>>
>> Upload:
>> [  4]   0.00-60.00  sec   679 MBytes  94.9 Mbits/sec
>>
>> Download:
>> [  4]   0.00-60.00  sec   674 MBytes  94.3 Mbits/sec
>>
>> So counterintuitively pcrypt matters more again. I repeated the tests a
>> few times, those numbers are fairly representative. Every run is over a
>> 60 sec window.
> 
> Thanks for trying it.  Perhaps this is related to the iperf3 test using
> only a single flow?  Does that reflect the real-world case for you?

probably flow related, i would need a different test setup to create
different flows, but for example single file downloads matter to our
userbase.

> 
> I'm also curious whether you're particularly attached to AES-GCM, or
> whether you've considered switching to ChaCha20Poly1305 which would be
> much faster on that CPU.  This could be done either by switching to
> "rfc7539esp(chacha20,poly1305)" within IPsec, or by just switching to
> WireGuard.
> 

Unfortunately the technical specification the system has to comply to
says IPSec and AES-GCM and/or AES-CBC with HMAC-SHA256. CBC is on its
way out though and barely seen in production anymore.

> If none of those are options for you and you do want pcrypt to be kept
> around, could you confirm that you're solely using 'crconf' (run as
> root) to enable it, and in particular you're not relying on the
> misfeature of also being able to enable it as an unprivileged user using
> AF_ALG?  We can keep it around for a bit longer if really needed, but
> the unprivileged stuff definitely has to go.  We should also keep in
> mind that pcrypt does not get tested very well (as the crypto self-tests
> just test serial use) and historically has had a lot of issues.
> 

For configuring the IPSec related templates only crconf is used in
production. On that kernel configuration AF_ALG is completely off.

Test environments use CONFIG_CRYPTO_USER_API_RNG only, everything else 
concerning AF_ALG is disabled.

Regards,
Hendrik

> - Eric


  reply	other threads:[~2026-07-24 19:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 22:32 [PATCH 0/2] Remove pcrypt Eric Biggers
2026-07-13 22:32 ` [PATCH 1/2] crypto: pcrypt - " Eric Biggers
2026-07-14  4:20   ` Thomas Huth
2026-07-21 18:59   ` Hendrik Donner
2026-07-21 19:50     ` Eric Biggers
2026-07-22 16:12       ` Hendrik Donner
2026-07-22 19:40         ` Eric Biggers
2026-07-22 23:30           ` Simon Richter
2026-07-23  8:01             ` David Laight
2026-07-24 18:19           ` Hendrik Donner
2026-07-24 18:51             ` Eric Biggers
2026-07-24 19:12               ` Hendrik Donner [this message]
2026-07-13 22:32 ` [PATCH 2/2] padata: Remove serialized job support Eric Biggers
2026-07-14  4:28   ` Thomas Huth
2026-07-17 20:32   ` Daniel Jordan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d3f65083-896e-4f79-87fe-95cace11c5eb@os-cillation.de \
    --to=hd@os-cillation.de \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox