diff options
author | Robin Murphy <robin.murphy@arm.com> | 2020-01-20 21:52:29 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2020-03-09 21:08:25 +0300 |
commit | e9c7ddbf8b4b6a291bf3b5bfa7c883235164d9be (patch) | |
tree | aa52e43a553143c92273950d372f427607c06c2c /arch/arm64/include/asm | |
parent | 27afb236fe5adaa3911e47c91057ba783549226f (diff) | |
download | linux-e9c7ddbf8b4b6a291bf3b5bfa7c883235164d9be.tar.xz |
arm64: csum: Optimise IPv6 header checksum
Throwing our __uint128_t idioms at csum_ipv6_magic() makes it
about 1.3x-2x faster across a range of microarchitecture/compiler
combinations. Not much in absolute terms, but every little helps.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r-- | arch/arm64/include/asm/checksum.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/checksum.h b/arch/arm64/include/asm/checksum.h index 8d2a7de39744..b6f7bc6da5fb 100644 --- a/arch/arm64/include/asm/checksum.h +++ b/arch/arm64/include/asm/checksum.h @@ -5,7 +5,12 @@ #ifndef __ASM_CHECKSUM_H #define __ASM_CHECKSUM_H -#include <linux/types.h> +#include <linux/in6.h> + +#define _HAVE_ARCH_IPV6_CSUM +__sum16 csum_ipv6_magic(const struct in6_addr *saddr, + const struct in6_addr *daddr, + __u32 len, __u8 proto, __wsum sum); static inline __sum16 csum_fold(__wsum csum) { |