Nvethernet PTP bug

To replicate issue 1, download master branch of linuxptp to two computers, build and install it. Copy the configs folder to /etc/linuxptp. Connect the two computers to the same wired network.

Run this command on a different PTP-capable computer:

sudo ptp4l -H -i eno1 -f /etc/linuxptp/automotive-master.cfg --step_threshold=0.001 -m -l6

And run this on the Orin:

sudo ptp4l -H -i mgbe0 -f /etc/linuxptp/automotive-slave.cfg --step_threshold=0.001 -m -l7

You can try setting different values of tx_timestamp_timeout in the automotive-slave.cfg. The default is 10.

If you try with 10 or 5, the timeout will occur much more often.


I now let linuxptp run over the weekend with 20 ms timeout, and here’s the log of events when the timestamp polling timed out. Looking at the timestamps at the beginning of the lines, you can tell how otfen the polling fails - approx. once in 5000 seconds. Linuxptp is configured by default to send one delay request a second, and delay request packets are exactly those that need to poll the tx timestamp. So generalizing a bit, it seems that with 20 ms timeout, there is a 1/5000 chance that tx timestamp polling will fail.

[27886.568202] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[27886.568261] Maximum registrations reached
[37519.798199] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[37519.798258] Maximum registrations reached
[43891.268918] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[43891.268978] Maximum registrations reached
[48917.816830] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[48917.816897] Maximum registrations reached
[53400.743378] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[53400.743443] Maximum registrations reached
[58950.664277] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[58950.664339] Maximum registrations reached
[64958.753548] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[64958.753607] Maximum registrations reached
[67624.451120] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[67624.451184] Maximum registrations reached
[80001.141025] Maximum registrations reached
[86908.296045] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[86908.296105] Maximum registrations reached
[88827.543319] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[88827.543385] Maximum registrations reached
[91939.849184] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[91939.849240] Maximum registrations reached
[105350.831237] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[105350.831270] Maximum registrations reached
[105472.919689] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[105472.919747] Maximum registrations reached
[116061.185679] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[116061.185735] Maximum registrations reached
[118566.006938] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[118566.007006] Maximum registrations reached
[120003.362164] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[120003.362229] Maximum registrations reached
[121265.013041] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[121265.013103] Maximum registrations reached
[140214.452390] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[140214.452449] Maximum registrations reached
[146416.118631] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[146416.118693] Maximum registrations reached
[148250.666738] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[148250.666795] Maximum registrations reached
[150054.758534] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[150054.758600] Maximum registrations reached
[153808.534033] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[153808.534066] Maximum registrations reached
[173535.119174] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[173535.119237] Maximum registrations reached
[181168.894124] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[181168.894183] Maximum registrations reached
[184647.896640] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[184647.896703] Maximum registrations reached
[192097.708232] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[192097.708296] Maximum registrations reached
[196066.864019] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[196066.864078] Maximum registrations reached
[198730.586151] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[198730.586215] Maximum registrations reached
[206010.531109] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[206010.531174] Maximum registrations reached
[220313.686634] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[220313.686691] Maximum registrations reached
[220341.278806] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[220341.278872] Maximum registrations reached
[226589.942661] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[226589.942721] Maximum registrations reached
[229599.062060] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[229599.062117] Maximum registrations reached
[229921.762971] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[229921.763032] Maximum registrations reached
[234684.570617] nvethernet 6810000.ethernet: config.flags = 0x0, tx_type = 0x1,rx_filter = 0xc
[234684.570670] Maximum registrations reached