perf(shred): reuse recovered shred metadata — trim recovery-path parse and copy work#92
Merged
Merged
Conversation
87842d6 to
aaca6c5
Compare
38f9df5 to
a747226
Compare
ec1cc83 to
6e3d80a
Compare
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
Reduce recovered-shred packet-worker overhead without changing SOF API contracts or feature scope.
This PR stops reparsing recovered data shreds in packet workers and reuses recovered header metadata to build payload fragments without cloning the recovered payload into a second buffer.
Changes
Detailed list of what changed:
crates/sof-observer/src/shred/fec/recover.rs: return recovered data packets together with parsed data-header metadata instead of only raw bytes.crates/sof-observer/src/shred/fec/core.rs: thread the recovered metadata throughFecRecoverer::ingest_packet.crates/sof-observer/src/app/runtime/runloop/packet_workers.rs: verify recovered bytes in place, then buildSharedPayloadFragmentfrom the recovered packet bytes and parsed offsets instead of reparsing and cloning payload data.crates/sof-observer/src/app/runtime/prelude.rs: remove now-unused shred parse imports exposed by the old path.For slice-related changes, include:
shred/fec,app/runtime/runloop.Motivation
Business motivation:
Technical motivation:
SharedPayloadFragment::owned.Alternative approaches considered:
Scope and impact
328 msto316 msover20,000recovery iterations.Testing
Commands/results:
Results: passed.
Related issues and documentation
docs/operations/tx-reconstruction-and-packet-processing-todo-2026-03-24.mddocs/architecture/README.mdReviewer checklist
docs/architecture/ard/0003-slice-dependency-contracts.md)Additional notes
This PR is intentionally stacked on
perf/fec-primary-reparse-skipbecause it reuses the new parsed-header handoff added there.