]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: felix: program host FDB entries towards PGID_CPU for tag_8021q too
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 11 May 2022 09:50:13 +0000 (12:50 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 May 2022 23:38:38 +0000 (16:38 -0700)
commit1de5912542dcd1e12bcde8c722866bf4e50566a2
treec448f07ed73ce0e2a0a6d05a3f2e1b4c30dd08c3
parent4eedca1766728fb01ec48b17880aba67bc76459e
net: dsa: felix: program host FDB entries towards PGID_CPU for tag_8021q too

I remembered why we had the host FDB migration procedure in place.

It is true that host FDB entry migration can be done by changing the
value of PGID_CPU, but the problem is that only host FDB entries learned
while operating in NPI mode go to PGID_CPU. When the CPU port operates
in tag_8021q mode, the FDB entries are learned towards the unicast PGID
equal to the physical port number of this CPU port, bypassing the
PGID_CPU indirection.

So host FDB entries learned in tag_8021q mode are not migrated any
longer towards the NPI port.

Fix this by extracting the NPI port -> PGID_CPU redirection from the
ocelot switch lib, moving it to the Felix DSA driver, and applying it
for any CPU port regardless of its kind (NPI or tag_8021q).

Fixes: 4aa9eaa4d709 ("net: dsa: felix: stop migrating FDBs back and forth on tag proto change")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c
drivers/net/ethernet/mscc/ocelot.c