-
Notifications
You must be signed in to change notification settings - Fork 296
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
Fixing stale Tx timestamp fetch. #728
Conversation
@mgalka, thank you for this pull request at the detailed notes. I assume you have actually observed what you are fixing here? |
@andrew-elder Yes, I've observed the behaviour on a non-PC device. I couldn't reproduce the it though on a regular PC with i210 NIC, probably due to being unable to reproduce I/O load high enough to get the PDelay timeout to occur. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
If you wouldn't mind, it would be helpful to add some sort of documentation about what you're doing; e.g. why pick 46 for the length of reflected_bytes, or why add 14 to reflected_bytes to get gptpCommonHeader? Comments/#defines would be fine.
I think I know the answers, but it took a while to check up on them and it would be helpful to future reviewers to not have to wonder about them.
@mgalka - are you going to be able to address @pinealservo's comments? I really do appreciate this pull request and look forward to getting it merged! |
@pinealservo @andrew-elder Let's keep the explanation here also for the sake of clarity: The size of the I added a define I used |
@mgalka - looks good to me. I'm merge in the next 24 hours if I don't see any other comments. @christopher-s-hall - do you have any comments on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update; it's definitely clearer now.
This looks fine to me assuming that it still works with I210. I don't have the time to test right now. |
Thanks for the feedback @christopher-s-hall, merging... |
It fixes daemon_cl behavior in the following situation.
This fix discards stale Tx timestamps. It checks message type and sequence id of the reflected packet to see if it contains the timestamp for the frame being sent at the moment. In case it doesn't the timestamp is discarded.