]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Extract a helper for trap registration
authorPetr Machata <petrm@mellanox.com>
Sun, 30 Jun 2019 06:04:49 +0000 (09:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jul 2019 01:58:34 +0000 (18:58 -0700)
commitf06181ffc70650fdd2df8eba62c011b5f921f511
tree987164bfc59b1761d069751ec15e25a24d375ad0
parent7b21253f9d85eb0d24c5349168c24764039ef9ea
mlxsw: spectrum: Extract a helper for trap registration

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.

Extract out of mlxsw_sp_traps_init() a generic helper,
mlxsw_sp_traps_register(), and likewise with _unregister(). The new helpers
will later be called with Spectrum-1-specific traps.

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>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c