• Vladimir Oltean's avatar
    net: dsa: existing DSA masters cannot join upper interfaces · 4f03dcc6
    Vladimir Oltean authored
    All the traffic to/from a DSA master is supposed to be distributed among
    its DSA switch upper interfaces, so we should not allow other upper
    device kinds.
    
    An exception to this is DSA_TAG_PROTO_NONE (switches with no DSA tags),
    and in that case it is actually expected to create e.g. VLAN interfaces
    on the master. But for those, netdev_uses_dsa(master) returns false, so
    the restriction doesn't apply.
    
    The motivation for this change is to allow LAG interfaces of DSA masters
    to be DSA masters themselves. We want to restrict the user's degrees of
    freedom by 1: the LAG should already have all DSA masters as lowers, and
    while lower ports of the LAG can be removed, none can be added after the
    fact.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    4f03dcc6
slave.c 78.4 KB