Re: [PATCH] MIPS: bcm63xx: nvram: avoid inefficient use of crc32_le_combine()
From: Thomas Bogendoerfer
Date: Tue May 20 2025 - 02:57:11 EST
On Sun, May 11, 2025 at 11:28:36AM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
>
> bcm963xx_nvram_checksum() was using crc32_le_combine() to update a CRC
> with four zero bytes. However, this is about 5x slower than just
> CRC'ing four zero bytes in the normal way. Just do that instead.
>
> (We could instead make crc32_le_combine() faster on short lengths. But
> all its callers do just fine without it, so I'd like to just remove it.)
>
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
>
> Please consider this patch for the mips tree for 6.16. If it doesn't
> get picked up, I'll take it through the crc tree.
>
> include/linux/bcm963xx_nvram.h | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]