Hi Rakuram, On Sat, Aug 23, 2025 at 02:48:32PM +0530, Rakuram Eswaran wrote: > Thanks for applying my patch! > > I noticed your comment about the file being dated. > I’d be interested in helping to update it to cover the more modern > CRC implementations — things like carryless multiplication and > hardware CRC instructions on x86, ARM, etc. > > Since I’m not very familiar yet with these optimized approaches. > Could you suggest a good starting point for exploring this in the kernel > (or any references you recommend)? > > I was planning to look at lib/crc32.c and the arch-specific > implementations, but would appreciate your guidance. > > Best Regards, > Rakuram https://www.corsix.org/content/alternative-exposition-crc32_4k_pclmulqdq has a fairly good explanation. In the kernel, x86 uses crc32 instructions for crc32c(), and arm64 uses crc32 instructions for crc32c(), crc32_le(), and crc32_be(). x86, arm, arm64, powerpc, s390, and riscv all have CRC implementations using carryless multiplication instructions. The riscv one might be the easiest to read since it is mostly written in C, rather than assembly. See: lib/crc/riscv/crc-clmul-template.h - Eric