Merge branch 'mlxsw-Add-support-for-buffer-drops-mirroring'
authorDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 00:22:22 +0000 (17:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 00:22:22 +0000 (17:22 -0700)
commitea64ce6d3b579f377d2be788ed5ab71ab00570ee
tree13f833c90b437cc5b6639a1678782ba4a1709055
parente1d82f7ad0b5e19659c74a0abf7a53768c1249f8
parent1add92121e39ee5e4af21562eb59bd562c8033e3
Merge branch 'mlxsw-Add-support-for-buffer-drops-mirroring'

Petr Machata says:

====================
mlxsw: Add support for buffer drops mirroring

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

Signed-off-by: David S. Miller <davem@davemloft.net>