net/mlx5e: Add PTP Hardware Clock (PHC) support
Add a PHC support to the mlx5_en driver. Use reader/writer spinlocks to protect the timecounter since every packet received needs to call timecounter_cycle2time() when timestamping is enabled. This can become a performance bottleneck with RSS and multiple receive queues if normal spinlocks are used. The driver has been tested with both Documentation/ptp/testptp and the linuxptp project (http://linuxptp.sourceforge.net/ ) on a Mellanox ConnectX-4 card. Signed-off-by:Eran Ben Elisha <eranbe@mellanox.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com> Acked-by:
Richard Cochran <richardcochran@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/mellanox/mlx5/core/Kconfig 1 addition, 0 deletionsdrivers/net/ethernet/mellanox/mlx5/core/Kconfig
- drivers/net/ethernet/mellanox/mlx5/core/en.h 3 additions, 0 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en.h
- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c 100 additions, 0 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_clock.c
- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c 2 additions, 1 deletiondrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
Please register or sign in to comment