]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: felix: use PGID_CPU for FDB entry migration on NPI port
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 5 May 2022 16:22:10 +0000 (19:22 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 May 2022 04:00:11 +0000 (21:00 -0700)
commit08b4ffcb16fe0481921f1e8f25cef3d4ec05244b
treec71e50c8373d6aa45d4243ae77888c7299a3d4cd
parent03551d69c8b94163bb8b17b18668ed02b63a8f17
net: dsa: felix: use PGID_CPU for FDB entry migration on NPI port

ocelot_fdb_add() redirects FDB entries installed on the NPI port towards
the special reserved PGID_CPU used for host-filtered addresses. PGID_CPU
contains BIT(ocelot->num_phys_ports) in the destination port mask, which
is code name for the CPU port module.

Whereas felix_migrate_fdbs_to_*_port() uses the ocelot->num_phys_ports
PGID directly, and it appears that this works too. Even if this PGID is
set to zero, apparently its number is special and packets still reach
the CPU port module.

Nonetheless, in the end, these addresses end up in the same place
regardless of whether they go through an extra indirection layer or not.
Use PGID_CPU across to have more uniformity.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c