Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Danny Tsen <dtsen@linux.ibm.com>
To: Breno Leitao <leitao@debian.org>
Cc: linux-crypto@vger.kernel.org, stable@vger.kernel.org,
	herbert@gondor.apana.org.au, nayna@linux.ibm.com,
	appro@cryptogams.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
	ltcgcw@linux.vnet.ibm.com, dtsen@us.ibm.com
Subject: Re: [PATCH v2] crypto: powerpc/p10-aes-gcm - Fix IPsec stall on bond failover
Date: Fri, 20 Nov 2026 14:40:20 -0600	[thread overview]
Message-ID: <8facf804-6207-44be-829e-db79d271d005@linux.ibm.com> (raw)
In-Reply-To: <awCpkj5wsxEPt-Vd@gmail.com>


On 11/20/26 2:14 PM, Breno Leitao wrote:
> On Fri, Nov 20, 2026 at 01:16:57PM -0500, Danny Tsen wrote:
>> The Power10 AES-GCM driver registers its gcm(aes) and
>> rfc4106(gcm(aes)) algorithms through the crypto SIMD helper. When
>> crypto_simd_usable() is false, for example in softirq context, the
>> helper defers requests to cryptd and completes them asynchronously
>> with -EINPROGRESS.
>>
>> This breaks IPsec traffic during a bond failover. With the crypto
>> offload device active, traffic is switched to a passive device that
>> has only software encryption, and the ESP requests then go through
>> aes_gcm_p10_crypto. Under heavy load, some or all of the TCP streams
>> drop to zero throughput and do not recover. The stack is seen to drop
>> the ACKs as invalid, which points to the cryptd queueing delaying or
>> reordering the packets.
>>
>> Fix this by registering the algorithms directly as aead_alg with
>> CRYPTO_ALG_NEED_FALLBACK, and allocating a "gcm(aes)" or
>> "rfc4106(gcm(aes))" fallback tfm in ->init(). When VSX cannot be used
>> (!crypto_simd_usable()), the key was not set up for SIMD, or
>> cryptlen < 64, the request is handed to the fallback and completed
>> synchronously in the caller's context. The driver no longer defers
>> work to cryptd.
>>
>> Remove Kconfig option CRYPTO_SIMD and add CRYPTO_AES and CRYPTO_GCM.
>>
>> Fixes: c954b252dee9 ("crypto: powerpc/p10-aes-gcm - Register modules as SIMD")
>>
>> Signed-off-by: Danny Tsen <dtsen@linux.ibm.com>
> Reviewed-by: Breno Leitao <leitao@debian.org>
>
>> - * Copyright 2022- IBM Inc. All rights reserved
>> + * Copyright IBM Corp. 2022, 2023, 2024, 2025, 2026
> Do we really want to change this in this "fix" commit?

This is following IBM's copyright style.

Thanks.

-Danny


      reply	other threads:[~2026-11-20 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 18:16 [PATCH v2] crypto: powerpc/p10-aes-gcm - Fix IPsec stall on bond failover Danny Tsen
2026-11-20 20:14 ` Breno Leitao
2026-11-20 20:40   ` Danny Tsen [this message]

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=8facf804-6207-44be-829e-db79d271d005@linux.ibm.com \
    --to=dtsen@linux.ibm.com \
    --cc=appro@cryptogams.org \
    --cc=dtsen@us.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=leitao@debian.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ltcgcw@linux.vnet.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=nayna@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    /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