From: Eric Biggers <ebiggers@kernel.org>
To: Shreesh Adiga <16567adigashreesh@gmail.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
Demian Shulhan <demyansh@gmail.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/crc: Add 4-way folding in NEON crc64_nvme implementation
Date: Sat, 21 Nov 2026 12:46:31 -0800 [thread overview]
Message-ID: <20261121204631.GA16190@quark> (raw)
In-Reply-To: <20261118160110.1662470-1-16567adigashreesh@gmail.com>
On Wed, Nov 18, 2026 at 09:31:00PM +0530, Shreesh Adiga wrote:
> The partial block stage is enabled only for AArch64 as it needs the
> 128-bit TBL instruction not available in AArch32.
> Modified the loop dispatch on AArch64 to allow any len >= 128 rather
> than just multiple of 16 bytes.
Note that an AArch32 implementation of fold_partial_block() is possible,
e.g. vqtbl1q_u8() could be replaced with two vtbl2_u8(). Normally I'd
consider an AArch32 specific optimization not worth including, but it
might be worthwhile here since it would avoid divergence in the code due
to the following arch-specific precondition:
/* Assumes len >= 64. AArch32 also assumes len is multiple of 16. */
> lib/crc/arm64/crc64-neon.h | 15 +++---
> lib/crc/arm64/crc64.h | 18 ++++---
> lib/crc/crc64-neon.c | 96 +++++++++++++++++++++++++++++++++++---
> 3 files changed, 110 insertions(+), 19 deletions(-)
Anyway, I've applied this patch to
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=crc-next
In general I'd prefer better comments in the code though, especially
documenting nonobvious decisions like why pmull and pmull2 are accessed
using inline asm instead of intrinsics.
So if you'd like to do a follow-up patch, it could be worthwhile to
address the above two issues.
Thanks,
- Eric
prev parent reply other threads:[~2026-11-21 20:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 16:01 [PATCH] lib/crc: Add 4-way folding in NEON crc64_nvme implementation Shreesh Adiga
2026-11-18 16:29 ` Ard Biesheuvel
2026-11-18 16:48 ` Shreesh Adiga
2026-11-21 20:46 ` Eric Biggers [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=20261121204631.GA16190@quark \
--to=ebiggers@kernel.org \
--cc=16567adigashreesh@gmail.com \
--cc=ardb@kernel.org \
--cc=demyansh@gmail.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@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