Skip to content

Fixed HW timestamping of RX UDP P2P packets.#58

Open
peci1 wants to merge 1 commit intoAquantia:masterfrom
ctu-vras:fix_udp_p2p
Open

Fixed HW timestamping of RX UDP P2P packets.#58
peci1 wants to merge 1 commit intoAquantia:masterfrom
ctu-vras:fix_udp_p2p

Conversation

@peci1
Copy link
Copy Markdown

@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 <peckama2@fel.cvut.cz>
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.

1 participant