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

Vladimir Oltean
2022-01-21T02:06:33Z

On Thu, Jan 20, 2022 at 08:35:54PM -0300, Luiz Angelo Daros de Luca wrote:
> > And what is the problem if the hardware cannot calculate the checksum
> > with an unknown EtherType? Is it the DSA master that drops the packets
> > in hardware? What is the reported error counter?
>
> No, the issue is with outgoing packets and nothing is dropped inside
> the DSA device.

Ah, sorry, I missed that.

> If the OS is configured to offload (I'm using OpenWrt.), it will send
> a packet with the wrong checksum expecting that the HW will fix that.
> After DSA is brought up, the OS is still expecting the HW to calculate
> the checksums. However, with the EtherType DSA tag from a , it cannot
> understand it anymore, leaving the checksum as is. The DSA switch
> (Realtek) passes the packet to the network and the other end receives
> a broken packet. Maybe if the DSA knew that the CPU Ethernet HW cannot
> handle that DSA tag, it could disable checksums by default. But it is
> difficult to foresee how each offload HW will digest each type of CPU
> tag.
>
> Is the kernel enabling checksum by default when the driver reports it
> is supported? If so, it would be nice to somehow disable offloading
> with some kind of device-tree dsa cpu port property.

:) device tree properties are not the fix for everything!

I think I know what the problem is. But I'd need to know what the driver
for the DSA master is, to confirm. To be precise, what I'd like to check
is the value of master->vlan_features.