1. 22 9月, 2018 25 次提交
  2. 21 9月, 2018 6 次提交
  3. 20 9月, 2018 9 次提交
    • D
      Merge branch 'mlxsw-Further-MC-awareness-configuration' · cab9572a
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Further MC-awareness configuration
      
      Petr says:
      
      Due to an issue in Spectrum chips, when unicast traffic shares the same
      queue as BUM traffic, and there is congestion, the BUM traffic is
      admitted to the queue anyway, thus pushing out all UC traffic. In order
      to give unicast traffic precedence over BUM traffic, multicast-aware
      mode is now configured on all ports. Under MC-aware mode, egress TCs
      8..15 are used for BUM traffic, which has its own dedicated pool.
      
      This patch set improves the way that the MC pool and the higher-order
      TCs are integrated into the system.
      
      In patch #1, shaper at the higher TCs is configured to the same value
      that it has by default. It's better to have the corresponding artifact
      in the code explicitly.
      
      The 8 following patches gradually extend the devlink handling in mlxsw
      to support the extra TCs and the new MC pool.
      
      Patch #2 changes the way that pools are indexed in mlxsw. Instead of
      using (FW index, direction) tuple to identify the pool and the
      associated cache, mlxsw now uses devlink index. This change is necessary
      because the new pool 15 is not contiguously adjacent to the
      currently-used pools 0..3, and because it's only relevant on egress.
      Using devlink index relaxes the requirement for symmetry and adjacency
      imposed by using FW indexing.
      
      In patch #3, the assumption that number of ingress TCs matches that of
      egress TCs is relaxed to allow exposition of egress TCs 8..15.
      
      In patches #4, #5 and #6, support for infinite quotas is introduced.
      Infinite quotas are reported as taking all the memory in the system, but
      actually use a mechanism where the infinity is configured explicitly.
      
      In patches #7 and #8, support for configuring static pool sizes in
      introduced. Statically-sized pools have been supported for a while now,
      but during initialization, all pools have dynamic size. The patches
      allow there to be a mix of by-default static and dynamic pools.
      
      In patches #9 and #10, pool 15 resp. per-priority MC quotas are
      explicitly configured to be in sync with the current recommendation for
      handling BUM traffic in Spectrum chips.
      
      In the following 3 patches, an mlxsw-specific selftest is added to test
      the MC-awareness configuration.
      
      First in patches #11 and #12, lib.sh is extended with functions to
      collect ethtool stats, and to manage port MTU.
      
      Then in patch #13 the selftest itself is added.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cab9572a
    • P
      selftests: mlxsw: Add a test for UC behavior under MC flood · b5638d46
      Petr Machata 提交于
      A so-called "MC-aware" mode has recently been enabled in mlxsw. In
      MC-aware mode, BUM traffic is handled in a special way so that when a
      switch is flooded with BUM, UC performance isn't unduly impacted.
      Without enablement of this mode, a stream of BUM traffic can cause
      sustained UC throughput drop in excess of 99 %.
      
      Add a test for this behavior. Compare how much UC throughput degrades as
      a stream of broadcast frames floods the switch. A minimal degradation is
      tolerated to cover for glitches in traffic injection performance.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5638d46
    • P
      selftests: forwarding: lib: Add mtu_set(), mtu_restore() · a381ed12
      Petr Machata 提交于
      Some selftests need to tweak MTU of an interface, and naturally should
      at teardown restore the MTU back to the original value. Add two
      functions to facilitate this MTU handling: mtu_set() to change MTU
      value, and mtu_reset() to change it back to what it was before.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a381ed12
    • P
      selftests: forwarding: lib: Add ethtool_stats_get() · 3136a369
      Petr Machata 提交于
      Add a new service function to obtain ethtool counters.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3136a369
    • P
      mlxsw: spectrum_buffers: Tweak SBMM configuration · 6a23f9a4
      Petr Machata 提交于
      The SBMM register configures shared buffer allocation and settings for
      MC packets according to switch priority. The recommended values are no
      reserved buffer and alpha of 1/4, which corresponds to buf_max of 6.
      Update mlxsw_sp_sb_mms accordingly.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a23f9a4
    • P
      mlxsw: spectrum_buffers: Configure MC pool · e83c045e
      Petr Machata 提交于
      Pool 15 (indexed as 8) is dedicated to MC traffic. Its configuration has
      been kept at default, because the table-based configuration wasn't
      expressive enough to allow the explicit configuration.
      
      Now that the configuration of pool 15 can be described, do so. The MC
      pool should have infinite size, infinite per-TC quota, and per-port
      limit of 90K.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e83c045e
    • P
      mlxsw: spectrum_buffers: Allow configuration of static pools · 5be3637e
      Petr Machata 提交于
      Some pools configured through the sb_pm entries may have by default
      static size. The MC pool is now not explicitly configured, however it
      gets configured as static implicitly by 0-initializing sb->prs, and a
      follow-up patch adds an explicit configuration to the same effect.
      
      To support this, pass max_buff taken from sb_pm and sb_cm entries
      through cell conversion before handing it to mlxsw_sp_sb_pm_write(), if
      the pool that the sb_pm entry configures is statically-sized.
      
      To keep current behavior, update mlxsw_sp_sb_cms_egress[] to denote
      buffer sizes in bytes (assuming Spectrum 1 cell sizes, which the
      original code assumed as well) instead of cells. Note that a follow-up
      patch changes this to infinite size.
      
      Also tweak a comment at SBMM configuration to remain true now that
      statically-sized pools exist.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5be3637e
    • P
      mlxsw: spectrum_buffers: Pass SBPM min_size in cells · 41057e28
      Petr Machata 提交于
      The SBPM register configures the shared buffer allocation and
      configuration per port and pool. The min_buff value is the buffer size
      dedicated to this single function, and is configured in cells.
      Currently, all sb_pm entries have 0 for min_buff, and therefore the
      actual unit is immaterial. However, in a follow-up patch we want to add
      entries with non-zero minimum.
      
      Therefore pass the min_buff from the sb_pm table through the cell
      conversion before handing it over to mlxsw_sp_sb_pm_write().
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41057e28
    • P
      mlxsw: spectrum_buffers: Allow an infinite maximum for per-TC pool limit · d144e3a2
      Petr Machata 提交于
      The SBCM register configures the shared buffer configuration according
      to port and TC. So far all pools have had a dynamic size, where the
      infinite size is easy to express by using max_buff of 0xff. However the
      MC pool should be configured with static size, and the infinite size
      thus needs to be set using the field SBCM.infi_max.
      
      Therefore add the field infi_max to the SBCM register and to
      mlxsw_reg_sbcm_pack(). Extend mlxsw_sp_sb_cm_write() to handle infinite
      sizes as well. Report infinite pool limits as if the limit actually were
      the total shared buffer size.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d144e3a2