diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-07-11 00:55:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-13 17:22:21 -0700 |
commit | 4bafb85ae24418cfa42ad3cb9f67031b1813fea8 (patch) | |
tree | 0a97941cf0772a7fe5ea3ff765b73a32fdb68e84 /drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | |
parent | mlxsw: reg: Add Monitoring Port Analyzer Global Register (diff) | |
download | linux-4bafb85ae24418cfa42ad3cb9f67031b1813fea8.tar.xz linux-4bafb85ae24418cfa42ad3cb9f67031b1813fea8.zip |
mlxsw: spectrum_span: Move SPAN operations out of global file
The per-ASIC SPAN operations are relevant to the SPAN module and
therefore should be implemented there and not in the main driver file.
Move them.
These operations will be extended later on.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Petr Machata <petrm@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.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h index 9f6dd2d0f4e6..440551ec0dba 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h @@ -34,6 +34,10 @@ struct mlxsw_sp_span_trigger_parms { struct mlxsw_sp_span_entry_ops; +struct mlxsw_sp_span_ops { + u32 (*buffsize_get)(int mtu, u32 speed); +}; + struct mlxsw_sp_span_entry { const struct net_device *to_dev; const struct mlxsw_sp_span_entry_ops *ops; @@ -82,4 +86,8 @@ mlxsw_sp_span_agent_unbind(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_port *mlxsw_sp_port, const struct mlxsw_sp_span_trigger_parms *parms); +extern const struct mlxsw_sp_span_ops mlxsw_sp1_span_ops; +extern const struct mlxsw_sp_span_ops mlxsw_sp2_span_ops; +extern const struct mlxsw_sp_span_ops mlxsw_sp3_span_ops; + #endif |