From: Eric Biggers <ebiggers@kernel.org>
To: Zhihang Shao <zhihang.shao.iscas@gmail.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, ardb@kernel.org
Subject: Re: [PATCH v3] riscv: Optimize crct10dif with zbc extension
Date: Thu, 6 Feb 2025 12:19:50 -0800 [thread overview]
Message-ID: <20250206201950.GB1237@sol.localdomain> (raw)
In-Reply-To: <20250205163012.GB1474@sol.localdomain>
On Wed, Feb 05, 2025 at 08:30:12AM -0800, Eric Biggers wrote:
> On Wed, Feb 05, 2025 at 02:58:15PM +0800, Zhihang Shao wrote:
> > The current CRC-T10DIF algorithm on RISC-V platform is based on
> > table-lookup optimization.
> > Given the previous work on optimizing crc32 calculations with zbc
> > extension, it is believed that this will be equally effective for
> > accelerating crc-t10dif.
> >
> > Therefore this patch offers an implementation of crc-t10dif using zbc
> > extension. This can detect whether the current runtime environment
> > supports zbc feature and, if so, uses it to accelerate crc-t10dif
> > calculations.
> >
> > This patch is updated due to the patchset of updating kernel's
> > CRC-T10DIF library in 6.14, which is finished by Eric Biggers.
> > Also, I used crc_kunit.c to test the performance of crc-t10dif optimized
> > by crc extension.
> >
> > Signed-off-by: Zhihang Shao <zhihang.shao.iscas@gmail.com>
> > ---
> > arch/riscv/Kconfig | 1 +
> > arch/riscv/lib/Makefile | 1 +
> > arch/riscv/lib/crc-t10dif-riscv.c | 132 ++++++++++++++++++++++++++++++
> > 3 files changed, 134 insertions(+)
> > create mode 100644 arch/riscv/lib/crc-t10dif-riscv.c
>
> Acked-by: Eric Biggers <ebiggers@kernel.org>
> Tested-by: Eric Biggers <ebiggers@kernel.org>
>
> This can go through the riscv tree.
>
Actually, if people don't mind I'd like to take this through the crc tree. Due
to https://lore.kernel.org/r/20250206173857.39794-1-ebiggers@kernel.org the
function crc_t10dif_is_optimized() becomes unused and we should remove it, which
would conflict with this patch which adds another implementation of it.
- Eric
WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Zhihang Shao <zhihang.shao.iscas@gmail.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, ardb@kernel.org
Subject: Re: [PATCH v3] riscv: Optimize crct10dif with zbc extension
Date: Thu, 6 Feb 2025 12:19:50 -0800 [thread overview]
Message-ID: <20250206201950.GB1237@sol.localdomain> (raw)
In-Reply-To: <20250205163012.GB1474@sol.localdomain>
On Wed, Feb 05, 2025 at 08:30:12AM -0800, Eric Biggers wrote:
> On Wed, Feb 05, 2025 at 02:58:15PM +0800, Zhihang Shao wrote:
> > The current CRC-T10DIF algorithm on RISC-V platform is based on
> > table-lookup optimization.
> > Given the previous work on optimizing crc32 calculations with zbc
> > extension, it is believed that this will be equally effective for
> > accelerating crc-t10dif.
> >
> > Therefore this patch offers an implementation of crc-t10dif using zbc
> > extension. This can detect whether the current runtime environment
> > supports zbc feature and, if so, uses it to accelerate crc-t10dif
> > calculations.
> >
> > This patch is updated due to the patchset of updating kernel's
> > CRC-T10DIF library in 6.14, which is finished by Eric Biggers.
> > Also, I used crc_kunit.c to test the performance of crc-t10dif optimized
> > by crc extension.
> >
> > Signed-off-by: Zhihang Shao <zhihang.shao.iscas@gmail.com>
> > ---
> > arch/riscv/Kconfig | 1 +
> > arch/riscv/lib/Makefile | 1 +
> > arch/riscv/lib/crc-t10dif-riscv.c | 132 ++++++++++++++++++++++++++++++
> > 3 files changed, 134 insertions(+)
> > create mode 100644 arch/riscv/lib/crc-t10dif-riscv.c
>
> Acked-by: Eric Biggers <ebiggers@kernel.org>
> Tested-by: Eric Biggers <ebiggers@kernel.org>
>
> This can go through the riscv tree.
>
Actually, if people don't mind I'd like to take this through the crc tree. Due
to https://lore.kernel.org/r/20250206173857.39794-1-ebiggers@kernel.org the
function crc_t10dif_is_optimized() becomes unused and we should remove it, which
would conflict with this patch which adds another implementation of it.
- Eric
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-02-06 20:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 6:58 [PATCH v3] riscv: Optimize crct10dif with zbc extension Zhihang Shao
2025-02-05 6:58 ` Zhihang Shao
2025-02-05 16:30 ` Eric Biggers
2025-02-05 16:30 ` Eric Biggers
2025-02-06 20:19 ` Eric Biggers [this message]
2025-02-06 20:19 ` Eric Biggers
2025-02-10 20:35 ` Eric Biggers
2025-02-10 20:35 ` Eric Biggers
2025-02-12 8:08 ` Zhihang Shao
2025-02-12 8:08 ` Zhihang Shao
2025-02-12 19:52 ` Eric Biggers
2025-02-12 19:52 ` Eric Biggers
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=20250206201950.GB1237@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=ardb@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=zhihang.shao.iscas@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.