Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by John Gildred
Sat, 10 Oct 2026 06:37
[BUG] atlantic: PTP receive time stamp left on, or cut from, frames
Author: John Gildred
Date: Sat, 10 Oct 2026 06:37
Date: Sat, 10 Oct 2026 06:37
71 lines
11043 bytes
11043 bytes
Hello,
On an AQC107 (TP-Link TX401, PCI 1d6a:07b1 rev 02, firmware 3.1.100)
with the in-tree atlantic driver, received PTP frames reach user space
with the hardware receive time stamp handled wrongly, in two ways. The
kernel is a distribution build of 7.2.5; I have not tried net-next yet.
It is tainted only by NVIDIA's out-of-tree graphics driver (flags O
and E), which has no part in the network path. The recent mainline
changes to atlantic (AQC113 PTP support in June 2026, RX and TX buffer
fixes in August) do not seem to touch the AQC107's receive time
stamps.
linuxptp's ptp4l 4.4 runs on the port with hardware time stamping and
the L2 transport, so the receive filter is
HWTSTAMP_FILTER_PTP_V2_L2_EVENT. The frame lengths below are as
dumpcap captures them on the receiving port.
1. After the link renegotiates, multicast PTP frames keep the time
stamp.
Changing the pause parameters while the link is up
(ethtool -A enp2s0 autoneg off rx off tx off), or unplugging the cable
and plugging it back in, renegotiates the link. From then on every PTP
frame received for 01:1B:19:00:00:00 or 01:80:C2:00:00:0E arrives 12
octets longer than before: a 60-octet Sync arrives as 72, a 92-octet
Follow_Up as 104, a 104-octet Announce as 116, a 68-octet Pdelay_Req
as 80. The extra octets follow the PTP message and look like the time
stamp: one of them counts up by one each second. ptp4l takes them for
a malformed TLV and drops every message ("bad message"), so the port
never synchronizes.
Restarting ptp4l, which sets SIOCSHWTSTAMP again, does not help.
"ip link set dev enp2s0 down" followed by "up" does, until the next
renegotiation. Taking the interface down and up does not itself cause
the fault.
2. Unicast PTP frames lose their last 12 octets.
With the link in the good state, a Delay_Resp sent to the port's own
MAC address (ptp4l's hybrid_e2e, IEEE 1588-2019 16.9) arrives as 56
octets. A tap on the sender's link shows 72 octets plus FCS on the
wire: 14 octets of Ethernet header, a VLAN 0 priority tag (PCP 7),
which the port strips, and the 54-octet Delay_Resp. 56 is below the
Ethernet minimum and is exactly the 68 octets left after the tag less
12, so the driver appears to remove a trailer the hardware never
appended. The Delay_Resp loses the end of receiveTimestamp and all of
requestingPortIdentity, and ptp4l drops it. Multicast PTP frames
arrive whole in the same state.
Both look like the driver and the hardware disagreeing about which
received frames carry a time stamp: after a renegotiation the hardware
still appends it to multicast PTP frames but the driver no longer
takes it off, and for unicast PTP frames the driver takes off 12
octets the hardware did not append.
To reproduce, with the AQC107 port linked to a PTP grandmaster that
sends L2 PTP (any 802.1AS bridge, or an IEEE 1588 L2 grandmaster):
# ptp4l -i enp2s0 -f configs/gPTP.cfg -m (syncs)
# ethtool -A enp2s0 autoneg off rx off tx off (renegotiates)
ptp4l now logs "port 1 (enp2s0): bad message" for every frame
and for the unicast case, ptp4l with "hybrid_e2e 1" and
"delay_mechanism E2E" on L2 against a grandmaster that answers unicast
Delay_Req: every Delay_Resp is dropped.
I can test patches, and capture more (frames, register dumps) on this
card.
Thanks,
John Gildred
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads