-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
riscv: Add fine-tuned checksum functions #188
Conversation
Upstream branch: 3fec323 |
Upstream branch: 3fec323 |
77564a1
to
dc7176b
Compare
Upstream branch: 3fec323 |
dc7176b
to
5036095
Compare
Upstream branch: 3fec323 |
5036095
to
6d52a0e
Compare
Upstream branch: 3ca112b Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-riscv/list/?series=798270
conflict:
|
31bea4c
to
26966d3
Compare
This csum_fold implementation introduced into arch/arc by Vineet Gupta is better than the default implementation on at least arc, x86, and riscv. Using GCC trunk and compiling non-inlined version, this implementation has 41.6667%, 25% fewer instructions on riscv64, x86-64 respectively with -O3 optimization. Most implmentations override this default in asm, but this should be more performant than all of those other implementations except for arm which has barrel shifting and sparc32 which has a carry flag. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Reviewed-by: David Laight <david.laight@aculab.com> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Support static branches depending on the value of misaligned accesses. This will be used by a later patch in the series. All cpus must be considered "fast" for this static branch to be flipped. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Provide checksum algorithms that have been designed to leverage riscv instructions such as rotate. In 64-bit, can take advantage of the larger register to avoid some overflow checking. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Xiao Wang <xiao.w.wang@intel.com> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Provide a 32 and 64 bit version of do_csum. When compiled for 32-bit will load from the buffer in groups of 32 bits, and when compiled for 64-bit will load in groups of 64 bits. Additionally provide riscv optimized implementation of csum_ipv6_magic. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Xiao Wang <xiao.w.wang@intel.com> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Supplement existing checksum tests with tests for csum_ipv6_magic and ip_fast_csum. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Upstream branch: eb46a00 |
6d52a0e
to
404f3d4
Compare
Pull request for series with
subject: riscv: Add fine-tuned checksum functions
version: 8
url: https://patchwork.kernel.org/project/linux-riscv/list/?series=797256