diff options
author | Ido Schimmel <idosch@nvidia.com> | 2021-01-28 16:48:20 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-28 13:09:01 -0800 |
commit | b6f6881aaf2344bf35a4221810737abe5fd210af (patch) | |
tree | 36e1990eeab1372cfcdeb9a3061c56cb0f482484 /drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | |
parent | selftests: forwarding: Specify interface when invoking mausezahn (diff) | |
download | linux-b6f6881aaf2344bf35a4221810737abe5fd210af.tar.xz linux-b6f6881aaf2344bf35a4221810737abe5fd210af.zip |
mlxsw: spectrum_span: Do not overwrite policer configuration
The purpose of the delayed work in the SPAN module is to potentially
update the destination port and various encapsulation parameters of SPAN
agents that point to a VLAN device or a GRE tap. The destination port
can change following the insertion of a new route, for example.
SPAN agents that point to a physical port or the CPU port are static and
never change throughout the lifetime of the SPAN agent. Therefore, skip
over them in the delayed work.
This fixes an issue where the delayed work overwrites the policer
that was set on a SPAN agent pointing to the CPU. Modifying the delayed
work to inherit the original policer configuration is error-prone, as
the same will be needed for any new parameter.
Fixes: 4039504e6a0c ("mlxsw: spectrum_span: Allow setting policer on a SPAN agent")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h index d907718bc8c5..aa1cd409c0e2 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h @@ -60,6 +60,7 @@ struct mlxsw_sp_span_entry { }; struct mlxsw_sp_span_entry_ops { + bool is_static; bool (*can_handle)(const struct net_device *to_dev); int (*parms_set)(struct mlxsw_sp *mlxsw_sp, const struct net_device *to_dev, |