On Wed, Dec 02, 2020 at 10:13:54AM +0100, Tobias Waldekranz wrote:
> +static int dsa_slave_check_lag_upper(struct net_device *dev)
> +{
> +     struct dsa_port *dp = dsa_slave_to_port(dev);
> +     struct dsa_switch_tree *dst = dp->ds->dst;
> +
> +     if (!dsa_lag_offloading(dst))
> +             return NOTIFY_DONE;
> +
> +     if (dsa_lag_by_dev(dst, dev))
> +             return NOTIFY_OK;
> +
> +     if (!dsa_lag_available(dst))
> +             return notifier_from_errno(-EBUSY);

If for any reason there are no LAGs available in hardware, I think this
should still return NOTIFY_OK and we should not reject it, just not
offload it.

Which is to say that I basically don't understand the point of the
PRECHANGEUPPER checks.

> +
> +     return NOTIFY_OK;
> +}

Reply via email to