Lines Matching full:sum
2 * Compute 16-bit sum in ones' complement arithmetic (with end-around carry).
3 * This sum is often used as a simple checksum in networking.
16 uint32_t sum = 0; in slurp_head32() local
24 sum = load32(ptr32) & mask; in slurp_head32()
28 return sum; in slurp_head32()
36 uint64_t sum = 0; in __chksum() local
42 sum = slurp_head32(&ptr, &nbytes); in __chksum()
46 /* Sum all 16-byte chunks */ in __chksum()
54 sum += h0 + h1 + h2 + h3; in __chksum()
63 sum += load32(cptr); in __chksum()
71 sum += load16(cptr); in __chksum()
77 sum += *(uint8_t *)cptr; in __chksum()
80 return fold_and_swap(sum, swap); in __chksum()