All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] mlxsw: Refactor headroom management
@ 2020-09-16  6:35 Ido Schimmel
  2020-09-16  6:35 ` [PATCH net-next 01/15] mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom Ido Schimmel
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Ido Schimmel @ 2020-09-16  6:35 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, jiri, petrm, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@nvidia.com>

Petr says:

On Spectrum, port buffers, also called port headroom, is where packets are
stored while they are parsed and the forwarding decision is being made. For
lossless traffic flows, in case shared buffer admission is not allowed,
headroom is also where to put the extra traffic received before the sent
PAUSE takes effect. Another aspect of the port headroom is the so called
internal buffer, which is used for egress mirroring.

Linux supports two DCB interfaces related to the headroom: dcbnl_setbuffer
for configuration, and dcbnl_getbuffer for inspection. In order to make it
possible to implement these interfaces, it is first necessary to clean up
headroom handling, which is currently strewn in several places in the
driver.

The end goal is an architecture whereby it is possible to take a copy of
the current configuration, adjust parameters, and then hand the proposed
configuration over to the system to implement it. When everything works,
the proposed configuration is accepted and saved. First, this centralizes
the reconfiguration handling to one function, which takes care of
coordinating buffer size changes and priority map changes to avoid
introducing drops. Second, the fact that the configuration is all in one
place makes it easy to keep a backup and handle error path rollbacks, which
were previously hard to understand.

Patch #1 introduces struct mlxsw_sp_hdroom, which will keep port headroom
configuration.

Patch #2 unifies handling of delay provision between PFC and PAUSE. From
now on, 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. For PAUSE, MLXSW_SP_PAUSE_DELAY is converted to
have the same meaning.

In patches #3-#5, MTU, lossiness and priorities are gradually moved over to
struct mlxsw_sp_hdroom.

In patches #6-#11, handling of buffer resizing and priority maps is moved
from spectrum.c and spectrum_dcb.c to spectrum_buffers.c. The API is
gradually adapted so that struct mlxsw_sp_hdroom becomes the main interface
through which the various clients express how the headroom should be
configured.

Patch #12 is a small cleanup that the previous transformation made
possible.

In patch #13, the port init code becomes a boring client of the headroom
code, instead of rolling its own thing.

Patches #14 and #15 move handling of internal mirroring buffer to the new
headroom code as well. Previously, this code was in the SPAN module. This
patchset converts the SPAN module to another boring client of the headroom
code.

Petr Machata (15):
  mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom
  mlxsw: spectrum: Unify delay handling between PFC and pause
  mlxsw: spectrum: Track MTU in struct mlxsw_sp_hdroom
  mlxsw: spectrum: Track priorities in struct mlxsw_sp_hdroom
  mlxsw: spectrum: Track lossiness in struct mlxsw_sp_hdroom
  mlxsw: spectrum: Track buffer sizes in struct mlxsw_sp_hdroom
  mlxsw: spectrum: Split headroom autoresize out of buffer configuration
  mlxsw: spectrum_dcb: Convert ETS handler fully to
    mlxsw_sp_hdroom_configure()
  mlxsw: spectrum_dcb: Convert mlxsw_sp_port_pg_prio_map() to hdroom
    code
  mlxsw: spectrum: Move here the three-step headroom configuration from
    DCB
  mlxsw: spectrum_buffers: Move here the new headroom code
  mlxsw: spectrum_buffers: Inline mlxsw_sp_sb_max_headroom_cells()
  mlxsw: spectrum_buffers: Convert mlxsw_sp_port_headroom_init()
  mlxsw: spectrum_buffers: Introduce shared buffer ops
  mlxsw: spectrum_buffers: Manage internal buffer in the hdroom code

 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 136 +------
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  71 +++-
 .../mellanox/mlxsw/spectrum_buffers.c         | 361 ++++++++++++++++--
 .../ethernet/mellanox/mlxsw/spectrum_dcb.c    | 104 ++---
 .../mellanox/mlxsw/spectrum_ethtool.c         |  27 +-
 .../ethernet/mellanox/mlxsw/spectrum_span.c   |  65 +---
 .../ethernet/mellanox/mlxsw/spectrum_span.h   |   1 -
 7 files changed, 470 insertions(+), 295 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-09-16 22:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16  6:35 [PATCH net-next 00/15] mlxsw: Refactor headroom management Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 01/15] mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 02/15] mlxsw: spectrum: Unify delay handling between PFC and pause Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 03/15] mlxsw: spectrum: Track MTU in struct mlxsw_sp_hdroom Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 04/15] mlxsw: spectrum: Track priorities " Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 05/15] mlxsw: spectrum: Track lossiness " Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 06/15] mlxsw: spectrum: Track buffer sizes " Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 07/15] mlxsw: spectrum: Split headroom autoresize out of buffer configuration Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 08/15] mlxsw: spectrum_dcb: Convert ETS handler fully to mlxsw_sp_hdroom_configure() Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 09/15] mlxsw: spectrum_dcb: Convert mlxsw_sp_port_pg_prio_map() to hdroom code Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 10/15] mlxsw: spectrum: Move here the three-step headroom configuration from DCB Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 11/15] mlxsw: spectrum_buffers: Move here the new headroom code Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 12/15] mlxsw: spectrum_buffers: Inline mlxsw_sp_sb_max_headroom_cells() Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 13/15] mlxsw: spectrum_buffers: Convert mlxsw_sp_port_headroom_init() Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 14/15] mlxsw: spectrum_buffers: Introduce shared buffer ops Ido Schimmel
2020-09-16  6:35 ` [PATCH net-next 15/15] mlxsw: spectrum_buffers: Manage internal buffer in the hdroom code Ido Schimmel
2020-09-16 22:19 ` [PATCH net-next 00/15] mlxsw: Refactor headroom management David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.