Netdev List
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>,
	Piergiorgio Beruto <Pier.Beruto@onsemi.com>,
	"parthiban.veerasooran@microchip.com"
	<parthiban.veerasooran@microchip.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v3 08/14] net: ethernet: oa_tc6: Remove FCS size in RX frame
Date: Tue, 2 Jun 2026 15:07:12 +0100	[thread overview]
Message-ID: <20260602150712.5b28d58b@pumpkin> (raw)
In-Reply-To: <cf87ad90-6ba4-4132-a1eb-beedd796c168@lunn.ch>

On Sun, 31 May 2026 16:50:35 +0200
Andrew Lunn <andrew@lunn.ch> wrote:

> On Fri, May 29, 2026 at 06:41:00PM +0000, Selvamani Rajagopal wrote:
> > When MAC-PHY appends FCS to the incoming frame, FCS,
> > it is removed from the frame before passing it to the stack.  

If the MAC appends the FCS to an incoming frame it must be removed
before passing the frame into the stack.

> 
> What is missing from this commit message is an answer to the question
> "Why?". Does the stack do something wrong if there is a FCS at the end
> of the frame?

Unexpected padding ought to be an error.
If anything tries to parse LLC frames (with a length not an ethertype)
then padding is only expected on short frames.

Even for IP a frame with an length that is otherwise too short
might pick up the crc bytes as valid data instead of it being
discarded as invalid.

More of a question is why request the MAC append the FCS at all.
You can use it for error correction - but no one every does.
(A 2k frame has 32-14=18 crc bits for each bit offset which means
you have an 'average chance' of finding an 18bit error burst that
will fix every crc error. If you find an 8bit burst error that matches
the crc error there is a reasonable chance it is what caused the error.
Single error bursts are the most likely errors and easy to locate.)

-- David

> 
>    Andrew
> 


  parent reply	other threads:[~2026-06-02 14:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 18:41 [PATCH net-next v3 08/14] net: ethernet: oa_tc6: Remove FCS size in RX frame Selvamani Rajagopal
2026-05-31 14:50 ` Andrew Lunn
2026-06-02  2:40   ` Selvamani Rajagopal
2026-06-02  3:01     ` Qingfang Deng
2026-06-02 12:00     ` Andrew Lunn
2026-06-02 14:07   ` David Laight [this message]
2026-06-02 15:37     ` Selvamani Rajagopal
2026-06-02 21:38       ` 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=20260602150712.5b28d58b@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=Pier.Beruto@onsemi.com \
    --cc=Selvamani.Rajagopal@onsemi.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parthiban.veerasooran@microchip.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