netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, oliver.graute@gmail.com,
	sagi@grimberg.me, viro@zeniv.linux.org.uk, hch@lst.de,
	alexander.duyck@gmail.com, eric.dumazet@gmail.com,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net v2] udp: fix skb_copy_and_csum_datagram with odd segment sizes
Date: Thu, 4 Feb 2021 16:04:54 +0100	[thread overview]
Message-ID: <02869fd8-7fbd-25db-c18c-cf9ab6db43f2@gmail.com> (raw)
In-Reply-To: <20210203192952.1849843-1-willemdebruijn.kernel@gmail.com>



On 2/3/21 8:29 PM, Willem de Bruijn 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/
> Fixes: 950fcaecd5cc ("datagram: consolidate datagram copy to iter helpers")
> Reported-by: Oliver Graute <oliver.graute@gmail.com>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> ---
>

Reviewed-by: Eric Dumazet <edumazet@google.com>


  parent reply	other threads:[~2021-02-04 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 19:29 [PATCH net v2] udp: fix skb_copy_and_csum_datagram with odd segment sizes Willem de Bruijn
2021-02-03 20:54 ` Alexander Duyck
2021-02-04 15:04 ` Eric Dumazet [this message]
2021-02-05  4:20 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02869fd8-7fbd-25db-c18c-cf9ab6db43f2@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver.graute@gmail.com \
    --cc=sagi@grimberg.me \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).