On Fri, Jun 30, 2023 at 10:14:06AM +0200, Stephan Wurm wrote: > The PRP trailer detection used a minimum frame size of 70 octets. This > minimum applies to whole ethernet packet frames, consisting of headers, > payload and frame check sequence (FCS). > > Under Linux, VLAN header and FCS are usually removed from messages > received from a packet socket, hence the real minimum is at least four > octets smaller (66 octets), but can also vary depending on additional > headers. > > Therefore, the original implementation worked fine only for frames > larger than 70 octets, but failed for smaller and padded frames. This > mostly affected Sync and Follow_Up messages. > As a consequence, ptp4l reported bad messages and failed > synchronization with the port state stuck to UNCALIBRATED forever. > > With additional VLAN header in the PTP frames this was even worse. > When the VLAN header was not properly detected, the header length used > for minimum packet length and padding was just not reliable. And > when using a logical VLAN device, there is no easy way to detect VLAN > header at all. > > Therefore, the whole minimum length check and padding detection is > removed. Instead, the PRP trailer is always taken from the last six > octets of the message, as long as it fits between the end of the > PTP data and the FCS (end of message). > > Signed-off-by: Stephan Wurm <stephan.w...@a-eberle.de>
Applied. Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel