On 2/3/21 8:29 PM, Willem de Bruijn 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>
> ---
>
Reviewed-by: Eric Dumazet <eduma...@google.com>