From: James <aslan.jnn@gmail.com>
To: David Laight <david.laight.linux@gmail.com>
Cc: Raju Rangoju <Raju.Rangoju@amd.com>,
Prashanth Kumar K R <PrashanthKumar.K.R@amd.com>,
netdev@vger.kernel.org, Thomas.Lendacky@amd.com
Subject: Re: [PATCH net] net: amd-xgbe: support receiving packets with bad FCS
Date: Thu, 20 Aug 2026 10:38:53 +1000 [thread overview]
Message-ID: <20260820003853.39357-1-aslan.jnn@gmail.com> (raw)
In-Reply-To: <20260819124307.7a9ec5e6@pumpkin>
Hi David, thank you for your feedback!
So on my test hardware (AMD Snowy Owl SoC), it is the former: FCS
validation is actually disabled, and packets with bad FCS are processed as
valid packets.
Concretely, with DCRCC=1 (the current behavior):
- `xgbe_dev_read()` treats the packet as valid: the skb is passed up the
stack normally (e.g. `tcpdump -Q in` will see the packets with
bad FCS).
- The RX CRC error counter is not incremented, so `ethtool -S` shows no
error.
- Since CST=1 (CRC stripping) is also set, the FCS bytes are stripped
and are not visible in the captured frame from user-space, thus
user space can't tell if the packet got bad FCS or not).
I verified this empirically: if the link partner sends two identical
packets, one with a valid FCS and one with a completely inverted FCS, both
arrive identically in `tcpdump -Q in` with no way to distinguish them, and
`ethtool -S` shows zero CRC errors.
With the patch applied (e.g. setting DCRCC=0), the bad-FCS packet is
dropped and RX CRC counter will get incremented.
Regards,
James
On Wed, Aug 19, 2026 at 12:43:07PM +0100, David Laight <david.laight.linux@gmail.com> wrote:
> What actually happens to packets with bad FCS?
> If FCS validation is actually disabled they'd get processed as valid packets.
> That would be a serious bug.
> OTOH the rx status could contain an 'fcs error' bit that causes the packet
> be discarded and the software counts an error.
> That would match the historic behaviour of many ethernet chips.
next prev parent reply other threads:[~2026-08-20 0:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 9:16 [PATCH net] net: amd-xgbe: support receiving packets with bad FCS James
2026-08-14 10:09 ` Simon Horman
2026-08-19 2:36 ` James
2026-08-19 9:01 ` Simon Horman
2026-08-17 23:32 ` Jakub Kicinski
2026-08-19 6:31 ` James
2026-08-19 9:16 ` [PATCH net v2] " James
2026-08-19 11:43 ` [PATCH net] " David Laight
2026-08-20 0:38 ` James [this message]
2026-08-20 8:58 ` David Laight
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=20260820003853.39357-1-aslan.jnn@gmail.com \
--to=aslan.jnn@gmail.com \
--cc=PrashanthKumar.K.R@amd.com \
--cc=Raju.Rangoju@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=david.laight.linux@gmail.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