netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 00/13] mlxsw: Add support for buffer drops mirroring
@ 2020-07-10 21:55 Petr Machata
  2020-07-10 21:55 ` [PATCH net-next v2 01/13] net: sched: Pass qdisc reference in struct flow_block_offload Petr Machata
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Petr Machata @ 2020-07-10 21:55 UTC (permalink / raw)
  To: netdev
  Cc: Pablo Neira Ayuso, davem, kuba, jiri, petrm, mlxsw, michael.chan,
	saeedm, leon, kadlec, fw, jhs, xiyou.wangcong, simon.horman,
	Ido Schimmel

This set offloads the recently introduced qevent infrastructure in TC and
allows mlxsw to support mirroring of packets that were dropped due to
buffer related reasons (e.g., early drops) during forwarding.

Up until now mlxsw only supported mirroring that was either triggered by
per-port triggers (i.e., via matchall) or by the policy engine (i.e.,
via flower). Packets that are dropped due to buffer related reasons are
mirrored using a third type of trigger, a global trigger.

Global triggers are bound once to a mirroring (SPAN) agent and enabled
on a per-{port, TC} basis. This allows users, for example, to request
that only packets that were early dropped on a specific netdev to be
mirrored.

Patch set overview:

Patch #1 extends flow_block_offload and indirect offload structure to pass
a scheduler instead of a netdevice. That is necessary, because binding type
and netdevice are not a unique identifier of the block anymore.

Patches #2-#3 add the required registers to support above mentioned
functionality.

Patches #4-#6 gradually add support for global mirroring triggers.

Patch #7 adds support for enablement of global mirroring triggers.

Patches #8-#11 are cleanups in the flow offload code and shuffle some
code around to make the qevent offload easier.

Patch #12 implements offload of RED early_drop qevent.

Patch #13 extends the RED selftest for offloaded datapath to cover
early_drop qevent.

v2:
- Patch #1:
    - In struct flow_block_indr, track both sch and dev.

Amit Cohen (2):
  mlxsw: reg: Add Monitoring Mirror Trigger Enable Register
  mlxsw: reg: Add Monitoring Port Analyzer Global Register

Ido Schimmel (4):
  mlxsw: spectrum_span: Move SPAN operations out of global file
  mlxsw: spectrum_span: Prepare for global mirroring triggers
  mlxsw: spectrum_span: Add support for global mirroring triggers
  mlxsw: spectrum_span: Add APIs to enable / disable global mirroring
    triggers

Petr Machata (7):
  net: sched: Pass qdisc reference in struct flow_block_offload
  mlxsw: spectrum_flow: Convert a goto to a return
  mlxsw: spectrum_flow: Drop an unused field
  mlxsw: spectrum_matchall: Publish matchall data structures
  mlxsw: spectrum_flow: Promote binder-type dispatch to spectrum.c
  mlxsw: spectrum_qdisc: Offload mirroring on RED qevent early_drop
  selftests: mlxsw: RED: Test offload of mirror on RED early_drop qevent

 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c  |   9 +-
 .../ethernet/mellanox/mlx5/core/en/rep/tc.c   |  10 +-
 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 102 ++++
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  65 +--
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  33 +-
 .../ethernet/mellanox/mlxsw/spectrum_flow.c   |  18 +-
 .../mellanox/mlxsw/spectrum_matchall.c        |  23 -
 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  | 472 ++++++++++++++++++
 .../ethernet/mellanox/mlxsw/spectrum_span.c   | 397 ++++++++++++++-
 .../ethernet/mellanox/mlxsw/spectrum_span.h   |  16 +
 .../net/ethernet/netronome/nfp/flower/main.h  |   2 +-
 .../ethernet/netronome/nfp/flower/offload.c   |   8 +-
 include/net/flow_offload.h                    |   9 +-
 net/core/flow_offload.c                       |  12 +-
 net/netfilter/nf_flow_table_offload.c         |   2 +-
 net/netfilter/nf_tables_offload.c             |   2 +-
 net/sched/cls_api.c                           |  16 +-
 .../drivers/net/mlxsw/sch_red_core.sh         | 106 +++-
 .../drivers/net/mlxsw/sch_red_ets.sh          |  11 +
 .../drivers/net/mlxsw/sch_red_root.sh         |   8 +
 20 files changed, 1179 insertions(+), 142 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2020-07-14  0:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-10 21:55 [PATCH net-next v2 00/13] mlxsw: Add support for buffer drops mirroring Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 01/13] net: sched: Pass qdisc reference in struct flow_block_offload Petr Machata
2020-07-11 18:22   ` Jakub Kicinski
2020-07-13 11:46     ` Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 02/13] mlxsw: reg: Add Monitoring Mirror Trigger Enable Register Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 03/13] mlxsw: reg: Add Monitoring Port Analyzer Global Register Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 04/13] mlxsw: spectrum_span: Move SPAN operations out of global file Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 05/13] mlxsw: spectrum_span: Prepare for global mirroring triggers Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 06/13] mlxsw: spectrum_span: Add support " Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 07/13] mlxsw: spectrum_span: Add APIs to enable / disable " Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 08/13] mlxsw: spectrum_flow: Convert a goto to a return Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 09/13] mlxsw: spectrum_flow: Drop an unused field Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 10/13] mlxsw: spectrum_matchall: Publish matchall data structures Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 11/13] mlxsw: spectrum_flow: Promote binder-type dispatch to spectrum.c Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 12/13] mlxsw: spectrum_qdisc: Offload mirroring on RED qevent early_drop Petr Machata
2020-07-10 21:55 ` [PATCH net-next v2 13/13] selftests: mlxsw: RED: Test offload of mirror on RED early_drop qevent Petr Machata
2020-07-14  0:22 ` [PATCH net-next v2 00/13] mlxsw: Add support for buffer drops mirroring 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).