Release 4.11 arch/x86/um/asm/checksum_32.h
/*
* Licensed under the GPL
*/
#ifndef __UM_SYSDEP_CHECKSUM_H
#define __UM_SYSDEP_CHECKSUM_H
static inline __sum16 ip_compute_csum(const void *buff, int len)
{
return csum_fold (csum_partial(buff, len, 0));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jeff Dike | 25 | 89.29% | 1 | 50.00% |
Al Viro | 3 | 10.71% | 1 | 50.00% |
Total | 28 | 100.00% | 2 | 100.00% |
#define _HAVE_ARCH_IPV6_CSUM
static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
const struct in6_addr *daddr,
__u32 len, __u8 proto,
__wsum sum)
{
__asm__(
"addl 0(%1), %0 ;\n"
"adcl 4(%1), %0 ;\n"
"adcl 8(%1), %0 ;\n"
"adcl 12(%1), %0 ;\n"
"adcl 0(%2), %0 ;\n"
"adcl 4(%2), %0 ;\n"
"adcl 8(%2), %0 ;\n"
"adcl 12(%2), %0 ;\n"
"adcl %3, %0 ;\n"
"adcl %4, %0 ;\n"
"adcl $0, %0 ;\n"
: "=&r" (sum)
: "r" (saddr), "r" (daddr),
"r"(htonl(len)), "r"(htonl(proto)), "0"(sum));
return csum_fold(sum);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jeff Dike | 30 | 85.71% | 1 | 33.33% |
Al Viro | 4 | 11.43% | 1 | 33.33% |
Alexander Duyck | 1 | 2.86% | 1 | 33.33% |
Total | 35 | 100.00% | 3 | 100.00% |
/*
* Copy and checksum to user
*/
#define HAVE_CSUM_COPY_USER
static __inline__ __wsum csum_and_copy_to_user(const void *src,
void __user *dst,
int len, __wsum sum, int *err_ptr)
{
if (access_ok(VERIFY_WRITE, dst, len)) {
if (copy_to_user(dst, src, len)) {
*err_ptr = -EFAULT;
return (__force __wsum)-1;
}
return csum_partial(src, len, sum);
}
if (len)
*err_ptr = -EFAULT;
return (__force __wsum)-1; /* invalid checksum */
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jeff Dike | 58 | 60.42% | 1 | 25.00% |
Bodo Stroesser | 26 | 27.08% | 1 | 25.00% |
Al Viro | 12 | 12.50% | 2 | 50.00% |
Total | 96 | 100.00% | 4 | 100.00% |
#endif
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jeff Dike | 128 | 73.14% | 1 | 16.67% |
Bodo Stroesser | 26 | 14.86% | 1 | 16.67% |
Al Viro | 20 | 11.43% | 3 | 50.00% |
Alexander Duyck | 1 | 0.57% | 1 | 16.67% |
Total | 175 | 100.00% | 6 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.