]> 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)
commite9964564dc867fb850fc5389d1aba123a9682017
tree65dc1baabdb9e2aefc4208f358f6eec3bf54154d
parentad3b2d3b10282604264f750eb9c35094f1641887
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