-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: ptp: Misc clock sync bugs #75611
Conversation
Offset should be *subtracted* from current clock value, not added. This was causing clock to accumulate error instead of actually "converging". Signed-off-by: Benjamin Cabé <[email protected]>
BTW it looks like it would probably be a good thing to check the return values of the calls to |
@kartben first of all thank you for the contribution and time you spent on finding the bug. Regarding checking return values from ptp_clock driver, it could be added for debugging purposes (logging some message when it fails). I'm not sure if handling failure and passing this info to |
Fixes issues with net_ptp_time arithmetic where second overflow/underflow would not be handled properly. Signed-off-by: Benjamin Cabé <[email protected]> Signed-off-by: Adam Wojasinski <[email protected]>
f2ef044
to
bbaacb1
Compare
ptp_clock_synchronize()