Re: [PATCH] net: stmmac: guard FCS stripping against runt frames
From: Andrew Lunn
Date: Wed Sep 23 2026 - 22:17:05 EST
> > @@ -5808,10 +5809,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
> >
> > /* ACS is disabled; strip manually. */
> > if (likely(!(status & rx_not_ls))) {
> > - if (buf2_len) {
> > + if (buf2_len >= ETH_FCS_LEN) {
>
> I do not think this approach is correct since, at least theoretically, the FCS can be
> splitted between buf1 and buf2.
We are talking about runt frames here, so less than 64 bytes in
size. Can such a frame be split over two buffers? What is the minimum
size of the first buffer?
Andrew