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

Luiz Angelo Daros de Luca
2022-01-20T23:36:07Z

> 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.

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.

Regards,

Luiz