diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-06-26 02:39:37 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-27 11:03:21 -0700 |
commit | 6c56e167cc1b60f69a265ead1ef7f413f0e2ed64 (patch) | |
tree | 05937953a4fb5e729ed2d292c3cbd0c3a927e635 /drivers/net/dsa/sja1105/sja1105_static_config.c | |
parent | 0803948e23dac864374d981b06460b7350cca1b9 (diff) | |
download | blackbird-op-linux-6c56e167cc1b60f69a265ead1ef7f413f0e2ed64.tar.gz blackbird-op-linux-6c56e167cc1b60f69a265ead1ef7f413f0e2ed64.zip |
net: dsa: sja1105: Make P/Q/R/S learn MAC addresses
At the end of the commit 1da73821343c ("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>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_static_config.c')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_static_config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_static_config.c b/drivers/net/dsa/sja1105/sja1105_static_config.c index a1e9656c881c..b31c737dc560 100644 --- a/drivers/net/dsa/sja1105/sja1105_static_config.c +++ b/drivers/net/dsa/sja1105/sja1105_static_config.c @@ -230,7 +230,11 @@ sja1105pqrs_l2_lookup_params_entry_packing(void *buf, void *entry_ptr, { const size_t size = SJA1105PQRS_SIZE_L2_LOOKUP_PARAMS_ENTRY; struct sja1105_l2_lookup_params_entry *entry = entry_ptr; + int offset, i; + for (i = 0, offset = 58; i < 5; i++, offset += 11) + sja1105_packing(buf, &entry->maxaddrp[i], + offset + 10, offset + 0, size, op); sja1105_packing(buf, &entry->maxage, 57, 43, size, op); sja1105_packing(buf, &entry->start_dynspc, 42, 33, size, op); sja1105_packing(buf, &entry->drpnolearn, 32, 28, size, op); |