Lines Matching refs:buff
34 static unsigned do_csum(const unsigned char *buff, unsigned len)
41 odd = 1 & (unsigned long) buff;
43 result = *buff << 8;
45 buff++;
49 if (2 & (unsigned long) buff) {
50 result += *(unsigned short *)buff;
53 buff += 2;
59 if (4 & (unsigned long) buff) {
60 result += *(unsigned int *) buff;
63 buff += 4;
81 : [src] "r" (buff), [zero] "r" (zero),
83 buff += 64;
93 : "m" (*(unsigned long *)buff),
96 buff += 8;
102 result += *(unsigned int *) buff;
103 buff += 4;
107 result += *(unsigned short *) buff;
108 buff += 2;
112 result += *buff;
122 * computes the checksum of a memory block at buff, length len,
131 * it's best to have buff aligned on a 64-bit boundary
133 __wsum csum_partial(const void *buff, int len, __wsum sum)
135 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));