netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] mlxsw: Add support for ECN mirroring
@ 2021-10-10 11:40 Ido Schimmel
  2021-10-10 11:40 ` [PATCH net-next 1/6] mlxsw: spectrum_qdisc: Pass extack to mlxsw_sp_qevent_entry_configure() Ido Schimmel
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Ido Schimmel @ 2021-10-10 11:40 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, jiri, petrm, mlxsw, Ido Schimmel

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(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-10-12 10:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-10 11:40 [PATCH net-next 0/6] mlxsw: Add support for ECN mirroring Ido Schimmel
2021-10-10 11:40 ` [PATCH net-next 1/6] mlxsw: spectrum_qdisc: Pass extack to mlxsw_sp_qevent_entry_configure() Ido Schimmel
2021-10-10 11:40 ` [PATCH net-next 2/6] mlxsw: spectrum_qdisc: Distinguish between ingress and egress triggers Ido Schimmel
2021-10-10 11:40 ` [PATCH net-next 3/6] mlxsw: spectrum_qdisc: Track permissible actions per binding Ido Schimmel
2021-10-10 11:40 ` [PATCH net-next 4/6] mlxsw: spectrum_qdisc: Offload RED qevent mark Ido Schimmel
2021-10-10 11:40 ` [PATCH net-next 5/6] selftests: mlxsw: sch_red_core: Drop two unused variables Ido Schimmel
2021-10-10 11:40 ` [PATCH net-next 6/6] selftests: mlxsw: RED: Add selftests for the mark qevent Ido Schimmel
2021-10-12 10:30 ` [PATCH net-next 0/6] mlxsw: Add support for ECN mirroring patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).