Skip to content
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 #380

Closed
wants to merge 6 commits into from

Conversation

bjoto
Copy link

@bjoto bjoto commented Dec 13, 2023

Pull request for series with
subject: riscv: Add fine-tuned checksum functions
version: 12
url: https://patchwork.kernel.org/project/linux-riscv/list/?series=809482

@bjoto
Copy link
Author

bjoto commented Dec 13, 2023

Upstream branch: f352a28
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=809482
version: 12

@bjoto
Copy link
Author

bjoto commented Dec 20, 2023

Upstream branch: f352a28
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=811959
version: 13

@bjoto bjoto added V13 and removed V12 labels Dec 20, 2023
@bjoto
Copy link
Author

bjoto commented Dec 27, 2023

Upstream branch: f352a28
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=813079
version: 14

@bjoto
Copy link
Author

bjoto commented Jan 5, 2024

Upstream branch: f352a28
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=813079
version: 14

@bjoto
Copy link
Author

bjoto commented Jan 5, 2024

Upstream branch: 5a2cf77
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=813079
version: 14

@bjoto bjoto closed this Jan 8, 2024
@bjoto bjoto reopened this Jan 9, 2024
@bjoto
Copy link
Author

bjoto commented Jan 9, 2024

Upstream branch: 5a2cf77
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=815234
version: 15

@bjoto
Copy link
Author

bjoto commented Jan 9, 2024

Upstream branch: 5a2cf77
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=815234
version: 15

@bjoto
Copy link
Author

bjoto commented Jan 9, 2024

Upstream branch: 5a2cf77
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=815234
version: 15

@bjoto
Copy link
Author

bjoto commented Jan 10, 2024

Upstream branch: 5a2cf77
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=815234
version: 15

@bjoto
Copy link
Author

bjoto commented Jan 11, 2024

Upstream branch: c4e4b79
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=815234
version: 15

@bjoto
Copy link
Author

bjoto commented Jan 11, 2024

Upstream branch: d3e591a
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=815234
version: 15

Björn Töpel and others added 6 commits January 12, 2024 19:06
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. At any point in time,
this static branch will only be enabled if all online CPUs are
considered "fast".

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Evan Green <evan@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>
@bjoto
Copy link
Author

bjoto commented Jan 12, 2024

Upstream branch: d4abde5
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=815234
version: 15

@bjoto bjoto reopened this Jan 12, 2024
@bjoto bjoto closed this Jan 22, 2024
@bjoto bjoto deleted the series/779663=>for-next branch January 24, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants