Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed HW timestamping of RX UDP P2P packets. #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peci1
Copy link

@peci1 peci1 commented Jul 2, 2024

The weird behavior is described in the added comment. I really don't understand the silly stuff happening in the card.

Without this fix, UDP P2P sync is broken because the AQC card is reporting SYNC, PDELAY_REQ and PDELAY_RESP packets which are 2 bytes shorter than they should be.

To test, connect a PTP slave computer to the AQC card's ethernet port and run the following on it:

sudo ptp4l -i eno1 -m -l6 -P -4

And run the following on the computer with AQC107 which will be master:

sudo ptp4l -i eno1 -m -l6 -P -4 --priority1 1

You will observe that the slave computer will not be able to sync, because it is not receiving the PDELAY packets, which are swallowed by the network stack because of their wrong length.

Here's a screenshot of a malformed packet in Wireshark:
Snímek obrazovky pořízený 2024-07-02 12-18-58

And captures with and without this PR:
p2p_capture.zip

The weird behavior is described in the added comment.

Signed-off-by: Martin Pecka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant