mlxsw: spectrum_span: Add APIs to enable / disable global mirroring triggers
authorIdo Schimmel <idosch@mellanox.com>
Fri, 10 Jul 2020 21:55:09 +0000 (00:55 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 00:22:22 +0000 (17:22 -0700)
commit2bafb216e10edf2684d3dc124be333a07523580d
tree5f009dc0ac60eb40b8183a10e6234b0873e54459
parentab8c06b7b42cf9e756a720931a0939cd0d56786a
mlxsw: spectrum_span: Add APIs to enable / disable global mirroring triggers

While the binding of global mirroring triggers to a SPAN agent is
global, packets are only mirrored if they belong to a port and TC on
which the trigger was enabled. This allows, for example, to mirror
packets that were tail-dropped on a specific netdev.

Implement the operations that allow to enable / disable a global
mirroring trigger on a specific port and TC.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h