Lines Matching refs:len
46 static unsigned int do_csum(const unsigned char *buff, int len) in do_csum() argument
51 if (len <= 0) in do_csum()
60 len--; in do_csum()
63 if (len >= 2) { in do_csum()
66 len -= 2; in do_csum()
69 if (len >= 4) { in do_csum()
70 const unsigned char *end = buff + ((unsigned)len & ~3); in do_csum()
82 if (len & 2) { in do_csum()
87 if (len & 1) in do_csum()
125 __wsum csum_partial(const void *buff, int len, __wsum wsum) in csum_partial() argument
128 unsigned int result = do_csum(buff, len); in csum_partial()
142 __sum16 ip_compute_csum(const void *buff, int len) in ip_compute_csum() argument
144 return (__force __sum16)~do_csum(buff, len); in ip_compute_csum()
152 csum_partial_copy_from_user(const void __user *src, void *dst, int len, in csum_partial_copy_from_user() argument
157 missing = __copy_from_user(dst, src, len); in csum_partial_copy_from_user()
159 memset(dst + len - missing, 0, missing); in csum_partial_copy_from_user()
164 return csum_partial(dst, len, sum); in csum_partial_copy_from_user()
172 csum_partial_copy(const void *src, void *dst, int len, __wsum sum) in csum_partial_copy() argument
174 memcpy(dst, src, len); in csum_partial_copy()
175 return csum_partial(dst, len, sum); in csum_partial_copy()
190 __u32 len, __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
197 s += proto + len; in csum_tcpudp_nofold()
199 s += (proto + len) << 8; in csum_tcpudp_nofold()