1. 25 1月, 2020 1 次提交
  2. 20 1月, 2020 3 次提交
  3. 19 1月, 2020 1 次提交
  4. 15 1月, 2020 3 次提交
    • P
      mlxsw: spectrum: Wipe xstats.backlog of down ports · ca7609ff
      Petr Machata 提交于
      Per-port counter cache used by Qdiscs is updated periodically, unless the
      port is down. The fact that the cache is not updated for down ports is no
      problem for most counters, which are relative in nature. However, backlog
      is absolute in nature, and if there is a non-zero value in the cache around
      the time that the port goes down, that value just stays there. This value
      then leaks to offloaded Qdiscs that report non-zero backlog even if
      there (obviously) is no traffic.
      
      The HW does not keep backlog of a downed port, so do likewise: as the port
      goes down, wipe the backlog value from xstats.
      
      Fixes: 075ab8ad ("mlxsw: spectrum: Collect tclass related stats periodically")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca7609ff
    • I
      mlxsw: spectrum: Do not modify cloned SKBs during xmit · 2da51ce7
      Ido Schimmel 提交于
      The driver needs to prepend a Tx header to each packet it is
      transmitting. The header includes information such as the egress port
      and traffic class.
      
      The addition of the header requires the driver to modify the SKB's
      header and therefore it must not be shared. Otherwise, we risk hitting
      various race conditions.
      
      For example, when a packet is flooded (cloned) by the bridge driver to
      two switch ports swp1 and swp2:
      
      t0 - mlxsw_sp_port_xmit() is called for swp1. Tx header is prepended with
           swp1's port number
      t1 - mlxsw_sp_port_xmit() is called for swp2. Tx header is prepended with
           swp2's port number, overwriting swp1's port number
      t2 - The device processes data buffer from t0. Packet is transmitted via
           swp2
      t3 - The device processes data buffer from t1. Packet is transmitted via
           swp2
      
      Usually, the device is fast enough and transmits the packet before its
      Tx header is overwritten, but this is not the case in emulated
      environments.
      
      Fix this by making sure the SKB's header is writable by calling
      skb_cow_head(). Since the function ensures we have headroom to push the
      Tx header, the check further in the function can be removed.
      
      v2:
      * Use skb_cow_head() instead of skb_unshare() as suggested by Jakub
      * Remove unnecessary check regarding headroom
      
      Fixes: 56ade8fe ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reported-by: NShalom Toledo <shalomt@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2da51ce7
    • I
      mlxsw: spectrum: Do not enforce same firmware version for multiple ASICs · d58c35ca
      Ido Schimmel 提交于
      In commit a72afb68 ("mlxsw: Enforce firmware version for
      Spectrum-2") I added a required firmware version for Spectrum-2, but
      missed the fact that mlxsw_sp2_init() is used by both Spectrum-2 and
      Spectrum-3. This means that the same firmware version will be used for
      both, which is wrong.
      
      Fix this by creating a new init() callback for Spectrum-3.
      
      Fixes: a72afb68 ("mlxsw: Enforce firmware version for Spectrum-2")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Tested-by: NShalom Toledo <shalomt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58c35ca
  5. 10 1月, 2020 2 次提交
  6. 07 1月, 2020 4 次提交
  7. 30 12月, 2019 1 次提交
  8. 19 12月, 2019 2 次提交
  9. 13 11月, 2019 1 次提交
  10. 08 11月, 2019 4 次提交
  11. 01 11月, 2019 13 次提交
  12. 31 10月, 2019 2 次提交
  13. 19 10月, 2019 1 次提交
  14. 16 10月, 2019 1 次提交
  15. 07 10月, 2019 1 次提交