On Wed, Feb 3, 2021 at 11:29 AM Willem de Bruijn
[off-list ref] wrote:
From: Willem de Bruijn <willemb@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/ (local)
Fixes: 950fcaecd5cc ("datagram: consolidate datagram copy to iter helpers")
Reported-by: Oliver Graute <redacted>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Looks good to me.
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>