summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/checksum_32.h
diff options
context:
space:
mode:
authorAlexander Duyck2016-03-11 23:05:41 +0100
committerDavid S. Miller2016-03-14 04:55:13 +0100
commit1e94082963747b551b129528714827f76a090e93 (patch)
tree543178f26d73ba0a7c9307091200ba6856c9fd60 /arch/x86/include/asm/checksum_32.h
parentipv4: Update parameters for csum_tcpudp_magic to their original types (diff)
downloadkernel-qcow2-linux-1e94082963747b551b129528714827f76a090e93.tar.gz
kernel-qcow2-linux-1e94082963747b551b129528714827f76a090e93.tar.xz
kernel-qcow2-linux-1e94082963747b551b129528714827f76a090e93.zip
ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short
This patch updates csum_ipv6_magic so that it correctly recognizes that protocol is a unsigned 8 bit value. This will allow us to better understand what limitations may or may not be present in how we handle the data. For example there are a number of places that call htonl on the protocol value. This is likely not necessary and can be replaced with a multiplication by ntohl(1) which will be converted to a shift by the compiler. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/include/asm/checksum_32.h')
-rw-r--r--arch/x86/include/asm/checksum_32.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h
index 6f380605403d..532f85e6651f 100644
--- a/arch/x86/include/asm/checksum_32.h
+++ b/arch/x86/include/asm/checksum_32.h
@@ -149,8 +149,7 @@ static inline __sum16 ip_compute_csum(const void *buff, int len)
#define _HAVE_ARCH_IPV6_CSUM
static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
const struct in6_addr *daddr,
- __u32 len, unsigned short proto,
- __wsum sum)
+ __u32 len, __u8 proto, __wsum sum)
{
asm("addl 0(%1), %0 ;\n"
"adcl 4(%1), %0 ;\n"