summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-02-27 16:53:46 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-27 22:46:27 +0300
commit803335acbe3371f1c0e9dd02f318b16f5abc22f4 (patch)
tree7bbd1d24c2adff07c8bd7a1fadc43ed2f6d2e1df /drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
parent169b5d95c15e01e08e1665bd8ceaff9bf8331c33 (diff)
downloadlinux-803335acbe3371f1c0e9dd02f318b16f5abc22f4.tar.xz
mlxsw: Handle config changes pertinent to SPAN
For some netdevices, for which mlxsw offloads mirroring, may have a complex relationship between the declared intent and low-level device configuration. Trying to accurately track which changes might influence offloading decisions is finicky and error-prone. Instead, this patch introduces a function mlxsw_sp_span_entry_respin, which re-queries the configuration anew and, if different, removes the existing offloads and installs new ones. Call this function strategically at event handlers that might influence the mirroring configuration. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h1
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 9390b05a7919..b6dcd7d7277c 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
@@ -76,6 +76,7 @@ struct mlxsw_sp_span_entry_ops {
int mlxsw_sp_span_init(struct mlxsw_sp *mlxsw_sp);
void mlxsw_sp_span_fini(struct mlxsw_sp *mlxsw_sp);
+void mlxsw_sp_span_respin(struct mlxsw_sp *mlxsw_sp);
int mlxsw_sp_span_mirror_add(struct mlxsw_sp_port *from,
const struct net_device *to_dev,