Skip to content

mlxsw: Support for shared buffers in Spectrum-2

Ido Schimmel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10mlxsw: spectrum: Add struct mlxsw_sp_sb_valsdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+16 -00 replies
2/10mlxsw: spectrum_buffers: Allocate prs & pms dynamicallydrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+50 -20 replies
3/10mlxsw: spectrum_buffers: Keep pool descriptors in mlxsw_sp_sb_valsdrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+30 -200 replies
4/10mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_pms in mlxsw_sp_sb_valsdrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+5 -40 replies
5/10mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_prs in mlxsw_sp_sb_valsdrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+5 -50 replies
6/10mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_cm in sb_valsdrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+26 -140 replies
7/10mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_mm in sb_valsdrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+14 -100 replies
8/10mlxsw: spectrum_buffers: Add Spectrum-2 shared buffer configurationdrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+106 -280 replies
9/10mlxsw: spectrum_buffers: Update port headroom configurationdrivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c+8 -80 replies
10/10mlxsw: spectrum_buffers: Reject overlarge headroom size requestsdrivers/net/ethernet/mellanox/mlxsw/resources.h drivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h +1 more+31 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 00/10] 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.

Petr Machata (10):
mlxsw: spectrum: Add struct mlxsw_sp_sb_vals
mlxsw: spectrum_buffers: Allocate prs & pms dynamically
mlxsw: spectrum_buffers: Keep pool descriptors in mlxsw_sp_sb_vals
mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_pms in mlxsw_sp_sb_vals
mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_prs in mlxsw_sp_sb_vals
mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_cm in sb_vals
mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_mm in sb_vals
mlxsw: spectrum_buffers: Add Spectrum-2 shared buffer configuration
mlxsw: spectrum_buffers: Update port headroom configuration
mlxsw: spectrum_buffers: Reject overlarge headroom size requests

 .../net/ethernet/mellanox/mlxsw/resources.h   |   2 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  15 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   6 +
 .../mellanox/mlxsw/spectrum_buffers.c         | 312 ++++++++++++++----
 4 files changed, 267 insertions(+), 68 deletions(-)
Signature · 1 line
2.20.1