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)
commitd463126e23f112629edb01594141ca437a92a108
tree65dc1baabdb9e2aefc4208f358f6eec3bf54154d
parent6c9a0a0f2333b1e3c29fef47a8b12131fce4905b
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