netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] mlxsw: Add support for buffer drop traps
@ 2020-08-03 16:11 Ido Schimmel
  2020-08-03 16:11 ` [PATCH net-next 1/9] devlink: Add early_drop trap Ido Schimmel
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Ido Schimmel @ 2020-08-03 16:11 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, jiri, petrm, amitc, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.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


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

end of thread, other threads:[~2020-08-04  1:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 16:11 [PATCH net-next 0/9] mlxsw: Add support for buffer drop traps Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 1/9] devlink: Add early_drop trap Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 2/9] devlink: Pass extack when setting trap's action and group's parameters Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 3/9] mlxsw: spectrum_trap: Use 'size_t' for array sizes Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 4/9] mlxsw: spectrum_span: On policer_id_base_ref_count, use dec_and_test Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 5/9] mlxsw: spectrum_trap: Allow for per-ASIC trap groups initialization Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 6/9] mlxsw: spectrum_trap: Allow for per-ASIC traps initialization Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 7/9] mlxsw: spectrum_trap: Add early_drop trap Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 8/9] mlxsw: spectrum_qdisc: Offload action trap for qevents Ido Schimmel
2020-08-03 16:11 ` [PATCH net-next 9/9] selftests: mlxsw: RED: Test offload of trapping on RED qevents Ido Schimmel
2020-08-04  1:13 ` [PATCH net-next 0/9] mlxsw: Add support for buffer drop traps David Miller

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