From: Eric Dumazet <eric.dumazet@gmail.com>
To: Dimitris Michailidis <dmichail@google.com>,
edumazet@google.com, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] net: fix pskb_trim_rcsum_slow() with odd trim offset
Date: Fri, 19 Oct 2018 17:13:59 -0700 [thread overview]
Message-ID: <a297644f-e3d5-779e-3498-e145b6fd6c3c@gmail.com> (raw)
In-Reply-To: <20181020000713.228659-1-dmichail@google.com>
On 10/19/2018 05:07 PM, Dimitris Michailidis wrote:
> We've been getting checksum errors involving small UDP packets, usually
> 59B packets with 1 extra non-zero padding byte. netdev_rx_csum_fault()
> has been complaining that HW is providing bad checksums. Turns out the
> problem is in pskb_trim_rcsum_slow(), introduced in commit 88078d98d1bb
> ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends").
>
> The source of the problem is that when the bytes we are trimming start
> at an odd address, as in the case of the 1 padding byte above,
> skb_checksum() returns a byte-swapped value. We cannot just combine this
> with skb->csum using csum_sub(). We need to use csum_block_sub() here
> that takes into account the parity of the start address and handles the
> swapping.
>
> Matches existing code in __skb_postpull_rcsum() and esp_remove_trailer().
>
> Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends")
> Signed-off-by: Dimitris Michailidis <dmichail@google.com>
Thanks a lot Dimitris for finding this.
Reviewed-by: Eric Dumazet <edumazet@google.com>
next prev parent reply other threads:[~2018-10-20 8:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-20 0:07 [PATCH net] net: fix pskb_trim_rcsum_slow() with odd trim offset Dimitris Michailidis
2018-10-20 0:13 ` Eric Dumazet [this message]
2018-10-20 8:14 ` David Miller
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=a297644f-e3d5-779e-3498-e145b6fd6c3c@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dmichail@google.com \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
/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).