public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp handling
@ 2026-04-29  9:16 Kohei Enju
  2026-04-29  9:16 ` [PATCH net v1 1/3] net: introduce helper to resolve hardware timestamps from skb Kohei Enju
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kohei Enju @ 2026-04-29  9:16 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Willem de Bruijn, David Ahern,
	Neal Cardwell, Gerhard Engleder, Jonathan Lemon, Richard Cochran,
	Kohei Enju

Since commit 97dc7cd92ac6 ("ptp: Support late timestamp determination"),
skb_shared_hwtstamps may carry netdev_data instead of a resolved
hwtstamp. AF_PACKET and TCP could still read that storage as a ktime_t
and report bogus hardware timestamps to userspace.

This series factors the late timestamp resolution logic into a common
helper, then switches AF_PACKET and TCP to use it.

Notes on SOF_TIMESTAMPING_BIND_PHC:
The generic socket receive timestamping path honors it, but the
AF_PACKET and TCP receive paths touched here haven't implemented that
behavior.
This series doesn't change that; those paths always resolve timestamps
with cycles == false and preserve their timestamp-domain semantics.

Kohei Enju (3):
  net: introduce helper to resolve hardware timestamps from skb
  af_packet: use skb_get_hwtstamp() for hardware timestamps
  tcp: use skb_get_hwtstamp() for hardware timestamps

 include/linux/skbuff.h | 11 +++++++++++
 include/net/tcp.h      |  2 +-
 net/core/skbuff.c      | 27 +++++++++++++++++++++++++++
 net/ipv4/tcp_input.c   |  3 ++-
 net/ipv4/tcp_ipv4.c    |  6 ++++--
 net/ipv6/tcp_ipv6.c    |  3 ++-
 net/packet/af_packet.c |  2 +-
 net/socket.c           | 27 +++------------------------
 8 files changed, 51 insertions(+), 30 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-05-01 20:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29  9:16 [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp handling Kohei Enju
2026-04-29  9:16 ` [PATCH net v1 1/3] net: introduce helper to resolve hardware timestamps from skb Kohei Enju
2026-04-29 21:04   ` Willem de Bruijn
2026-04-30  4:50     ` Kohei Enju
2026-05-01 20:25   ` Gerhard Engleder
2026-04-29  9:16 ` [PATCH net v1 2/3] af_packet: use skb_get_hwtstamp() for hardware timestamps Kohei Enju
2026-04-29  9:16 ` [PATCH net v1 3/3] tcp: " Kohei Enju
2026-04-29 21:09   ` Willem de Bruijn
2026-04-30  5:07     ` Kohei Enju
2026-04-30  6:09       ` Eric Dumazet
2026-04-30  6:52         ` Kohei Enju

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox