在fec_ptp_start_cyclecounter函数中,会调用timercounter_init将系统时间同步到ptp时间。但是fec_ptp_start_cyclecounter函数在多个场景下都会调用到,ptp时间可能会多次从系统时间同步,这样ptp时间就可能出现跳变。
根据对gptp协议栈的理解,ptp时间在gptp协议栈启动后就不应该再出现跳变,应该只是在初始时间基础上随着硬件时钟递增。而且这个初始时间其实不太重要,因为gptp是相对时间协议。所以我理解,fec_ptp_start_cyclecounter中的timercounter_init是不是单板上电之后只调用一次即可,多次调用反而有时间跳变的风险?这样修改是否可行,会不会有什么影响?
Hi @mahongfei
I hope you are doing well.
fec_ptp_start_cyclecounter() is called once when the board is powered on or FEC restart happens. and it will not be called every-time when time synchronization happens.
Thanks & Regards
Sanket Parekh
@Sanket_Parekh ,是的,我们看到在link change,eth open和ethtool/ioctl set feature等场景下,都会有fec restart,然后重新同步时间。
这里重新同步就会导致时间跳变,进而影响到我们gptp协议栈正常工作。
我们想要把fec_ptp_start_cyclecounter()修改为上电之后只调用一次?请问会有什么影响吗?
Hi @mahongfei ,