1. 19 Mar, 2021 37 commits
  2. 18 Mar, 2021 3 commits
    • David S. Miller's avatar
      Merge branch 'mv88e6xxx-offload-bridge-flags' · d7417ee9
      David S. Miller authored
      Tobias Waldekranz says:
      
      ====================
      net: dsa: mv88e6xxx: Offload bridge port flags
      
      Add support for offloading learning and broadcast flooding flags. With
      this in place, mv88e6xx supports offloading of all bridge port flags
      that are currently supported by the bridge.
      
      Broadcast flooding is somewhat awkward to control as there is no
      per-port bit for this like there is for unknown unicast and unknown
      multicast. Instead we have to update the ATU entry for the broadcast
      address for all currently used FIDs.
      
      v2 -> v3:
        - Only return a netdev from dsa_port_to_bridge_port if the port is
          currently bridged (Vladimir & Florian)
      
      v1 -> v2:
        - Ensure that mv88e6xxx_vtu_get handles VID 0 (Vladimir)
        - Fixed off-by-one in mv88e6xxx_port_set_assoc_vector (Vladimir)
        - Fast age all entries on port when disabling learning (Vladimir)
        - Correctly detect bridge flags on LAG ports (Vladimir)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7417ee9
    • Tobias Waldekranz's avatar
      net: dsa: mv88e6xxx: Offload bridge broadcast flooding flag · 8d1d8298
      Tobias Waldekranz authored
      These switches have two modes of classifying broadcast:
      
      1. Broadcast is multicast.
      2. Broadcast is its own unique thing that is always flooded
         everywhere.
      
      This driver uses the first option, making sure to load the broadcast
      address into all active databases. Because of this, we can support
      per-port broadcast flooding by (1) making sure to only set the subset
      of ports that have it enabled whenever joining a new bridge or VLAN,
      and (2) by updating all active databases whenever the setting is
      changed on a port.
      Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d1d8298
    • Tobias Waldekranz's avatar
      net: dsa: mv88e6xxx: Offload bridge learning flag · 041bd545
      Tobias Waldekranz authored
      Allow a user to control automatic learning per port.
      
      Many chips have an explicit "LearningDisable"-bit that can be used for
      this, but we opt for setting/clearing the PAV instead, as it works on
      all devices at least as far back as 6083.
      Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
      Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      041bd545