Repository navigation
redundancy: add: configurable vector sequence recovery - #1426
Open
Afshin-Zanganeh wants to merge 3 commits into
Open
Afshin-Zanganeh wants to merge 3 commits into
Afshin-Zanganeh wants to merge 3 commits into
Conversation
Afshin-Zanganeh
force-pushed
the
feat/frer-vector-recovery
branch
2 times, most recently
from
November 6, 2026 11:14
a15963f to
1784b94
Compare
The existing merger has no reusable sequence-position recovery state. IEEE 802.1CB-2017 defines numbered recovery decisions and history advancement that can be checked independently of packet handling. Add a packet-independent helper with signed modular classification, reset and batched history advancement. Unit fixtures check exhaustive classifications, an independent received-number oracle, loss increments and wraparound. The helper includes the forward-boundary correction published through IEEE 802.1CBdb-2021. Plan: plan/pending/frer-vector-recovery.md Change: src.protocolelement.redundancy.VectorSequenceRecovery | behavior.add | test whatsnew | frer-vector-recovery
A membership-only stream merger cannot simulate vector-recovery acceptance windows, recovery timeouts or individual-member discard reloads. These behaviors affect duplicate elimination after gaps and sender restarts. Add an opt-in merger using the recovery helper. Commit decisions once through the packet-filter hook, maintain one reset event per recovery group and publish cumulative recovery signals with NED last statistics. Preserve the existing merger and its default selection. Module fixtures and protocol-observation traces exercise the production packet path, boundary handling, wraparound and timer policies. The protocol reviewer document at tests/protocol/frer/vector-recovery.md records requirements and scope limits. Plan: plan/pending/frer-vector-recovery.md Change: src.protocolelement.redundancy.VectorStreamMerger | behavior.add | test whatsnew | frer-vector-recovery
Afshin-Zanganeh
force-pushed
the
feat/frer-vector-recovery
branch
from
November 6, 2026 12:24
1784b94 to
67ade12
Compare
Afshin-Zanganeh
marked this pull request as ready for review
November 6, 2026 12:30
levy
reviewed
Nov 6, 2026
levy
left a comment
Contributor
There was a problem hiding this comment.
Other than the marked part, this PR is in a very good shape! Thanks!
| @@ -0,0 +1,112 @@ | |||
| #!/usr/bin/env python3 | |||
Contributor
There was a problem hiding this comment.
what is this file supposed to do in the tests/module folder?
Author
There was a problem hiding this comment.
@levy Thanks for pointing this out. It was a standalone post-processing script for the four showcase simulations. I removed it as it was extra thing.
Users need configuration examples covering failures and sequence wraparound. The new module does not alter existing configurations unless explicitly selected. Document module selection and limitations, add failure and wraparound showcase configurations, with scalar/vector recording for result analysis. Unit, module and protocol fixtures use INET's existing category runners; the protocol reviewer document gives the focused selectors. Existing FRER fingerprint baselines are unchanged. Plan: plan/pending/frer-vector-recovery.md Change: examples | behavior.add | test | frer-vector-recovery
Afshin-Zanganeh
force-pushed
the
feat/frer-vector-recovery
branch
from
November 6, 2026 14:31
67ade12 to
6bc0ce4
Compare
This branch has not been deployed
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.
StreamMerger eliminates duplicates using a bounded list of accepted sequence numbers. It has no sequence-position acceptance window or inactivity reset. This change adds a reusable recovery helper and a selectable VectorStreamMerger for simulations that need the Vector Recovery Algorithm, addressing the sequence-recovery portion of #1069.
The helper tracks received sequence positions and compares numbers modulo 65536. The merger applies recovery once per processed packet, owns a reset timer per recovery instance, and publishes cumulative diagnostic counters. Existing StreamMerger behavior and default module selection are unchanged.
Recovery grouping and window size affect delivery. Inputs sharing an instance must use the same sequence generator, and the history must cover expected sequence gaps and path-delay differences. Timer rounding and simultaneous-event ordering are documented model choices covered by focused tests.
Scope
Implements the documented IEEE 802.1CB-2017 vector recovery behavior with the IEEE 802.1CBdb-2021 forward-window correction. This covers duplicate and rogue rejection, delayed-packet acceptance, sequence wraparound, timeout reset, tagless handling and optional individual-member recovery. Latent error detection, MRA and management tables are outside this contribution.
The module reuses INET's packet-filter interfaces, stream mapping and sequence tags. It adds no on-wire format or core packet API change. It requires complete frames and backpressure=false. Recovery counters are aggregate diagnostics, not standard management tables.
Commit series
redundancy: add: vector sequence recovery stateintroduces the helper and its unit tests.redundancy: add: configurable vector stream mergerintegrates packet processing, timers and statistics, with module and protocol tests.examples: add: vector recovery demonstration and validationadds usage documentation, four network configurations.The implementation plan is
plan/pending/frer-vector-recovery.md. The protocol requirements, test traces and assertions are described intests/protocol/frer/vector-recovery.md.Configuration
Examples are in
showcases/tsn/framereplication/vectorrecovery.Validation
Linux debug and release builds of the recovery implementation passed. Both modes passed all 2 unit, 11 module and 8 protocol fixtures: 42 focused test executions. Native ASan/UBSan checks also passed, including differential transitions and multiple sequence wraps.
Tests use INET's existing
opp_run_unit_tests,opp_run_module_testsandopp_run_protocol_testsrunners. Exact build commands and selectors are documented in the protocol reviewer document. The showcase README gives the network commands and the recorded scalar/vector results. The change adds no VRA-specific runner and leaves existing fingerprint baselines unchanged.The separate full-network campaign checks four scenarios in both modes and the five existing FRER fingerprint cases with the stored non-graphical ingredients. Its final result is still being collected.