1. 22 Feb, 2019 36 commits
  2. 21 Feb, 2019 4 commits
    • David S. Miller's avatar
      Merge branch 'mlxsw-Support-for-shared-buffers-in-Spectrum-2' · 2fb44dd0
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Support for shared buffers in Spectrum-2
      
      Petr says:
      
      Spectrum-2 will be configured with a different set of pools than
      Spectrum-1, their sizes will be larger, and the individual quotas will
      be different as well. It is therefore necessary to make the shared
      buffer module aware of this dependence on chip type, and adjust the
      individual tables.
      
      In patch #1, introduce a structure for keeping per-chip immutable and
      default values.
      
      In patch #2, structures for keeping current values of SBPM and SBPR
      (pool configuration and port-pool quota) are allocated dynamically to
      support varying pool counts.
      
      In patches #3 to #7, uses of individual shared buffer configuration
      tables are migrated from global definitions to fields in struct
      mlxsw_sp_sb_vals, which was introduced above.
      
      Up until this point, the actual configuration is still the one suitable
      for Spectrum-1. In patch #8 Spectrum-2 configuration is added.
      
      In patch #9, port headroom configuration is changed to take into account
      current recommended value for a 100-Gbps port, and the split factor.
      
      In patch #10, requests for overlarge headroom are rejected. This avoids
      potential chip freeze should such overlarge requests be made.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2fb44dd0
    • Petr Machata's avatar
      mlxsw: spectrum_buffers: Reject overlarge headroom size requests · bb6c346c
      Petr Machata authored
      cap_max_headroom_size holds maximum headroom size supported.
      Overstepping that limit might under certain conditions lead to ASIC
      freeze.
      
      Query and store the value, and add mlxsw_sp_sb_max_headroom_cells() for
      obtaining the stored value. In __mlxsw_sp_port_headroom_set(), reject
      requests where the total port buffer is larger than the advertised
      maximum.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb6c346c
    • Petr Machata's avatar
      mlxsw: spectrum_buffers: Update port headroom configuration · edf777f5
      Petr Machata authored
      The recommendation for headroom size for 100Gbps port and 100m cable is
      101.6KB, reduced accordingly for split ports. The closest higher number
      evenly divisible by cell size for both Spectrum-1 and Spectrum-2, and
      such that the number of cells can be further divided by maximum split
      factor of 4, is 102528 bytes, or 25632 bytes per lane.
      
      Update mlxsw_sp_port_pb_init() to compute the headroom taking into
      account this recommended per-lane value and number of lanes actually
      dedicated to a given port.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      edf777f5
    • Petr Machata's avatar
      mlxsw: spectrum_buffers: Add Spectrum-2 shared buffer configuration · fe099bf6
      Petr Machata authored
      Customize the tables related to shared buffer configuration to match the
      current recommendation for Spectrum-2 systems.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe099bf6