Subject: Re: [PATCH net-next v4 11/11] net: dsa: realtek: rtl8365mb: multiple cpu ports, non cpu extint

From: Alvin Šipraga <[email-masked]>
Date: Tue, 18 Jan 2022 10:13:46 +0000

Luiz Angelo Daros de Luca <[email-masked]> writes:

>> the problem is checksum offloading on the gmac (soc-side)
>
> I suggested it might be checksum problem because I'm also affected. In
> my case, I have an mt7620a SoC connected to the rtl8367s switch. The
> OS offloads checksum to HW but the mt7620a cannot calculate the
> checksum with the (EtherType) Realtek CPU Tag in place. I'll try to
> move the CPU tag to test if the mt7620a will then digest the frame
> correctly.

You have two choices:

    enum rtl8365mb_cpu_position {
            RTL8365MB_CPU_POS_AFTER_SA = 0,
            RTL8365MB_CPU_POS_BEFORE_CRC = 1,
    };

I hardcoded it to AFTER_SA but if you find that this solves the problem
for some MACs then it might be worth adding a device tree property for
this to make it configurable. Of course remember to keep it
backward-compatible, and add a note to future travellers in the bindings
that this might solve checksum errors :-)

Kind regards,
Alvin