af_packet/tcp: fix late hardware timestamp handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net: introduce helper to resolve hardware timestamps from skbinclude/ net/ net/ | +41 | 3 replies | |
| 2/3 | af_packet: use skb_get_hwtstamp() for hardware timestampsnet/ | +1 | 0 replies | |
| 3/3 | tcp: use skb_get_hwtstamp() for hardware timestampsinclude/ net/ net/ +1 more | +9 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net v1 0/3] af_packet/tcp: fix late hardware timestamp handling
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(-)
Signature · 1 line
2.53.0