]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use hardware timestamps to report packet timestamps for SO_TIMESTAMP
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 7 Nov 2017 09:46:26 +0000 (09:46 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 7 Nov 2017 09:46:26 +0000 (09:46 +0000)
commit06193f0be0046a13669732f29265b1e171187a14
treeeb12ff9caec879aa3ba56b2a5cbb123b8d8a1f3b
parent3cf8254f1ea9666c9cd7bd55e56b4c8543505113
Use hardware timestamps to report packet timestamps for SO_TIMESTAMP
and other similar socket options.

Provide new control message SCM_TIME_INFO to supply information about
timestamp.  Currently it indicates that the timestamp was
hardware-assisted and high-precision, for software timestamps the
message is not returned.  Reserved fields are added to ABI to report
additional info about it, it is expected that raw hardware clock value
might be useful for some applications.

Reviewed by: gallatin (previous version), hselasky
Sponsored by: Mellanox Technologies
MFC after: 2 weeks
X-Differential revision: https://reviews.freebsd.org/D12638
sys/netinet/ip_input.c
sys/netinet6/ip6_input.c
sys/sys/socket.h