diff options
author | Petr Machata | 2019-06-30 08:04:50 +0200 |
---|---|---|
committer | David S. Miller | 2019-07-02 03:58:34 +0200 |
commit | dadbc6bc09e8deb886918012a45fb6b6d53ba29d (patch) | |
tree | 961bf45a3d3f2c23df69dcd54ad6a7b6d94136d5 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | mlxsw: spectrum: Extract a helper for trap registration (diff) | |
download | kernel-qcow2-linux-dadbc6bc09e8deb886918012a45fb6b6d53ba29d.tar.gz kernel-qcow2-linux-dadbc6bc09e8deb886918012a45fb6b6d53ba29d.tar.xz kernel-qcow2-linux-dadbc6bc09e8deb886918012a45fb6b6d53ba29d.zip |
mlxsw: spectrum: Add support for traps specific to Spectrum-1
On Spectrum-1, timestamps for PTP packets are delivered through queues
of ingress and egress timestamps. There are two event traps
corresponding to activity on each of those queues. This mechanism is
absent on Spectrum-2, and therefore the traps should only be registered
on Spectrum-1.
Carry a chip-specific listener array in mlxsw_sp->listeners and
listeners_count. Register listeners from that array in
mlxsw_sp_traps_init(). Add a new listener array for Spectrum-1 traps and
configure the newly-added mlxsw_sp->listeners with this array.
The listener array is empty for now, the events will be added in a later
patch.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index 84f4276193b3..9136a86dc55f 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -175,6 +175,8 @@ struct mlxsw_sp { const struct mlxsw_sp_sb_vals *sb_vals; const struct mlxsw_sp_port_type_speed_ops *port_type_speed_ops; const struct mlxsw_sp_ptp_ops *ptp_ops; + const struct mlxsw_listener *listeners; + size_t listeners_count; }; static inline struct mlxsw_sp_upper * |