1. 11 4月, 2019 1 次提交
    • I
      mlxsw: spectrum_buffers: Add a multicast pool for Spectrum-2 · d5949d92
      Ido Schimmel 提交于
      In Spectrum-1, when a multicast packet is admitted to the shared buffer
      it increases the quotas of all the ports and {port, TC} to which it is
      forwarded to.
      
      The above means that multicast packets are accounted multiple times in
      the shared buffer and can therefore cause the associated shared buffer
      pool to fill up very quickly.
      
      To work around this issue, commit e83c045e ("mlxsw:
      spectrum_buffers: Configure MC pool") added a dedicated multicast pool
      in which multicast packets are accounted.
      
      The issue is not present in Spectrum-2, but in order to be backward
      compatible with Spectrum-1, its default behavior is to allow a multicast
      packet to increase multiple egress quotas instead of one.
      
      Until the new (non-backward compatible) mode is supported, configure a
      dedicated multicast pool as in Spectrum-1.
      
      Fixes: fe099bf6 ("mlxsw: spectrum_buffers: Add Spectrum-2 shared buffer configuration")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d5949d92
  2. 22 2月, 2019 10 次提交
  3. 04 2月, 2019 1 次提交
  4. 20 9月, 2018 9 次提交
  5. 05 9月, 2018 1 次提交
    • P
      mlxsw: spectrum_buffers: Set up a dedicated pool for BUM traffic · 3a3539cd
      Petr Machata 提交于
      MC-aware mode was recently enabled by mlxsw on Spectrum switches in
      commit 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw
      ports"). Unfortunately, testing has shown that the fix is incomplete and
      in the presented form actually makes the problem even worse, because any
      amount of MC traffic causes UC disruption.
      
      The reason for this is that currently, mlxsw configures the MC-specific
      TCs (8..15) to map to pool 0. It also configures a maximum buffer size
      of 0, but for MC traffic that maximum is disregarded and not part of the
      quota. Therefore MC traffic is always admitted to the egress buffer.
      
      Fix the configuration by directing the MC TCs into pool 15, which is
      dedicated to MC traffic and recognized as such by the silicon.
      
      Fixes: 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a3539cd
  6. 10 8月, 2018 1 次提交
  7. 18 3月, 2018 1 次提交
  8. 18 5月, 2017 1 次提交
  9. 25 3月, 2017 3 次提交
  10. 30 11月, 2016 1 次提交
    • I
      mlxsw: spectrum_buffers: Limit size of pools · 87259f18
      Ido Schimmel 提交于
      The shared buffer pools are containers whose size is used to calculate
      the maximum usage for packets from / to a specific port / {port, PG/TC},
      when dynamic threshold is employed.
      
      While it's perfectly fine for the sum of the pools to exceed the maximum
      size of the shared buffer, a single pool cannot.
      
      Add a check when the pool size is set and forbid sizes larger than the
      maximum size of the shared buffer.
      
      Without the patch:
      $ devlink sb pool set pci/0000:03:00.0 pool 0 size 999999999 thtype
      dynamic
      // No error is returned
      
      With the patch:
      $ devlink sb pool set pci/0000:03:00.0 pool 0 size 999999999 thtype
      dynamic
      devlink answers: Invalid argument
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87259f18
  11. 20 9月, 2016 1 次提交
    • I
      mlxsw: spectrum: Fix sparse warnings · 1a9234e6
      Ido Schimmel 提交于
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:251:28: warning: symbol
      'mlxsw_sp_span_entry_find' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:265:28: warning: symbol
      'mlxsw_sp_span_entry_get' was not declared. Should it be static?
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56: warning: mixing
      different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56:     int enum
      mlxsw_sp_span_type  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum.c:367:56:     int enum
      mlxsw_reg_mpar_i_e
      ...
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32: warning:
      mixing different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32:     int
      enum mlxsw_reg_sbxx_dir  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:598:32:     int
      enum devlink_sb_pool_type
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39: warning:
      mixing different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39:     int
      enum mlxsw_reg_sbpr_mode  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum_buffers.c:600:39:     int
      enum devlink_sb_threshold_type
      ...
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54: warning:
      mixing different enum types
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54:     int
      enum mlxsw_sp_l3proto  versus
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:255:54:     int
      enum mlxsw_reg_ralxx_protocol
      ...
      drivers/net/ethernet/mellanox/mlxsw//spectrum_router.c:1749:6: warning:
      symbol 'mlxsw_sp_fib_entry_put' was not declared. Should it be static?
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a9234e6
  12. 20 8月, 2016 1 次提交
  13. 18 8月, 2016 1 次提交
    • I
      mlxsw: spectrum: Allow packets to be trapped from any PG · 9ffcc372
      Ido Schimmel 提交于
      When packets enter the device they are classified to a priority group
      (PG) buffer based on their PCP value. After their egress port and
      traffic class are determined they are moved to the switch's shared
      buffer and await transmission, if:
      
      (Ingress{Port}.Usage < Thres && Ingress{Port,PG}.Usage < Thres &&
       Egress{Port}.Usage < Thres && Egress{Port,TC}.Usage < Thres)
      ||
      (Ingress{Port}.Usage < Min || Ingress{Port,PG} < Min ||
       Egress{Port}.Usage < Min || Egress{Port,TC}.Usage < Min)
      
      Packets scheduled to transmission through CPU port (trapped to CPU) use
      traffic class 7, which has a zero maximum and minimum quotas. However,
      when such packets arrive from PG 0 they are admitted to the shared
      buffer as PG 0 has a non-zero minimum quota.
      
      Allow all packets to be trapped to the CPU - regardless of the PG they
      were classified to - by assigning a 10KB minimum quota for CPU port and
      TC7.
      
      Fixes: 8e8dfe9f ("mlxsw: spectrum: Add IEEE 802.1Qaz ETS support")
      Reported-by: NTamir Winetroub <tamirw@mellanox.com>
      Tested-by: NTamir Winetroub <tamirw@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ffcc372
  14. 16 7月, 2016 1 次提交
    • I
      mlxsw: spectrum: Prevent invalid ingress buffer mapping · 11719a58
      Ido Schimmel 提交于
      Packets entering the switch are mapped to a Switch Priority (SP)
      according to their PCP value (untagged frames are mapped to SP 0).
      
      The packets are classified to a priority group (PG) buffer in the port's
      headroom according to their SP.
      
      The switch maintains another mapping (SP to IEEE priority), which is
      used to generate PFC frames for lossless PGs. This mapping is
      initialized to IEEE = SP % 8.
      
      Therefore, when mapping SP 'x' to PG 'y' we create a situation in which
      an IEEE priority is mapped to two different PGs:
      
      IEEE 'x' ---> SP 'x' ---> PG 'y'
      IEEE 'x' ---> SP 'x + 8' ---> PG '0' (default)
      
      Which is invalid, as a flow can use only one PG buffer.
      
      Fix this by mapping both SP 'x' and 'x + 8' to the same PG buffer.
      
      Fixes: 8e8dfe9f ("mlxsw: spectrum: Add IEEE 802.1Qaz ETS support")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11719a58
  15. 16 4月, 2016 2 次提交
  16. 15 4月, 2016 5 次提交