Subject: Re: [PATCH net-next v3 08/14] net: ethernet: oa_tc6: Remove FCS size in RX frame

From: David Laight <[email-masked]>
Date: Tue, 2 Jun 2026 22:38:07 +0100

On Tue, 2 Jun 2026 15:37:06 +0000
Selvamani Rajagopal <[email-masked]> wrote:

> > Subject: Re: [PATCH net-next v3 08/14] net: ethernet: oa_tc6: Remove FCS size in RX
> > frame
> > 
> >   
> [..]
> 
>  
> > 
> > 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.)  
> 
> My understanding is that in TX side, MAC will pad FCS automatically.

TX pad is separate from the FCS.
The frames are padded to a minimum size so that collision detect works
on maximal length 10M coax segments.
(Or rather coax+link+coax+link+coax acting as a single collision domain.)
The same minimum frame length is used on modern networks which are all
physically point-to-point and all 'hubs' are store+forward where a minimum
packet length isn't strictly needed.

VLAN headers can give unexpected amounts of padding - VLAN didn't exist
when I was writing ethernet drivers! 

> RX side, MAC may or may not strip FCS
> before passing to the host. I believe our MAC doesn't strip FCS in RX side.
> 
> Here is what OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface specification says
> 
> 7.3 Data Transaction Protocol for Ethernet Frames 
> [..]
> Ethernet frames are typically transferred from the SPI host to the MAC-PHY without any padding or frame 
> check sequence (FCS). The MAC will automatically pad the Ethernet frame to the minimum frame size of 64 
> bytes and append a computed FCS
> [..]
> Similarly, the MAC-PHY will typically strip the FCS from received Ethernet frames prior to transfer to the SPI 
> host. However, the Ethernet specification allows the option for the Ethernet frame to be transferred to the 
> MAC client with the FCS.

Is this an SPI interface to the ethernet MAC?
You might want to pass the FCS over the SPI link and then verify in software
before treating the frame as valid, deleting the FCS, and passing the frame to
the protocol stack.
This would give extra protection for errors on the SPI link that might not
otherwise be detected.
(Although if you distrust the SPI link you'd what to pass the TX FCS as well.)

Unless you are doing IP checksum offload the IP checksum will pick up TCP/UDP errors.

But if you are running ISO transport (which we did 30 years ago) there is
no other checksum. So if/when you have a VMEbus card that suffers ground
bounce when, for example, passing a repeated 0xff, 0xff, 0x00 sequence you
get corrupted files from any files transfer request.

-- David

> > -- David
> > > Andrew