Skip to content

mlxsw: Derive SBIB from maximum port speed & MTU

Ido Schimmel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mlxsw: spectrum_ethtool: Extract a helper to get Ethernet attributesdrivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c+28 -100 replies
2/5mlxsw: spectrum_ethtool: Introduce ptys_max_speed callbackdrivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c+45 -00 replies
3/5mlxsw: spectrum: Keep maximum MTU arounddrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h+21 -50 replies
4/5mlxsw: spectrum: Keep maximum speed arounddrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h+10 -00 replies
5/5mlxsw: spectrum_span: Derive SBIB from maximum port speed & MTUdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c+4 -670 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 0/5] mlxsw: Derive SBIB from maximum port speed & MTU

From: Ido Schimmel <[email protected]>

Petr says:

Internal buffer is a part of port headroom used for packets that are mirrored due to triggers that the Spectrum ASIC considers "egress". Besides ACL mirroring on port egresss this includes also packets mirrored due to ECN marking.

This patchset changes the way the internal mirroring buffer is reserved. Currently the buffer reflects port MTU and speed accurately. In the future, mlxsw should support dcbnl_setbuffer hook to allow the users to set buffer sizes by hand. In that case, there might not be enough space for growth of the internal mirroring buffer due to MTU and speed changes. While vetoing MTU changes would be merely confusing, port speed changes cannot be vetoed, and such change would simply lead to issues in packet mirroring.

For these reasons, with these patches the internal mirroring buffer is derived from maximum MTU and maximum speed achievable on the port.

Patches #1 and #2 introduce a new callback to determine the maximum speed a given port can achieve.

With patches #3 and #4, the information about, respectively, maximum MTU and maximum port speed, is kept in struct mlxsw_sp_port.

In patch #5, maximum MTU and maximum speed are used to determine the size of the internal buffer. MTU update and speed update hooks are dropped, because they are no longer necessary.

Petr Machata (5):
mlxsw: spectrum_ethtool: Extract a helper to get Ethernet attributes
mlxsw: spectrum_ethtool: Introduce ptys_max_speed callback
mlxsw: spectrum: Keep maximum MTU around
mlxsw: spectrum: Keep maximum speed around
mlxsw: spectrum_span: Derive SBIB from maximum port speed & MTU

 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 43 ++++++----
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  6 +-
 .../mellanox/mlxsw/spectrum_ethtool.c         | 82 ++++++++++++++++---
 .../ethernet/mellanox/mlxsw/spectrum_span.c   | 59 +------------
 4 files changed, 108 insertions(+), 82 deletions(-)
Signature · 1 line
2.26.2