Lines Matching refs:buff
35 static unsigned do_csum(const unsigned char *buff, unsigned len)
42 odd = 1 & (unsigned long) buff;
44 result = *buff << 8;
46 buff++;
50 if (2 & (unsigned long) buff) {
51 result += *(unsigned short *)buff;
54 buff += 2;
60 if (4 & (unsigned long) buff) {
61 result += *(unsigned int *) buff;
64 buff += 4;
82 : [src] "r" (buff), [zero] "r" (zero),
84 buff += 64;
94 : "m" (*(unsigned long *)buff),
97 buff += 8;
103 result += *(unsigned int *) buff;
104 buff += 4;
108 result += *(unsigned short *) buff;
109 buff += 2;
113 result += *buff;
123 * computes the checksum of a memory block at buff, length len,
132 * it's best to have buff aligned on a 64-bit boundary
134 __wsum csum_partial(const void *buff, int len, __wsum sum)
136 return (__force __wsum)add32_with_carry(do_csum(buff, len),
145 __sum16 ip_compute_csum(const void *buff, int len)
147 return csum_fold(csum_partial(buff,len,0));