Skip to content

mlxsw: Add support for RED qevent "mark"

Ido Schimmel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5devlink: Add ecn_mark trapDocumentation/networking/devlink/devlink-trap.rst include/net/devlink.h net/core/devlink.c+8 -00 replies
2/5mlxsw: spectrum_trap: Add ecn_mark trapdrivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c+9 -00 replies
3/5mlxsw: spectrum_qdisc: Offload RED qevent markdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c +2 more+32 -30 replies
4/5selftests: mlxsw: sch_red_core: Drop two unused variablestools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh+0 -20 replies
5/5selftests: mlxsw: RED: Add selftests for the mark qeventtools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh tools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh+151 -50 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchJiri Pirko
1/5R-b
2/5R-b
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/5] mlxsw: Add support for RED qevent "mark"

From: Ido Schimmel <[email protected]>

Petr says:

The RED qdisc currently supports two qevents: "early_drop" and "mark". The filters added to the block bound to the "early_drop" qevent are executed on packets for which the RED algorithm decides that they should be early-dropped. The "mark" filters are similarly executed on ECT packets that are marked as ECN-CE (Congestion Encountered).

A previous patchset has offloaded "early_drop" filters on Spectrum-2 and later, provided that the classifier used is "matchall", that the action used is either "trap" or "mirred", and a handful or further limitations.

This patchset similarly offloads "mark" filters.

Patch set overview:

Patches #1 and #2 add the trap, under which packets will be reported to the CPU, if the qevent filter uses the action "trap".

Patch #3 then recognizes FLOW_BLOCK_BINDER_TYPE_RED_MARK as a binder type, and offloads the attached filters similarly to _EARLY_DROP.

Patch #4 cleans up some unused variables in a selftest, and patch #5 adds a new selftest for the RED "mark" qevent offload.

Petr Machata (5):
devlink: Add ecn_mark trap
mlxsw: spectrum_trap: Add ecn_mark trap
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

 .../networking/devlink/devlink-trap.rst       |  4 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  2 +
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  2 +
 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  | 14 +++-
 .../ethernet/mellanox/mlxsw/spectrum_span.c   | 16 ++++
 .../ethernet/mellanox/mlxsw/spectrum_span.h   |  1 +
 .../ethernet/mellanox/mlxsw/spectrum_trap.c   |  9 ++
 include/net/devlink.h                         |  3 +
 net/core/devlink.c                            |  1 +
 .../drivers/net/mlxsw/sch_red_core.sh         | 84 ++++++++++++++++++-
 .../drivers/net/mlxsw/sch_red_ets.sh          | 74 ++++++++++++++--
 11 files changed, 200 insertions(+), 10 deletions(-)
Signature · 1 line
2.29.2