Lines Matching refs:buff
81 static inline unsigned long do_csum(const unsigned char * buff, int len) in do_csum() argument
88 odd = 1 & (unsigned long) buff; in do_csum()
90 result = *buff << 8; in do_csum()
92 buff++; in do_csum()
96 if (2 & (unsigned long) buff) { in do_csum()
97 result += *(unsigned short *) buff; in do_csum()
100 buff += 2; in do_csum()
104 if (4 & (unsigned long) buff) { in do_csum()
105 result += *(unsigned int *) buff; in do_csum()
108 buff += 4; in do_csum()
114 unsigned long w = *(unsigned long *) buff; in do_csum()
116 buff += 8; in do_csum()
125 result += *(unsigned int *) buff; in do_csum()
126 buff += 4; in do_csum()
130 result += *(unsigned short *) buff; in do_csum()
131 buff += 2; in do_csum()
135 result += *buff; in do_csum()
164 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
166 unsigned long result = do_csum(buff, len); in csum_partial()
181 __sum16 ip_compute_csum(const void *buff, int len) in ip_compute_csum() argument
183 return (__force __sum16)~from64to16(do_csum(buff,len)); in ip_compute_csum()