Skip to content
Commit 0e455d8e authored by Robin Murphy's avatar Robin Murphy Committed by Catalin Marinas
Browse files

arm64: Implement optimised IP checksum helpers



AArch64 is capable of 128-bit memory accesses without alignment
restrictions, which makes it both possible and highly practical to slurp
up a typical 20-byte IP header in just 2 loads. Implement our own
version of ip_fast_checksum() to take advantage of that, resulting in
considerably fewer instructions and memory accesses than the generic
version. We can also get more optimal code generation for csum_fold() by
defining it a slightly different way round from the generic version, so
throw that into the mix too.

Suggested-by: default avatarLuke Starrett <luke.starrett@broadcom.com>
Acked-by: default avatarLuke Starrett <luke.starrett@broadcom.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 33688abb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment