On Wed, Dec 02, 2020 at 10:13:54AM +0100, Tobias Waldekranz wrote: > +static inline bool dsa_lag_offloading(struct dsa_switch_tree *dst) > +{ > + return dst->lags.num > 0; > +}
You assume that the DSA switch, when it sets a non-zero number of LAGs, can offload any type of LAG TX type, when in fact the switch might be able to offload just NETDEV_LAG_TX_TYPE_HASH. I like the fact that we revert to a software-based implementation for features the hardware can't offload. So rejecting other TX types is out of the question. However we still have to prevent hardware bridging. Should we add an array of supported TX types that the switch port can offload, and that should be checked by DSA in dsa_lag_offloading?