]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: Make P/Q/R/S learn MAC addresses
authorVladimir Oltean <olteanv@gmail.com>
Tue, 25 Jun 2019 23:39:37 +0000 (02:39 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Jun 2019 18:03:21 +0000 (11:03 -0700)
commit7ad87166cda7c90a27da99d4eab1fe2a803cd11f
tree05937953a4fb5e729ed2d292c3cbd0c3a927e635
parent5a5df410c7da90ed8502cd234190e2e3723e1eb4
net: dsa: sja1105: Make P/Q/R/S learn MAC addresses

At the end of the commit 213b8d559f76 ("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: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/dsa/sja1105/sja1105_static_config.c
drivers/net/dsa/sja1105/sja1105_static_config.h