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

Vladimir Oltean
2022-01-25T09:52:16Z

Hi Luiz,

On Tue, Jan 25, 2022 at 04:15:23AM -0300, Luiz Angelo Daros de Luca wrote:
> I believe that those drivers with NETIF_F_HW_CSUM are fine for every
> type of DSA, right? So, just those with NETIF_F_IP_CSUM |
> NETIF_F_IPV6_CSUM set needs to be adjusted. A fully implemented
> ndo_features_check() will work but improving it for every driver will
> add extra code/overhead for all packets, used with DSA or not. And
> that extra code needed for DSA will either always keep or remove the
> same features for a given slave.

Could you implement a prototype of packet parsing in ndo_features_check,
which checks for the known DSA EtherType and clears the offload bit for
unsupported packets, and do some performance testing before and after,
to lean the argument in your favor with some numbers? I've no problem if
you test for the worst case, i.e. line rate with small UDP packets
encapsulated with the known (offload-capable) DSA tag format, where
there is little benefit for offloading TX checksumming.