Aquantia / AQtion

Aquantia AQC multigigabit NIC linux driver (atlantic) - development preview
https://www.aquantia.com
82 stars 28 forks source link

Fixed HW timestamping of RX UDP P2P packets. #58

Open peci1 opened 1 week ago

peci1 commented 1 week ago

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