Addresses PR #46 review comments:#50
Merged
Merged
Conversation
…iant Addresses PR marklynch#46 review comments: the resync type switch now has a default branch (resyncs_unexpected) so total stays consistent with the breakdown if a new resync type is added, and decode_message documents that it relies on the framing layer for validation since it is also called directly from the TX-echo path and test harness.
Owner
|
Ah yep sorry about the conflicting suggestions on the locking. Let's leave it for now. We may end up going back to original implementation if there is no memory pressure. But let's leave for now. Thanks for looking at the others. |
marklynch
approved these changes
Jun 25, 2026
Contributor
Author
|
All good. In terms of memory pressure I had added it to status so we can keep an eye on it. Mine at the moment - memory: { |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add default case for resync counter and document decode_message invariant
The resync type switch now has a default branch (resyncs_unexpected) so total stays consistent with the breakdown if a new resync type is added, and decode_message documents that it relies on the framing layer for validation since it is also called directly from the TX-echo path and test harness.
This code is from an earlier patch. I originally wrote it as 'snapshot and build from copy' to lock for as little as possible, but the review comments for that patch suggested changing it to 'stream under lock', so I changed it to the way it is now. Either will work, first way costs a 9KB malloc (or I could do it statically), second holds the lock a bit longer.
Let's pick one way.
Done. The resync type switch now has a default branch to capture unexpected reasons (resyncs_unexpected).
Done. Comment added.