forked from richardcochran/linuxptp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in unlucky sync/follow up handling.
Ken Ichikawa has identified a situation in which a sync message can be wrongly associated with a follow up after the sequence counter wraps around. Port is LISTENING Sync (seqId 0) : ignored Fup (seqId 0) : ignored Sync (seqId 1) : ignored Port becomes UNCALIBRATED here Fup (seqId 1) : cached! Sync (seqId 2) : cached Fup (seqId 2) : match Sync (seqId 3) : cached Fup (seqId 3) : match ... Sync (seqId 65535) : cached Fup (seqId 65535) : match Sync (seqId 0) : cached Fup (seqId 0) : match Sync (seqId 1) : match with old Fup!! Fup (seqId 1) : cached! Sync (seqId 2) : cached Fup (seqId 2) : match Actually, I experienced 65500 secs offset every about 65500 secs. I'm thinking this is the cause. This patch fixes the issue by changing the port code to remember one sync or one follow up, never both. The previous ad hoc logic has been replaced with a small state machine that handles the messages in the proper order. Signed-off-by: Richard Cochran <[email protected]> Reported-by: Ken ICHIKAWA <[email protected]>
- Loading branch information
1 parent
7789f0c
commit 7be0698
Showing
1 changed file
with
120 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters