• Vladimir Oltean's avatar
    net: bridge: vlan: don't notify to switchdev master VLANs without BRENTRY flag · 3116ad06
    Vladimir Oltean authored
    When a VLAN is added to a bridge port and it doesn't exist on the bridge
    device yet, it gets created for the multicast context, but it is
    'hidden', since it doesn't have the BRENTRY flag yet:
    
    ip link add br0 type bridge && ip link set swp0 master br0
    bridge vlan add dev swp0 vid 100 # the master VLAN 100 gets created
    bridge vlan add dev br0 vid 100 self # that VLAN becomes brentry just now
    
    All switchdev drivers ignore switchdev notifiers for VLAN entries which
    have the BRENTRY unset, and for good reason: these are merely private
    data structures used by the bridge driver. So we might just as well not
    notify those at all.
    
    Cleanup in the switchdev drivers that check for the BRENTRY flag is now
    possible, and will be handled separately, since those checks just became
    dead code.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3116ad06
br_vlan.c 53.1 KB