• Vladimir Oltean's avatar
    net: dsa: sja1105: Make P/Q/R/S learn MAC addresses · 6c56e167
    Vladimir Oltean authored
    At the end of the commit 1da73821 ("net: dsa: sja1105: Add FDB
    operations for P/Q/R/S series") message, I said that:
    
        At the moment only FDB entries installed statically through 'bridge fdb'
        are visible in the dump callback - the dynamically learned ones are
        still under investigation.
    
    It looks like the reason why they were not visible in 'bridge fdb' was
    that they were never learned - always flooded.
    
    SJA1105 P/Q/R/S manual says about the MAXADDRP[port] field:
    
        Specify the maximum number of MAC address dynamically learned from
        the respective port. It is used to limit the number of learned MAC
        addresses per port.
    
    It looks like not providing a value in the static config (aka providing
    zeroes) is enough for it to not store the learned addresses in the FDB.
    
    For now we divide the 1024 entry FDB "equally" amongst the 5 ports. This
    may be revisited if the situation calls for that - for now I'm happy
    that learning works.
    Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6c56e167
sja1105_static_config.c 39.6 KB