linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] riscv: Add fine-tuned checksum functions
@ 2023-08-27  1:26 Charlie Jenkins
  2023-08-27  1:26 ` [PATCH 1/5] riscv: Checksum header Charlie Jenkins
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Charlie Jenkins @ 2023-08-27  1:26 UTC (permalink / raw)
  To: linux-riscv, linux-kernel
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Charlie Jenkins

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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-08-28 21:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-27  1:26 [PATCH 0/5] riscv: Add fine-tuned checksum functions Charlie Jenkins
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).