Microchip-Ethernet / EVB-KSZ9477

Repository for using Microchip EVB-KSZ9477 board. Product Supported: KSZ9477, KSZ9567, KSZ9897, KSZ9896, KSZ8567, KSZ8565, KSZ9893, KSZ9563, KSZ8563, LAN9646, Phys(KSZ9031/9131, LAN8770
76 stars 79 forks source link

KSZ9477 PTP Delay Request Packet Flooding #56

Open miazan opened 3 years ago

miazan commented 3 years ago

Hi,

I am using the KSZ9477 as a PTP boundary clock. I've run into an issue where if I use a Time Machines TM2000A GPS Clock as a grandmaster, the KSZ9477 connected to the grandmaster begins flooding the connection with Delay Request packets. The initial few exchanges occur and a reasonable pace, but the KSZ9477 soon begins sending dozens of delay_req packets per sync packet. After a few hours, the ptp4l process on the port connected to the grandmaster crashes.

I have not seen this problem arise with any other master clock I have tested. These include a second KSZ9477, a computer running ptp4l, a program simulating a PTP master clock, and a different GPS clock. With each clock, where applicable, I tested both P2P and E2E setups with both UDPv4 and layer 2 communications. In no instance was I able to replicate the packet flooding I saw when I used the KSZ9477 with the TM2000A clock.

I have also determined that the KSZ9477 clock I am using does function correctly as a PTP master clock since I was able to successfully sync to it with every other PTP device I tested.

danglin44 commented 3 years ago

I don't know about the packet flooding but ptp4l has a memory leak. Memory is leaked when the KSZ9477 loses a timestamp. Eventually, ptp4l is unable to allocate more memory and crashes. You can see this with top.