• Vladimir Oltean's avatar
    net: dsa: Give drivers the chance to veto certain upper devices · e358bef7
    Vladimir Oltean authored
    Some switches rely on unique pvids to ensure port separation in
    standalone mode, because they don't have a port forwarding matrix
    configurable in hardware. So, setups like a group of 2 uppers with the
    same VLAN, swp0.100 and swp1.100, will cause traffic tagged with VLAN
    100 to be autonomously forwarded between these switch ports, in spite
    of there being no bridge between swp0 and swp1.
    
    These drivers need to prevent this from happening. They need to have
    VLAN filtering enabled in standalone mode (so they'll drop frames tagged
    with unknown VLANs) and they can only accept an 8021q upper on a port as
    long as it isn't installed on any other port too. So give them the
    chance to veto bad user requests.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    [Kurt: Pass info instead of ptr]
    Signed-off-by: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    e358bef7
slave.c 55.6 KB