Re: [PATCH net-next] dsa: Make offloading optional on per port basis

From: Vladimir Oltean
Date: Mon Dec 02 2024 - 04:45:22 EST


On Mon, Dec 02, 2024 at 10:27:25AM +0100, Jiri Pirko wrote:
> Why is this DSA specific? Plus, you say you want to disable offloading
> in general (DSA_FLAG_OFFLOADING_DISABLED), but you check the flag only
> when joining bridge. I mean, shouldn't this be rather something exposed
> by some common UAPI?

I agree with this. The proposed functionality isn't DSA specific, and
thus, the UAPI to configure it shouldn't be made so.

> Btw, isn't NETIF_F_HW_L2FW_DOFFLOAD what you are looking for?

Is it? macvlan uses NETIF_F_HW_L2FW_DOFFLOAD to detect presence of
netdev_ops->ndo_dfwd_add_station(). Having to even consider macvlan
offload and its implications just because somebody decided to monopolize
the "l2-fwd-offload" name seems at least bizarre in my opinion.