]> git.baikalelectronics.ru Git - kernel.git/commit
net: sock: extend SO_TIMESTAMPING for PHC binding
authorYangbo Lu <yangbo.lu@nxp.com>
Wed, 30 Jun 2021 08:11:59 +0000 (16:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jul 2021 20:08:18 +0000 (13:08 -0700)
commita46ab78897d0ebcc984e303e684ace87133a9c01
tree65dc1baabdb9e2aefc4208f358f6eec3bf54154d
parent31afcd04a3eda3b388ca9a386be015793e565c2b
net: sock: extend SO_TIMESTAMPING for PHC binding

Since PTP virtual clock support is added, there can be
several PTP virtual clocks based on one PTP physical
clock for timestamping.

This patch is to extend SO_TIMESTAMPING API to support
PHC (PTP Hardware Clock) binding by adding a new flag
SOF_TIMESTAMPING_BIND_PHC. When PTP virtual clocks are
in use, user space can configure to bind one for
timestamping, but PTP physical clock is not supported
and not needed to bind.

This patch is preparation for timestamp conversion from
raw timestamp to a specific PTP virtual clock time in
core net.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
include/uapi/linux/net_tstamp.h
net/core/sock.c
net/ethtool/common.c
net/mptcp/sockopt.c