RE: [PATCH net] net: fec: correct rx_bytes statistic for the case SHIFT16 is set
From: Wei Fang
Date: Mon Nov 10 2025 - 01:51:37 EST
> Subject: Re: [PATCH net] net: fec: correct rx_bytes statistic for the case SHIFT16
> is set
>
> On Thu, 6 Nov 2025 10:14:21 +0800 Wei Fang wrote:
> > ndev->stats.rx_bytes += pkt_len;
> > + if (fep->quirks & FEC_QUIRK_HAS_RACC)
> > + ndev->stats.rx_bytes -= 2;
>
> Orthogonal to this patch, but why not:
>
> ndev->stats.rx_bytes += pkt_len - sub_len;
>
> ? Is this driver intentionally counting FCS as bytes?
Yes, the FEC hardware does not remove the FCS from the frame, so the
frame received by the driver contains the FCS and will be included in the
statistics.