From: Charlie Jenkins <charlie@rivosinc.com>
To: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Charlie Jenkins <charlie@rivosinc.com>
Subject: [PATCH 0/5] riscv: Add fine-tuned checksum functions
Date: Sat, 26 Aug 2023 18:26:05 -0700 [thread overview]
Message-ID: <20230826-optimize_checksum-v1-0-937501b4522a@rivosinc.com> (raw)
Each architecture generally implements fine-tuned checksum functions to
leverage the instruction set. This patch adds the main checksum
functions that are used in networking.
Vector support is included in this patch to start a discussion on those
since I am not super familiar with the vector instructions. I wasn't
able to get the vector patches to compile in the kernel, but as vector
support matures I will be able to go back and fix them up. I have tested
the vector patches as standalone algorithms in QEMU.
These functions work best with the Zba and Zbb extensions, so support
for those instructions were added to the kernel.
To test this patch, enable the configs for KUNIT, then CHECKSUM_KUNIT
and RISCV_CHECKSUM_KUNIT.
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
---
Charlie Jenkins (5):
riscv: Checksum header
riscv: Add checksum library
riscv: Vector checksum header
riscv: Vector checksum library
riscv: Test checksum functions
arch/riscv/Kconfig | 23 +++
arch/riscv/Kconfig.debug | 1 +
arch/riscv/Makefile | 2 +
arch/riscv/include/asm/checksum.h | 165 ++++++++++++++++++++
arch/riscv/lib/Kconfig.debug | 31 ++++
arch/riscv/lib/Makefile | 3 +
arch/riscv/lib/csum.c | 283 ++++++++++++++++++++++++++++++++++
arch/riscv/lib/riscv_checksum_kunit.c | 111 +++++++++++++
8 files changed, 619 insertions(+)
---
base-commit: 7bafbd4027ae86572f308c4ddf93120c90126332
change-id: 20230804-optimize_checksum-db145288ac21
--
- Charlie
next reply other threads:[~2023-08-27 1:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-27 1:26 Charlie Jenkins [this message]
2023-08-27 1:26 ` [PATCH 1/5] riscv: Checksum header Charlie Jenkins
2023-08-27 1:42 ` Conor Dooley
2023-08-27 2:00 ` Palmer Dabbelt
2023-08-27 10:28 ` Conor Dooley
2023-08-27 12:25 ` Conor Dooley
2023-08-28 16:55 ` Charlie Jenkins
2023-08-28 17:08 ` Conor Dooley
2023-08-28 18:20 ` Charlie Jenkins
2023-08-28 18:56 ` Conor Dooley
2023-08-28 21:39 ` Charlie Jenkins
2023-08-27 1:26 ` [PATCH 2/5] riscv: Add checksum library Charlie Jenkins
2023-08-27 1:26 ` [PATCH 3/5] riscv: Vector checksum header Charlie Jenkins
2023-08-28 18:22 ` Samuel Holland
2023-08-27 1:26 ` [PATCH 4/5] riscv: Vector checksum library Charlie Jenkins
2023-08-27 1:26 ` [PATCH 5/5] riscv: Test checksum functions Charlie Jenkins
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=20230826-optimize_checksum-v1-0-937501b4522a@rivosinc.com \
--to=charlie@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®