On Wed, Feb 3, 2021 at 11:29 AM Willem de Bruijn <willemdebruijn.ker...@gmail.com> wrote: > > From: Willem de Bruijn <will...@google.com> > > When iteratively computing a checksum with csum_block_add, track the > offset "pos" to correctly rotate in csum_block_add when offset is odd. > > The open coded implementation of skb_copy_and_csum_datagram did this. > With the switch to __skb_datagram_iter calling csum_and_copy_to_iter, > pos was reinitialized to 0 on each call. > > Bring back the pos by passing it along with the csum to the callback. > > Changes v1->v2 > - pass csum value, instead of csump pointer (Alexander Duyck) > > Link: https://lore.kernel.org/netdev/20210128152353.GB27281@optiplex/ > Fixes: 950fcaecd5cc ("datagram: consolidate datagram copy to iter helpers") > Reported-by: Oliver Graute <oliver.gra...@gmail.com> > Signed-off-by: Willem de Bruijn <will...@google.com>
Looks good to me. Reviewed-by: Alexander Duyck <alexanderdu...@fb.com>