mlxsw: spectrum_span: Allow passing parameters to SPAN agents
authorIdo Schimmel <idosch@mellanox.com>
Tue, 14 Jul 2020 14:21:00 +0000 (17:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 21:50:49 +0000 (14:50 -0700)
commita120ecc3c5d8da86aca29f142f92a1547578a7bb
treedd81306fd02511d70cb19ea4a3e9b8a4134a6acd
parentfa8c08b8fcbd4a4bd201297d27a9ccbd2eb4b1f1
mlxsw: spectrum_span: Allow passing parameters to SPAN agents

Currently, the only parameter of a SPAN agent is the netdev which
the SPAN agent should mirror to.

The next patch will add the ability to request a SPAN agent that mirrors
to a specific netdev and has a specific policer ID bound to it. This is
required when mirroring packets to the CPU port.

Therefore, encapsulate the sole parameter to mlxsw_sp_span_agent_get()
in a structure, so that it could later be extended with policer
information.

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