1. 22 4月, 2019 1 次提交
  2. 19 4月, 2019 2 次提交
    • A
      mlxsw: spectrum: Fix autoneg status in ethtool · 151f0ddd
      Amit Cohen 提交于
      If link is down and autoneg is set to on/off, the status in ethtool does
      not change.
      
      The reason is when the link is down the function returns with zero
      before changing autoneg value.
      
      Move the checking of link state (up/down) to be performed after setting
      autoneg value, in order to be sure that autoneg will change in any case.
      
      Fixes: 56ade8fe ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
      Signed-off-by: NAmit Cohen <amitc@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      151f0ddd
    • P
      mlxsw: spectrum: Put MC TCs into DWRR mode · f476b3f8
      Petr Machata 提交于
      Both Spectrum-1 and Spectrum-2 chips are currently configured such that
      pairs of TC n (which is used for UC traffic) and TC n+8 (which is used
      for MC traffic) are feeding into the same subgroup. Strict
      prioritization is configured between the two TCs, and by enabling
      MC-aware mode on the switch, the lower-numbered (UC) TCs are favored
      over the higher-numbered (MC) TCs.
      
      On Spectrum-2 however, there is an issue in configuration of the
      MC-aware mode. As a result, MC traffic is prioritized over UC traffic.
      To work around the issue, configure the MC TCs with DWRR mode (while
      keeping the UC TCs in strict mode).
      
      With this patch, the multicast-unicast arbitration results in the same
      behavior on both Spectrum-1 and Spectrum-2 chips.
      
      Fixes: 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f476b3f8
  3. 05 4月, 2019 2 次提交
  4. 29 3月, 2019 2 次提交
  5. 25 3月, 2019 1 次提交
  6. 04 3月, 2019 1 次提交
  7. 28 2月, 2019 1 次提交
  8. 27 2月, 2019 1 次提交
  9. 24 2月, 2019 8 次提交
  10. 22 2月, 2019 2 次提交
  11. 19 2月, 2019 1 次提交
  12. 18 2月, 2019 1 次提交
  13. 14 2月, 2019 1 次提交
  14. 13 2月, 2019 1 次提交
  15. 09 2月, 2019 1 次提交
  16. 07 2月, 2019 1 次提交
  17. 21 1月, 2019 1 次提交
  18. 09 1月, 2019 1 次提交
  19. 25 12月, 2018 1 次提交
  20. 21 12月, 2018 7 次提交
  21. 20 12月, 2018 3 次提交
    • I
      mlxsw: spectrum_router: Make RIF deletion more robust · 965fa8e6
      Ido Schimmel 提交于
      In the past we had multiple instances where RIFs were not properly
      deleted.
      
      One of the reasons for leaking a RIF was that at the time when IP
      addresses were flushed from the respective netdev (prompting the
      destruction of the RIF), the netdev was no longer a mlxsw upper. This
      caused the inet{,6}addr notification blocks to ignore the NETDEV_DOWN
      event and leak the RIF.
      
      Instead of checking whether the netdev is our upper when an IP address
      is removed, we can instead check if the netdev has a RIF configured.
      
      To look up a RIF we need to access mlxsw private data, so the patch
      stores the notification blocks inside a mlxsw struct. This then allows
      us to use container_of() and extract the required private data.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      965fa8e6
    • I
      mlxsw: spectrum: Properly cleanup LAG uppers when removing port from LAG · be2d6f42
      Ido Schimmel 提交于
      When a LAG device or a VLAN device on top of it is enslaved to a bridge,
      the driver propagates the CHANGEUPPER event to the LAG's slaves.
      
      This causes each physical port to increase the reference count of the
      internal representation of the bridge port by calling
      mlxsw_sp_port_bridge_join().
      
      However, when a port is removed from a LAG, the corresponding leave()
      function is not called and the reference count is not decremented. This
      leads to ugly hacks such as mlxsw_sp_bridge_port_should_destroy() that
      try to understand if the bridge port should be destroyed even when its
      reference count is not 0.
      
      Instead, make sure that when a port is unlinked from a LAG it would see
      the same events as if the LAG (or its uppers) were unlinked from a
      bridge.
      
      The above is achieved by walking the LAG's uppers when a port is
      unlinked and calling mlxsw_sp_port_bridge_leave() for each upper that is
      enslaved to a bridge.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be2d6f42
    • I
      mlxsw: spectrum: Remove reference count from VLAN entries · 635c8c8b
      Ido Schimmel 提交于
      Commit b3529af6 ("spectrum: Reference count VLAN entries") started
      reference counting port-VLAN entries in a similar fashion to the 8021q
      driver.
      
      However, this is not actually needed and only complicates things.
      Instead, the driver should forbid the creation of a VLAN on a port if
      this VLAN already exists. This would also solve the issue fixed by the
      mentioned commit.
      
      Therefore, remove the get()/put() API and use create()/destroy()
      instead.
      
      One place that needs special attention is VLAN addition in a VLAN-aware
      bridge via switchdev operations. In case the VLAN flags (e.g., 'pvid')
      are toggled, then the VLAN entry already exists. To prevent the driver
      from wrongly returning EEXIST, the driver is changed to check in the
      prepare phase whether the entry already exists and only returns an error
      in case it is not associated with the correct bridge port.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      635c8c8b