> Add optional hardware rx timestamp offload for virtio-net. > > Introduce the virtio feature VIRTIO_NET_F_RX_TSTAMP. If negotiated, the > virtio-net header grows by room for a 64 bit TAI timestamp (header > size 40 bytes), stored in struct virtio_net_common_hdr. The layout is > cumulative: the field is at the same offset whether or not the > features before it were negotiated. The fixed layout needs > VIRTIO_F_VERSION_1, so the feature is cleared without it. > > Implement ndo_hwtstamp_get/set so the timestamping can be enabled > and disabled at runtime with SIOCSHWTSTAMP. The driver cannot filter > what the device timestamps, so any rx filter other than NONE becomes > ALL. The timestamp is read before the packet is handed to the XDP > program or the stack, and attached to the skb with skb_hwtstamps(). > It is a raw TAI value; there is no PHC. > [ ... ] > host: nc -4 -u 192.168.1.1 319 > > Based on work by Willem de Bruijn. > > Signed-off-by: Steffen Trumtrar <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/20261112-v6-7-topic-virtio-net-ptp-v5-0-7ab67b572...@pengutronix.de?part=5
