[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200803161141.2523857-1-idosch@idosch.org>
Date: Mon, 3 Aug 2020 19:11:32 +0300
From: Ido Schimmel <idosch@...sch.org>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, jiri@...lanox.com,
petrm@...lanox.com, amitc@...lanox.com, mlxsw@...lanox.com,
Ido Schimmel <idosch@...lanox.com>
Subject: [PATCH net-next 0/9] mlxsw: Add support for buffer drop traps
From: Ido Schimmel <idosch@...lanox.com>
Petr says:
A recent patch set added the ability to mirror buffer related drops
(e.g., early drops) through a netdev. This patch set adds the ability to
trap such packets to the local CPU for analysis.
The trapping towards the CPU is configured by using tc-trap action
instead of tc-mirred as was done when the packets were mirrored through
a netdev. A future patch set will also add the ability to sample the
dropped packets using tc-sample action.
The buffer related drop traps are added to devlink, which means that the
dropped packets can be reported to user space via the kernel's
drop_monitor module.
Patch set overview:
Patch #1 adds the early_drop trap to devlink
Patch #2 adds extack to a few devlink operations to facilitate better
error reporting to user space. This is necessary - among other things -
because the action of buffer drop traps cannot be changed in mlxsw
Patch #3 performs a small refactoring in mlxsw, patch #4 fixes a bug that
this patchset would trigger.
Patches #5-#6 add the infrastructure required to support different traps
/ trap groups in mlxsw per-ASIC. This is required because buffer drop
traps are not supported by Spectrum-1
Patch #7 extends mlxsw to register the early_drop trap
Patch #8 adds the offload logic for the "trap" action at a qevent block.
Patch #9 adds a mlxsw-specific selftest.
Amit Cohen (1):
devlink: Add early_drop trap
Ido Schimmel (5):
devlink: Pass extack when setting trap's action and group's parameters
mlxsw: spectrum_trap: Use 'size_t' for array sizes
mlxsw: spectrum_trap: Allow for per-ASIC trap groups initialization
mlxsw: spectrum_trap: Allow for per-ASIC traps initialization
mlxsw: spectrum_trap: Add early_drop trap
Petr Machata (3):
mlxsw: spectrum_span: On policer_id_base_ref_count, use dec_and_test
mlxsw: spectrum_qdisc: Offload action trap for qevents
selftests: mlxsw: RED: Test offload of trapping on RED qevents
.../networking/devlink/devlink-trap.rst | 4 +
drivers/net/ethernet/mellanox/mlxsw/core.c | 10 +-
drivers/net/ethernet/mellanox/mlxsw/core.h | 19 +-
drivers/net/ethernet/mellanox/mlxsw/reg.h | 1 +
.../net/ethernet/mellanox/mlxsw/spectrum.c | 3 +
.../net/ethernet/mellanox/mlxsw/spectrum.h | 14 +-
.../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 75 +++++-
.../ethernet/mellanox/mlxsw/spectrum_span.c | 3 +-
.../ethernet/mellanox/mlxsw/spectrum_trap.c | 255 ++++++++++++++++--
.../ethernet/mellanox/mlxsw/spectrum_trap.h | 18 +-
drivers/net/netdevsim/dev.c | 6 +-
include/net/devlink.h | 9 +-
net/core/devlink.c | 9 +-
.../drivers/net/mlxsw/sch_red_core.sh | 35 ++-
.../drivers/net/mlxsw/sch_red_ets.sh | 11 +
15 files changed, 406 insertions(+), 66 deletions(-)
--
2.26.2
Powered by blists - more mailing lists