Messages in this thread |  | | Date | Thu, 10 Apr 2025 20:40:12 +0100 | | From | "Russell King (Oracle)" <> | | Subject | Re: [PATCH net-next v2 2/2] net: phy: Add Marvell PHY PTP support |
| |
On Thu, Apr 10, 2025 at 07:16:47PM +0100, Russell King (Oracle) wrote: > On Thu, Apr 10, 2025 at 06:02:05PM +0200, Kory Maincent wrote: > > On Thu, 10 Apr 2025 16:41:06 +0100 > > "Russell King (Oracle)" <linux@armlinux.org.uk> wrote: > > > > > On Thu, Apr 10, 2025 at 11:17:54AM +0200, Kory Maincent wrote: > > > > On Wed, 9 Apr 2025 23:38:00 +0100 > > > > "Russell King (Oracle)" <linux@armlinux.org.uk> wrote: > > > > > On Wed, Apr 09, 2025 at 06:34:35PM +0100, Russell King (Oracle) wrote: > > > > > > > > > > > > With that fixed, ptp4l's output looks very similar to that with mvpp2 - > > > > > which doesn't inspire much confidence that the ptp stack is operating > > > > > properly with the offset and frequency varying all over the place, and > > > > > the "delay timeout" messages spamming frequently. I'm also getting > > > > > ptp4l going into fault mode - so PHY PTP is proving to be way more > > > > > unreliable than mvpp2 PTP. :( > > > > > > > > That's really weird. On my board the Marvell PHY PTP is more reliable than > > > > MACB. Even by disabling the interrupt. > > > > What is the state of the driver you are using? > > > > > > Right, it seems that some of the problems were using linuxptp v3.0 > > > rather than v4.4, which seems to work better (in that it doesn't > > > seem to time out and drop into fault mode.) > > > > > > With v4.4, if I try: > > > > > > # ./ptp4l -i eth2 -m -s -2 > > > ptp4l[322.396]: selected /dev/ptp0 as PTP clock > > > ptp4l[322.453]: port 1 (eth2): INITIALIZING to LISTENING on INIT_COMPLETE > > > ptp4l[322.454]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on > > > INIT_COMPLETE ptp4l[322.455]: port 0 (/var/run/ptp4lro): INITIALIZING to > > > LISTENING on INIT_COMPLETE ptp4l[328.797]: selected local clock > > > 005182.fffe.113302 as best master > > > > > > that's all I see. If I drop the -2, then: > > > > It seems you are still using your Marvell PHY drivers without my change. > > PTP L2 was broken on your first patch and I fixed it. > > I have the same result without the -2 which mean ptp4l uses UDP IPV4. > > I'm not sure what you're referring to.
Okay, turns out to be nothing to do with any fixes in my code or not (even though I still don't know what the claimed brokenness you refer to actually was.)
It turns out to be that ptpdv2 sends PTP packets using IPv4 UDP *or* L2, and was using IPv4 UDP. Adding "ptpengine:transport=ethernet" to the ptpdv2 configuration allows ptp4l -2 to then work.
-- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
|  |