[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB85107EBD34691508E453F3E188CEA@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Mon, 10 Nov 2025 06:51:11 +0000
From: Wei Fang <wei.fang@....com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Shenwei Wang <shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>,
"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>, "eric@...int.com" <eric@...int.com>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net] net: fec: correct rx_bytes statistic for the case
SHIFT16 is set
> 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.
Powered by blists - more mailing lists