]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: ocelot: request DSA to fix up lack of address learning on CPU port
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 6 Jan 2021 09:51:36 +0000 (11:51 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 23:34:46 +0000 (15:34 -0800)
commit0aa8dcad9065b317dea58bf4c9c91e8b9b61b203
tree20804db87f2a25abc0a6b7b5086bc16a8a357fd9
parent3b99041ede273f0495532c3a7adff67ed0ad4971
net: dsa: ocelot: request DSA to fix up lack of address learning on CPU port

Given the following setup:

ip link add br0 type bridge
ip link set eno0 master br0
ip link set swp0 master br0
ip link set swp1 master br0
ip link set swp2 master br0
ip link set swp3 master br0

Currently, packets received on a DSA slave interface (such as swp0)
which should be routed by the software bridge towards a non-switch port
(such as eno0) are also flooded towards the other switch ports (swp1,
swp2, swp3) because the destination is unknown to the hardware switch.

This patch addresses the issue by monitoring the addresses learnt by the
software bridge on eno0, and adding/deleting them as static FDB entries
on the CPU port accordingly.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c