Lines Matching refs:sum
19 static inline __wsum cksm(const void *buff, int len, __wsum sum) in cksm() argument
31 : [sum] "+&d" (sum), [rp] "+&d" (rp.pair) : : "cc", "memory"); in cksm()
32 return sum; in cksm()
35 __wsum csum_partial(const void *buff, int len, __wsum sum);
43 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
45 u32 csum = (__force u32) sum; in csum_fold()
77 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
79 __u64 csum = (__force __u64)sum; in csum_tcpudp_nofold()
94 __u8 proto, __wsum sum) in csum_tcpudp_magic() argument
96 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
112 __u64 sum = (__force __u64)csum; in csum_ipv6_magic() local
114 sum += (__force __u32)saddr->s6_addr32[0]; in csum_ipv6_magic()
115 sum += (__force __u32)saddr->s6_addr32[1]; in csum_ipv6_magic()
116 sum += (__force __u32)saddr->s6_addr32[2]; in csum_ipv6_magic()
117 sum += (__force __u32)saddr->s6_addr32[3]; in csum_ipv6_magic()
118 sum += (__force __u32)daddr->s6_addr32[0]; in csum_ipv6_magic()
119 sum += (__force __u32)daddr->s6_addr32[1]; in csum_ipv6_magic()
120 sum += (__force __u32)daddr->s6_addr32[2]; in csum_ipv6_magic()
121 sum += (__force __u32)daddr->s6_addr32[3]; in csum_ipv6_magic()
122 sum += len; in csum_ipv6_magic()
123 sum += proto; in csum_ipv6_magic()
124 sum += (sum >> 32) | (sum << 32); in csum_ipv6_magic()
125 return csum_fold((__force __wsum)(sum >> 32)); in csum_ipv6_magic()