Lines Matching full:sum

13  * and adds in "sum" (32-bit), while copying the block to dst.
39 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
41 u32 tmp = (__force u32)sum; in csum_fold()
44 * swap the two 16-bit halves of sum in csum_fold()
47 * giving us the correct sum in the upper half. in csum_fold()
58 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
61 u64 s = (__force u32)sum; in csum_tcpudp_nofold()
78 : "=r" (sum) in csum_tcpudp_nofold()
79 : "r" (daddr), "r"(saddr), "r"(proto + len), "0"(sum)); in csum_tcpudp_nofold()
80 return sum; in csum_tcpudp_nofold()
89 __u8 proto, __wsum sum) in csum_tcpudp_magic() argument
91 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
116 static __always_inline __wsum csum_shift(__wsum sum, int offset) in csum_shift() argument
118 /* rotate sum to align it with a 16b boundary */ in csum_shift()
119 return (__force __wsum)rol32((__force u32)sum, (offset & 1) << 3); in csum_shift()
138 __wsum sum, tmp; in ip_fast_csum_nofold() local
146 : "=r" (sum), "=r" (tmp), "+b" (ptr) in ip_fast_csum_nofold()
150 return sum; in ip_fast_csum_nofold()
161 * and adds in "sum" (32-bit)
171 __wsum __csum_partial(const void *buff, int len, __wsum sum);
173 static __always_inline __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
177 sum = csum_add(sum, (__force __wsum)*(const u16 *)buff); in csum_partial()
179 sum = csum_add(sum, (__force __wsum)*(const u32 *)buff); in csum_partial()
181 sum = csum_add(sum, (__force __wsum) in csum_partial()
184 sum = csum_add(sum, (__force __wsum) in csum_partial()
187 sum = csum_add(sum, (__force __wsum) in csum_partial()
190 sum = csum_add(sum, (__force __wsum) in csum_partial()
193 sum = csum_add(sum, (__force __wsum) in csum_partial()
196 sum = csum_add(sum, (__force __wsum) in csum_partial()
199 sum = csum_add(sum, ip_fast_csum_nofold(buff, len >> 2)); in csum_partial()
201 sum = __csum_partial(buff, len, sum); in csum_partial()
203 return sum; in csum_partial()
218 __u32 len, __u8 proto, __wsum sum);