Repository navigation
Fix #535, keep the leading-edge chunk when the chunk list is full - #536
Open
SpaceOceanCorp wants to merge 1 commit into
Open
SpaceOceanCorp wants to merge 1 commit into
SpaceOceanCorp wants to merge 1 commit into
Conversation
A full chunk list dropped a new chunk unless it was larger than the smallest tracked chunk. The first PDU after each new gap is a single PDU, so it and every later contiguous PDU went untracked and were NAKed again. Keep a chunk that lies past every tracked chunk, evicting the smallest.
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.
Description of Change
CF_Chunks_Insertnow keeps a chunk that lies past every tracked chunk when the list is full, evicting the smallest tracked chunk. Previously such a chunk was kept only if it was larger than the smallest one. The first PDU after each new gap is a single PDU, so it and every later contiguous PDU went untracked and were NAKed again. A chunk inside the tracked range keeps the existing rule. One condition infsw/src/cf_chunk.c, plus a comment.Linked Issue
Closes #535
Requirements Impact
Testing Evidence
Unit Tests (UT Assert)
New
Test_CF_Chunk_AddFullKeepsLeadingEdgeinunit-test/cf_chunk_tests.c: a small chunk inside the tracked range is still dropped; a small chunk past every tracked chunk replaces the smallest; contiguous data then extends it. Run locally againstcf_chunk.cwith ASan and UBSan: 140 assertions pass with the change. The new test fails without it (6 assertions), and the existing chunk tests pass both ways. In the cFS bundle (029b3ab,native_std, unit tests enabled) with this branch, CF builds with no warnings and all 14 CF unit-test suites pass.Simulation and fuzz results are in #535: at 5% loss with the default list, PDUs sent fall from 9,827 to 6,520 and NAK rounds from 8 to 4; 5.8 million random adds show no unreceived byte is ever tracked.
Live run against the cFS bundle
core-cpu1from the bundle at 029b3ab (CF atdev0dbc2b7, default tables), with this one condition applied or not. An independent CFDP sender (cfdp-py 0.7.0) uploads a 1 MB file in Class 2 through CI_LAB, as 2,084 file-data PDUs of 480 bytes at 20 PDUs/s, and receives CF's replies through TO_LAB. Every PDU in both directions is dropped with the given probability (seeded). In all 10 runs the received file's SHA-256 matches, the measured loss is within 0.7 percentage points of the target, and there are no Software BusMsg Limit Errevents on CF's input pipe.At 5% loss the change removes 17.7 to 20.5% of the file-data PDUs, and at 10% loss 29.5%.
COSMOS Test Suite
N/A: no telemetry, command or table changes.
Areas of Expertise Touched
Author Checklist
.clang-format(cFS dev, clang-format 19.1.7)CLA: cFS Apps corporate CLA filed by Space Ocean Corp.