Re: [PATCH PATCH net-next v4 8/8] tls: Enable batch async decryption in read_sock
Chuck Lever <[email protected]> Tue, 24 Mar 2026 08:44:57 -0400
| Newsgroups | dev.linux.lists.kernel-tls-handshake,org.kernel.vger.netdev |
|---|---|
| Organization | kernel.org |
| Message-ID | <[email protected]> |
On 3/23/26 6:48 PM, Sabrina Dubroca wrote: > 2026-03-23, 17:28:27 -0400, Chuck Lever wrote: >> >> On Tue, Mar 17, 2026, at 11:04 AM, Chuck Lever wrote: >>> From: Chuck Lever <[email protected]> >>> >>> tls_sw_read_sock() decrypts one TLS record at a time, blocking until >>> each AEAD operation completes before proceeding. Hardware async >>> crypto engines depend on pipelining multiple operations to achieve >>> full throughput, and the one-at-a-time model prevents that. Kernel >>> consumers such as NVMe-TCP and NFSD (when using TLS) are therefore >>> unable to benefit from hardware offload. >>> >>> When ctx->async_capable is true, the submit phase now loops up to >>> TLS_READ_SOCK_BATCH (16) records. >> >> It appears that async_capable is always false for TLSv1.3. Since >> TLSv1.3 is a hard requirement for both NVMe/TCP and RPC-with-TLS, >> patch 8/8 is moot for us. For the moment, I'm going to drop this >> one from the series. > > Then 7/8 is also not useful, and the series boils down to a few small> improvements (tls_decrypt_async_drain, spurious wakeups, checking the > backlog), which are not limited to read_sock. [nothing wrong with > that, it's just a different focus from what you started with] I think that's accurate. I can adjust the cover letter for v5. >> Once Alistair's KeyUpdate work is merged, we can revisit. > > Are you planning to add support for async crypto with TLS1.3? async crypto would be a pre-requisite requirement for batching decryption for TLS v1.3. At the moment I'm not planning to add that support, but we should discuss it once KeyUpdate is merged. -- Chuck Lever