From: David Miller <davem@davemloft.net>
To: edumazet@google.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
eranbe@mellanox.com, saeedm@mellanox.com, dmichail@google.com,
xiyou.wangcong@gmail.com, pstaszewski@itcare.pl
Subject: Re: [PATCH net] net/mlx5e: fix csum adjustments caused by RXFCS
Date: Wed, 31 Oct 2018 12:41:31 -0700 (PDT) [thread overview]
Message-ID: <20181031.124131.2159865083955807922.davem@davemloft.net> (raw)
In-Reply-To: <20181030075725.195824-1-edumazet@google.com>
From: Eric Dumazet <edumazet@google.com>
Date: Tue, 30 Oct 2018 00:57:25 -0700
> As shown by Dmitris, we need to use csum_block_add() instead of csum_add()
> when adding the FCS contribution to skb csum.
>
> Before 4.18 (more exactly commit 88078d98d1bb "net: pskb_trim_rcsum()
> and CHECKSUM_COMPLETE are friends"), the whole skb csum was thrown away,
> so RXFCS changes were ignored.
>
> Then before commit d55bef5059dd ("net: fix pskb_trim_rcsum_slow() with
> odd trim offset") both mlx5 and pskb_trim_rcsum_slow() bugs were canceling
> each other.
>
> Now we fixed pskb_trim_rcsum_slow() we need to fix mlx5.
>
> Note that this patch also rewrites mlx5e_get_fcs() to :
>
> - Use skb_header_pointer() instead of reinventing it.
> - Use __get_unaligned_cpu32() to avoid possible non aligned accesses
> as Dmitris pointed out.
>
> Fixes: 902a545904c7 ("net/mlx5e: When RXFCS is set, add FCS data into checksum calculation")
> Reported-by: Paweł Staszewski <pstaszewski@itcare.pl>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable.
prev parent reply other threads:[~2018-11-01 4:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 7:57 [PATCH net] net/mlx5e: fix csum adjustments caused by RXFCS Eric Dumazet
2018-10-30 18:09 ` Cong Wang
2018-10-30 18:42 ` Eric Dumazet
2018-10-30 18:59 ` Cong Wang
2018-10-30 19:03 ` Eric Dumazet
2018-10-30 18:43 ` David Miller
2018-10-31 11:27 ` Eran Ben Elisha
2018-10-31 19:41 ` David Miller [this message]
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=20181031.124131.2159865083955807922.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dmichail@google.com \
--cc=edumazet@google.com \
--cc=eranbe@mellanox.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pstaszewski@itcare.pl \
--cc=saeedm@mellanox.com \
--cc=xiyou.wangcong@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