1. 16 Sep, 2020 4 commits
    • Petr Machata's avatar
      mlxsw: spectrum: Track MTU in struct mlxsw_sp_hdroom · 0103a3e4
      Petr Machata authored
      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: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0103a3e4
    • Petr Machata's avatar
      mlxsw: spectrum: Unify delay handling between PFC and pause · b7e07bbd
      Petr Machata authored
      When a priority is marked as lossless using DCB PFC, or when pause frames
      are enabled on a port, mlxsw adds to port buffers an extra space to cover
      the traffic that will arrive between the time that a pause or PFC frame is
      emitted, and the time traffic actually stops. This is called the delay. The
      concept is the same in PFC and pause, however the way the extra buffer
      space is calculated differs.
      
      In this patch, unify this handling. Delay is to be measured in bytes of
      extra space, and will not include MTU. PFC handler sets the delay directly
      from the parameter it gets through the DCB interface.
      
      To convert pause handler, move MLXSW_SP_PAUSE_DELAY to ethtool module,
      convert to bytes, and reduce it by maximum MTU, and divide by two. Then it
      has the same meaning as the delay_bytes set by the PFC handler.
      
      Keep the delay_bytes value in struct mlxsw_sp_hdroom introduced in the
      previous patch. Change PFC and pause handlers to store the new delay value
      there and have __mlxsw_sp_port_headroom_set() take it from there.
      
      Instead of mlxsw_sp_pfc_delay_get() and mlxsw_sp_pg_buf_delay_get(),
      introduce mlxsw_sp_hdroom_buf_delay_get() to calculate the delay provision.
      Drop the unnecessary MLXSW_SP_CELL_FACTOR, and instead add an explanatory
      comment describing the formula used.
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b7e07bbd
    • Petr Machata's avatar
      mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom · 3a77f5a2
      Petr Machata authored
      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: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3a77f5a2
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2020-09-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 045e42f3
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2020-09-15
      
      Various updates to mlx5 driver,
      
      1) Eli adds support for TC trap action.
      2) Eran, minor improvements to clock.c code structure
      3) Better handling of error reporting in LAG from Jianbo
      4) IPv6 traffic class (DSCP) header rewrite support from Maor
      5) Ofer Levi adds support for CQE compression of multi-strides packets
      6) Vu, Enables use of vport meta data by default.
      7) Some minor code cleanup
      ====================
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      045e42f3
  2. 15 Sep, 2020 36 commits