• Vladimir Oltean's avatar
    net: dsa: sja1105: Back up static FDB entries in kernel memory · 60f6053f
    Vladimir Oltean authored
    After commit 8456721d ("net: dsa: sja1105: Add support for
    configuring address ageing time"), we started to reset the switch rather
    often (each time the bridge core changes the ageing time on a switch
    port).
    
    The unfortunate reality is that SJA1105 doesn't have any {cold, warm,
    whatever} reset mode in which it accepts a new configuration stream
    without flushing the FDB.  Instead, in its world, the FDB *is* an
    optional part of the static configuration.
    
    So we play its game, and do what we also do for VLANs: for each 'bridge
    fdb' command, we add the FDB entry through the dynamic interface, and we
    append the in-kernel static config memory with info that we're going to
    use later, when the next reset command is going to be issued.
    
    The result is that 'bridge fdb' commands are now persistent (dynamically
    learned entries are lost, but that's ok).
    Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    60f6053f
sja1105_main.c 59.9 KB