1. 09 May, 2022 7 commits
  2. 08 May, 2022 19 commits
  3. 07 May, 2022 5 commits
    • Jakub Kicinski's avatar
      Merge branch 'simplify-migration-of-host-filtered-addresses-in-felix-driver' · 8fc0b699
      Jakub Kicinski authored
      Vladimir Oltean says:
      
      ====================
      Simplify migration of host filtered addresses in Felix driver
      
      The purpose of this patch set is to remove the functions
      dsa_port_walk_fdbs() and dsa_port_walk_mdbs() from the DSA core, which
      were introduced when the Felix driver gained support for unicast
      filtering on standalone ports. They get called when changing the tagging
      protocol back and forth between "ocelot" and "ocelot-8021q".
      I did not realize we could get away without having them.
      
      The patch set was regression-tested using the local_termination.sh
      selftest using both tagging protocols.
      ====================
      
      Link: https://lore.kernel.org/r/20220505162213.307684-1-vladimir.oltean@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      8fc0b699
    • Vladimir Oltean's avatar
      net: dsa: delete dsa_port_walk_{fdbs,mdbs} · fe5233b0
      Vladimir Oltean authored
      All the users of these functions are gone, delete them before they gain
      new ones.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      fe5233b0
    • Vladimir Oltean's avatar
      net: dsa: felix: perform MDB migration based on ocelot->multicast list · 28de0f9f
      Vladimir Oltean authored
      The felix driver is the only user of dsa_port_walk_mdbs(), and there
      isn't even a good reason for it, considering that the host MDB entries
      are already saved by the ocelot switch lib in the ocelot->multicast list.
      
      Rewrite the multicast entry migration procedure around the
      ocelot->multicast list so we can delete dsa_port_walk_mdbs().
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      28de0f9f
    • Vladimir Oltean's avatar
      net: dsa: felix: stop migrating FDBs back and forth on tag proto change · a51c1c3f
      Vladimir Oltean authored
      I just realized we don't need to migrate the host-filtered FDB entries
      when the tagging protocol changes from "ocelot" to "ocelot-8021q".
      
      Host-filtered addresses are learned towards the PGID_CPU "multicast"
      port group, reserved by software, which contains BIT(ocelot->num_phys_ports).
      That is the "special" port entry in the analyzer block for the CPU port
      module.
      
      In "ocelot" mode, the CPU port module's packets are redirected to the
      NPI port.
      
      In "ocelot-8021q" mode, felix_8021q_cpu_port_init() does something funny
      anyway, and changes PGID_CPU to stop pointing at the CPU port module and
      start pointing at the physical port where the DSA master is attached.
      
      The fact that we can alter the destination of packets learned towards
      PGID_CPU without altering the MAC table entries themselves means that it
      is pointless to walk through the FDB entries, forget that they were
      learned towards PGID_CPU, and re-learn them towards the "unicast" PGID
      associated with the physical port connected to the DSA master. We can
      let the PGID_CPU value change simply alter the destination of the
      host-filtered unicast packets in one fell swoop.
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a51c1c3f
    • Vladimir Oltean's avatar
      net: dsa: felix: use PGID_CPU for FDB entry migration on NPI port · 2c110abc
      Vladimir Oltean authored
      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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2c110abc
  4. 06 May, 2022 9 commits