[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB9185AAF36A7FB42C4D00CBDE893CA@PAXPR04MB9185.eurprd04.prod.outlook.com>
Date: Sat, 23 Aug 2025 19:53:37 +0000
From: Shenwei Wang <shenwei.wang@....com>
To: Andrew Lunn <andrew@...n.ch>
CC: Wei Fang <wei.fang@....com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Alexei
Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Jesper
Dangaard Brouer <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>,
Clark Wang <xiaoning.wang@....com>, Stanislav Fomichev <sdf@...ichev.me>,
"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>, dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH v3 net-next 5/5] net: fec: enable the Jumbo frame support
for i.MX8QM
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Saturday, August 23, 2025 2:26 PM
> To: Shenwei Wang <shenwei.wang@....com>
> Cc: Wei Fang <wei.fang@....com>; Andrew Lunn <andrew+netdev@...n.ch>;
> David S. Miller <davem@...emloft.net>; Eric Dumazet
> <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni
> <pabeni@...hat.com>; Alexei Starovoitov <ast@...nel.org>; Daniel Borkmann
> <daniel@...earbox.net>; Jesper Dangaard Brouer <hawk@...nel.org>; John
> Fastabend <john.fastabend@...il.com>; Clark Wang
> <xiaoning.wang@....com>; Stanislav Fomichev <sdf@...ichev.me>;
> imx@...ts.linux.dev; netdev@...r.kernel.org; linux-kernel@...r.kernel.org; dl-
> linux-imx <linux-imx@....com>
> Subject: [EXT] Re: [PATCH v3 net-next 5/5] net: fec: enable the Jumbo frame
> support for i.MX8QM
> > - /* enable ENET store and forward mode */
> > - writel(FEC_TXWMRK_STRFWD, fep->hwp + FEC_X_WMRK);
> > +
> > + /* When Jumbo Frame is enabled, the FIFO may not be large enough
> > + * to hold an entire frame. In this case, configure the interface
> > + * to operate in cut-through mode, triggered by the FIFO threshold.
> > + * Otherwise, enable the ENET store-and-forward mode.
> > + */
> > + if (fep->quirks & FEC_QUIRK_JUMBO_FRAME)
> > + writel(0xF, fep->hwp + FEC_X_WMRK);
>
> The quirk indicates the hardware is capable of jumbo frames, not that jumbo
> frames are enabled. Don't you need to compare the mtu with ETH_FRAME_LEN +
> ETH_FCS_LEN to say jumbo is enabled?
>
The comments here do have some confusion. The goal is to enable cut-through mode
when the hardware supports Jumbo frames. But we can limit the scope to enable it
only when MTU is less than 2k bytes.
> Is there a counter or other indication that the FIFO experienced an underflow?
>
There is a Underrun bit in the status field in the TX buffer descriptor. The hardware
supports retransmit frames if high memory latency is encountered due to other
high-priority bus masters.
Thanks,
Shenwei
> Andrew
Powered by blists - more mailing lists