• Vladimir Oltean's avatar
    net: bridge: add helper to replay port and local fdb entries · 04846f90
    Vladimir Oltean authored
    When a switchdev port starts offloading a LAG that is already in a
    bridge and has an FDB entry pointing to it:
    
    ip link set bond0 master br0
    bridge fdb add dev bond0 00:01:02:03:04:05 master static
    ip link set swp0 master bond0
    
    the switchdev driver will have no idea that this FDB entry is there,
    because it missed the switchdev event emitted at its creation.
    
    Ido Schimmel pointed this out during a discussion about challenges with
    switchdev offloading of stacked interfaces between the physical port and
    the bridge, and recommended to just catch that condition and deny the
    CHANGEUPPER event:
    https://lore.kernel.org/netdev/20210210105949.GB287766@shredder.lan/
    
    But in fact, we might need to deal with the hard thing anyway, which is
    to replay all FDB addresses relevant to this port, because it isn't just
    static FDB entries, but also local addresses (ones that are not
    forwarded but terminated by the bridge). There, we can't just say 'oh
    yeah, there wa...
    04846f90
br_fdb.c 33.6 KB