csum_and_copy_to_iter(): massage into form closer to csum_and_copy_from_iter()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 5 Jun 2021 14:19:30 +0000 (10:19 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 10 Jun 2021 15:45:14 +0000 (11:45 -0400)
commit594e450b3f4435a9d663df3d48d7fa34e685cbd1
tree59b3a48032406362876577688e0785f0fc9fcb13
parentf0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454
csum_and_copy_to_iter(): massage into form closer to csum_and_copy_from_iter()

Namely, have off counted starting from 0 rather than from csstate->off.
To compensate we need to shift the initial value (csstate->sum) (rotate
by 8 bits, as usual for csum) and do the same after we are finished adding
the pieces up.

What we get out of that is a bit more redundancy in our variables - from
is always equal to addr + off, which will be useful several commits down
the road.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/net/checksum.h
lib/iov_iter.c