mbox series

[net-next,0/6] mlxsw: Add support for ECN mirroring

Message ID 20211010114018.190266-1-idosch@idosch.org (mailing list archive)
Headers show
Series mlxsw: Add support for ECN mirroring | expand

Message

Ido Schimmel Oct. 10, 2021, 11:40 a.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

Petr says:

Patches in this set have been floating around for some time now together
with trap_fwd support. That will however need more work, time for which is
nowhere to be found, apparently. Instead, this patchset enables offload of
only packet mirroring on RED mark qevent, enabling mirroring of ECN-marked
packets.

Formally it enables offload of filters added to blocks bound to the RED
qevent mark if:

- The switch ASIC is Spectrum-2 or above.
- Only a single filter is attached at the block, at chain 0 (the default),
  and its classifier is matchall.
- The filter has hw_stats set to disabled.
- The filter has a single action, which is mirror.

This differs from early_drop qevent offload, which supports mirroring and
trapping. However trapping in context of ECN-marked packets is not
suitable, because the HW does not drop the packet, as the trap action
implies. And there is as of now no way to express only the part of trapping
that transfers the packet to the SW datapath, sans the HW-datapath drop.

The patchset progresses as follows:

Patch #1 is an extack propagation.

Mirroring of ECN-marked packets is configured in the ASIC through an ECN
trigger, which is considered "egress", unlike the EARLY_DROP trigger.
In patch #2, add a helper to classify triggers as ingress.

As clarified above, traps cannot be offloaded on mark qevent. Similarly,
given a trap_fwd action, it would not be offloadable on early_drop qevent.
In patch #3, introduce support for tracking actions permissible on a given
block.

Patch #4 actually adds the mark qevent offload.

In patch #5, fix a small style issue in one of the selftests, and in
patch #6 add mark offload selftests.

Petr Machata (6):
  mlxsw: spectrum_qdisc: Pass extack to
    mlxsw_sp_qevent_entry_configure()
  mlxsw: spectrum_qdisc: Distinguish between ingress and egress triggers
  mlxsw: spectrum_qdisc: Track permissible actions per binding
  mlxsw: spectrum_qdisc: Offload RED qevent mark
  selftests: mlxsw: sch_red_core: Drop two unused variables
  selftests: mlxsw: RED: Add selftests for the mark qevent

 .../net/ethernet/mellanox/mlxsw/spectrum.c    |   2 +
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   2 +
 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  | 106 +++++++++++++-----
 .../ethernet/mellanox/mlxsw/spectrum_span.c   |  16 +++
 .../ethernet/mellanox/mlxsw/spectrum_span.h   |   1 +
 .../drivers/net/mlxsw/sch_red_core.sh         |  76 ++++++++++++-
 .../drivers/net/mlxsw/sch_red_ets.sh          |  53 ++++++++-
 7 files changed, 220 insertions(+), 36 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 12, 2021, 10:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Sun, 10 Oct 2021 14:40:12 +0300 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> Petr says:
> 
> Patches in this set have been floating around for some time now together
> with trap_fwd support. That will however need more work, time for which is
> nowhere to be found, apparently. Instead, this patchset enables offload of
> only packet mirroring on RED mark qevent, enabling mirroring of ECN-marked
> packets.
> 
> [...]

Here is the summary with links:
  - [net-next,1/6] mlxsw: spectrum_qdisc: Pass extack to mlxsw_sp_qevent_entry_configure()
    https://git.kernel.org/netdev/net-next/c/a34dda728430
  - [net-next,2/6] mlxsw: spectrum_qdisc: Distinguish between ingress and egress triggers
    https://git.kernel.org/netdev/net-next/c/0908e42ad9a5
  - [net-next,3/6] mlxsw: spectrum_qdisc: Track permissible actions per binding
    https://git.kernel.org/netdev/net-next/c/099bf89d6a35
  - [net-next,4/6] mlxsw: spectrum_qdisc: Offload RED qevent mark
    https://git.kernel.org/netdev/net-next/c/9c18eaf2882d
  - [net-next,5/6] selftests: mlxsw: sch_red_core: Drop two unused variables
    https://git.kernel.org/netdev/net-next/c/a703b5179b5c
  - [net-next,6/6] selftests: mlxsw: RED: Add selftests for the mark qevent
    https://git.kernel.org/netdev/net-next/c/0cd6fa99a076

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html