1. 17 9月, 2020 3 次提交
    • P
      mlxsw: spectrum: Track priorities in struct mlxsw_sp_hdroom · 5df825ed
      Petr Machata 提交于
      The mapping from priorities to buffers determines which buffers should be
      configured. Lossiness of these priorities combined with the mapping
      determines whether a given buffer should be lossy.
      
      Currently this configuration is stored implicitly in DCB ETS, PFC and
      ethtool PAUSE configuration. Keeping it together with the rest of the
      headroom configuration and deriving it as needed from PFC / ETS / PAUSE
      will make things clearer. To that end, add a field "prios" to struct
      mlxsw_sp_hdroom.
      
      Previously, __mlxsw_sp_port_headroom_set() took prio_tc as an argument, and
      assumed that the same mapping as we use on the egress should be used on
      ingress as well. Instead, track this configuration at each priority, so
      that it can be adjusted flexibly.
      
      In the following patches, as dcbnl_setbuffer is implemented, it will need
      to store its own mapping, and it will also be sometimes necessary to revert
      back to the original ETS mapping. Therefore track two buffer indices: the
      one for chip configuration (buf_idx), and the source one (ets_buf_idx).
      Introduce a function to configure the chip-level buffer index, and for now
      have it simply copy the ETS mapping over to the chip mapping.
      
      Update the ETS handler to project prio_tc to the ets_buf_idx and invoke the
      buf_idx recomputation.
      
      Now that there is a canonical place to look for this configuration,
      mlxsw_sp_port_headroom_set() does not need to invent def_prio_tc to use if
      DCB is compiled out.
      Signed-off-by: NPetr Machata <petrm@nvidia.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5df825ed
    • P
      mlxsw: spectrum: Track MTU in struct mlxsw_sp_hdroom · 0103a3e4
      Petr Machata 提交于
      MTU influences sizes of auto-allocated buffers. Make it a part of port
      buffer configuration and have __mlxsw_sp_port_headroom_set() take it from
      there, instead of as an argument.
      Signed-off-by: NPetr Machata <petrm@nvidia.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0103a3e4
    • P
      mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom · 3a77f5a2
      Petr Machata 提交于
      The port headroom handling is currently strewn across several modules and
      tricky to follow: MTU, DCB PFC, DCB ETS and ethtool pause all influence the
      settings, and then there is the completely separate initial configuraion in
      spectrum_buffers. A following patch will implement the dcbnl_setbuffer
      callback, which is going to further complicate the landscape.
      
      In order to simplify work with port buffers, the following patches are
      going to centralize all port-buffer handling in spectrum_buffers. As a
      first step, introduce a (currently empty) struct mlxsw_sp_hdroom that will
      keep the configuration parameters, and allocate and free it in appropriate
      places.
      Signed-off-by: NPetr Machata <petrm@nvidia.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a77f5a2
  2. 23 6月, 2020 1 次提交
  3. 17 6月, 2020 1 次提交
  4. 25 5月, 2020 1 次提交
    • I
      mlxsw: spectrum_buffers: Assign non-zero quotas to TC 0 of the CPU port · e0d84847
      Ido Schimmel 提交于
      As explained in commit 9ffcc372 ("mlxsw: spectrum: Allow packets to
      be trapped from any PG"), incoming packets can be admitted to the shared
      buffer and forwarded / trapped, 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)
      
      Trapped packets are scheduled to transmission through the CPU port.
      Currently, the minimum and maximum quotas of traffic class (TC) 0 of the
      CPU port are 0, which means it is not usable.
      
      Assign non-zero quotas to TC 0 of the CPU port, so that it could be
      utilized by subsequent patches.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0d84847
  5. 01 11月, 2019 1 次提交
  6. 29 10月, 2019 1 次提交
  7. 24 10月, 2019 2 次提交
  8. 17 9月, 2019 2 次提交
  9. 31 7月, 2019 1 次提交
  10. 13 6月, 2019 1 次提交
  11. 23 4月, 2019 13 次提交
  12. 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
  13. 22 2月, 2019 10 次提交
  14. 04 2月, 2019 1 次提交
  15. 20 9月, 2018 1 次提交