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

Commits on Jan 12, 2024

  1. adding ci files

    Björn Töpel committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    b51f1db View commit details
    Browse the repository at this point in the history
  2. asm-generic: Improve csum_fold

    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>
    charlie-rivos authored and Björn Töpel committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    2f9644f View commit details
    Browse the repository at this point in the history
  3. riscv: Add static key for misaligned accesses

    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>
    charlie-rivos authored and Björn Töpel committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    d3cc179 View commit details
    Browse the repository at this point in the history
  4. riscv: Add checksum header

    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>
    charlie-rivos authored and Björn Töpel committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    f2aec71 View commit details
    Browse the repository at this point in the history
  5. riscv: Add checksum library

    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>
    charlie-rivos authored and Björn Töpel committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    91606ce View commit details
    Browse the repository at this point in the history
  6. kunit: Add tests for csum_ipv6_magic and ip_fast_csum

    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>
    charlie-rivos authored and Björn Töpel committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    3427c90 View commit details
    Browse the repository at this point in the history