]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Support ethtool 'get_ts_info' callback in Spectrum-2
authorDanielle Ratson <danieller@nvidia.com>
Wed, 27 Jul 2022 06:23:28 +0000 (09:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Jul 2022 10:02:24 +0000 (11:02 +0100)
commitac4862d561b1e28347e50c1aff12425cfb00e190
treed4f50153e92776466c2bb5c9c0c150fd0db89cd2
parentb7979f48c9b8a28b8383e19e0a3d1d0a33dd7659
mlxsw: spectrum: Support ethtool 'get_ts_info' callback in Spectrum-2

The 'get_ts_info' callback is used for obtaining information about
time stamping and PTP hardware clock capabilities of a network device.

The existing function of Spectrum-1 is used to advertise the PHC
capabilities and the supported RX and TX filters. Implement a similar
function for Spectrum-2, expose that the supported 'rx_filters' are all
PTP event packets, as for these packets the driver fills the time stamp
from the CQE in the SKB.

In the future, mlxsw driver will be extended to support one-step PTP in
Spectrum-2 and newer ASICs. Then additional 'tx_types' will be supported.

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h