1. 28 Jan, 2016 3 commits
    • Ido Schimmel's avatar
      mlxsw: spectrum: Flush FDB when leaving bridge · 039c49a6
      Ido Schimmel authored
      As explained in previous commit, we should always take care of flushing
      the FDB in the driver and not rely on bridge code.
      
      We need to distinguish between two cases with regards to LAG:
      
      1) Port is leaving LAG while LAG is bridged (or VLAN devices on top of
      it). In this case don't flush the FDB entries pointing to the LAG ID, as
      this will affect other ports still member in the LAG. Only flush the FDB
      when the last port in the LAG is leaving the bridge.
      
      2) LAG device is leaving the bridge. In this case the CHANGEUPPER event
      is simply propagated to each member port, so make each port flush the
      FDB in its turn.
      
      Note that emptying a bridged LAG from ports creates an inconsistency
      between hardware and software. A user who later (< ageing_time)
      re-populates the LAG won't have any FDB entries pointing to the LAG ID
      in hardware, but they will be present in the software bridge's FDB.
      Currently there is no good solution to this problem, but this will be
      addressed by us in the future.
      
      In order to optimize the flushing process, flush by port or LAG ID if
      there are no VLAN interfaces on top of the port. Otherwise, flush using
      (Port / LAG ID, FID=VID} for each of the lower 4K FIDs. In the case of
      VLAN device simply flush using {Port / LAG ID, vFID} with the vFID to
      which the VLAN device is mapped to.
      
      Fixes: 56ade8fe ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      039c49a6
    • Ido Schimmel's avatar
      mlxsw: reg: Add the Switch Filtering DB Flush register · 41933271
      Ido Schimmel authored
      When removing a net device from a bridge we should flush the FDB entries
      associated with this net device. Up until now, we relied upon bridge
      code to do that for us, but it is possible for user to prevent hardware
      from syncing with the software bridge (learning_sync=0), so we need to
      flush overselves.
      
      Add the Switch Filtering DB Flush (SFDF) register that is used to flush
      FDB entries according to different parameters (per-port, per-FID etc).
      
      Fixes: 56ade8fe ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41933271
    • Ido Schimmel's avatar
      mlxsw: spectrum: Handle port leaving LAG while bridged · 4dc236c3
      Ido Schimmel authored
      It is possible for a user to remove a port from a LAG device, while the
      LAG device or VLAN devices on top of it are bridged. In these cases,
      bridge's teardown sequence is never issued, so we need to take care of
      it ourselves.
      
      When LAG's unlinking event is received by port netdev:
      
      1) Traverse its vPorts list and make those member in a bridge leave it.
         They will be deleted later by LAG code.
      
      2) Make the port netdev itself leave its bridge if member in one.
      
      Fixes: 0d65fc13 ("mlxsw: spectrum: Implement LAG port join/leave")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4dc236c3
  2. 26 Jan, 2016 1 commit
  3. 25 Jan, 2016 17 commits
  4. 21 Jan, 2016 19 commits