Re: [PATCH net v2] net: dsa: tag_rtl4_a: Bump min packet size

From: Linus Walleij
Date: Tue Oct 31 2023 - 18:45:14 EST


On Mon, Oct 30, 2023 at 3:16 PM Vladimir Oltean <olteanv@xxxxxxxxx> wrote:

> if (skb->len >= 1496)
> __skb_put_padto(skb, 1518, false);
>
> (...)
>
> skb_push(skb, 4);
>
> which means that here, skb->len will be 1522, if it was originally 1496.
> So the code adds 26 extra octets, and only 4 of those are legitimate (a tag).
> The rest is absolutely unexplained, which means that until there is a
> valid explanation for them:

Indeed only 4 of them are needed, I tested to add 4 bytes on the tail
for > 1496 and it works.

I'll send a new version.

However that its "tag" is bogus since the extra tail isn't needed before
the paket becomes 1496 bytes, i.e. 1500 bytes including the tag.
It has a logic to it but ... yeah. All I can think of is bad VHDL in the
switch.

Yours,
Linus Walleij