Re: [PATCH v3 net-next 3/5] net: fec: add rx_frame_size to support configurable RX length
From: Andrew Lunn
Date: Sat Aug 23 2025 - 16:55:08 EST
> > > Add a new rx_frame_size member in the fec_enet_private structure to
> > > decouple frame size configuration from max_buf_size. This allows more
> > > precise control over RX frame length settings. It is particularly
> > > useful for Jumbo frame support because the RX frame size may possible
> > > larger than the allocated RX buffer.
> >
> > Please could you extend that a little. What happens if the received frame is bigger
> > than the buffer? Does the hardware fragment it over two buffers?
> >
>
> The hardware doesn't have the capability to fragment received frames that exceed the MAX_FL
> value. Instead, it flags an overrun error in the status register when such frames are encountered.
And how is this useful for jumbo? Why would i want the RX frame size
bigger than the RX buffer size?
> > >
> > > Configure TRUNC_FL (Frame Truncation Length) based on the RX buffer size.
> > > Frames exceeding this limit will be treated as error packets and dropped.
> >
> > This bit confuses me. You want to allow rx_frame_size to be bigger than the
> > buffer size, but you also want to discard frames bigger than the buffer size?
> >
>
> MAX_FL defines the maximum allowable frame length, while TRUNC_FL specifies the
> threshold beyond which frames are truncated.
>
> Here, TRUNC_FL is configured based on the RX buffer size, allowing the hardware to
> handle oversized frame errors automatically without requiring software intervention.
Please could you expand the commit message.
I still don't quite get it. Why not set MAX_FL = TRUNC_FL = RX buffer
size?
Andrew