Skip to content

ieee80211: add partial HT A-MPDU PHY reception - #1363

Open
mgonzalezlopezudc wants to merge 10 commits into
inet-framework:masterfrom
mgonzalezlopezudc:work/ieee80211-ampdu-implicit-blockack
Open

mgonzalezlopezudc wants to merge 10 commits into
inet-framework:masterfrom
mgonzalezlopezudc:work/ieee80211-ampdu-implicit-blockack

Conversation

@mgonzalezlopezudc

@mgonzalezlopezudc mgonzalezlopezudc commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Before this change, the HT receiver made one error decision for the complete A-MPDU. That result could not describe successful MPDUs beside a failed MPDU. HT-SIG byte conversion also lost the fields that identify an aggregate.

The radio now preserves HT-SIG fields and CRC through byte conversion. The receiver checks the common header, identifies bounded delimiter and MPDU ranges, and samples each range separately. The medium cache retains these outcomes, so repeated queries consume no extra random draws.

flowchart LR
    A[HT A-MPDU] --> B{Common PHY checks pass?}
    B -->|No| C[Reception fails]
    B -->|Yes| D{PSDU contains the declared bytes?}
    D -->|No| E[DATA fails without range outcomes]
    D -->|Yes| F[Inspect delimiter and MPDU ranges]
    F --> G[Sample and cache range outcomes]
    G --> H[Copy outcomes into a PHY indication]
Loading

The protocol fixture sends MPDUs of 100, 101, and 102 octets. In its middle-loss case, only the 101-octet MPDU fails. The PHY preserves the aggregate bytes and every range outcome. MAC member acceptance and implicit Block Ack remain outside this PR. The MAC receive component, Rx, rejects aggregate containers before standalone FCS or MAC header checks, even when every MPDU succeeds.

flowchart LR
    A[One aggregate] --> B[MPDU 1 succeeds]
    A --> C[MPDU 2 fails]
    A --> D[MPDU 3 succeeds]
    B --> E[Preserved bytes and copied outcomes]
    C --> E
    D --> E
    E --> F[Rx rejects the aggregate container]
    F --> G[Drop signal retains PHY outcomes]
Loading

The supported aggregate profile covers HT mixed format at 20 MHz, NIST or Yans, both GIs, and scalar or dimensional radios. Range outcomes use independent draws and the configured scalar SNIR reduction. The model does not represent correlated FEC errors or interference changes within one MPDU. Padding adds duration without a separate outcome. Ordinary reception, random draws, and local interframe history are the main regression risks.

Commits, in review order

  1. cfa0572842: Defines PHY and future MAC stages; changes plans only.
  2. b0c1d3318e: Corrects VHT header identity; includes its protocol test, guide, and parent comparison.
  3. 318d6c1688: Adds a bounded aggregate inspector and unit tests; prepares later callers.
  4. 994ca739b9: Recovers complete MPDUs after malformed delimiters; includes its protocol test, guide, and parent comparison.
  5. d221c4ce70: Preserves all 48 HT-SIG bits and CRC; includes wire tests and the parent comparison.
  6. f0f27e48cb: Adds pure NIST/Yans range probabilities; prepares receiver integration without random draws.
  7. f56610d3ba: Adds cached partial reception, copied outcomes, capability checks, and safe MAC rejection; includes the extended protocol fixture.
  8. 7b852672b6: Adds seeded NIST/Yans receiver tests for outcomes, cache reuse, and random draws.
  9. e916480688: Adds ordinary reception controls and documents model limits without production changes.
  10. a0f9a35195: Records the ten commit decisions, parent comparisons, verification results, and coverage limits.

The series starts from master at f5612791b7, which includes PR #1345. The VHT factory correction is a prerequisite. It prevents a VHT mode from entering HT validation with an HT header. The bounded inspector and probability contract remain preparation commits until their production consumers appear later in the series.

The architectural surface includes the HT header, serializer, deaggregation, radio, receiver, indication tags, and MAC receive-capability validation. The optional WLAN contract, IIeee80211AmpduErrorModel, supplies mode-support queries and range probabilities. The generic error-model contract and sealed Packet API remain unchanged. This PR adds no production configuration parameter. VHT gains correct header identity without aggregate reception support.

Custom HT error models must implement the optional contract and cover advertised receive modes. Unsupported coverage causes cRuntimeError. An absent error model retains common PHY checks without error draws. Aggregate error-rate estimates use NaN with a present model. The migration guide explains the override contract and failure behavior.

Protocol regressions in the behavior commits

Each of the four behavior commits contains its protocol fixture, guide, and comparison record. The same fixture bytes compile on that commit and its immediate parent. Fresh debug builds precede both executions. Every parent fixture fails during execution at its intended assertion or production error. Every behavior commit passes its complete selected fixture.

Protocol fixture Parent observation Behavior commit Comparison record
WifiVhtHeaderIdentity.test The VHT class assertion fails. One later run is skipped. Both GI runs pass. VHT header identity
WifiMpduDeaggregation.test Two complete-input controls pass. Malformed extraction errors. One later run is skipped. All four runs pass. Bounded deaggregation
WifiHtAmpduWire.test The serializer writes zero bits for a 48-bit header. One later run is skipped. Typed and raw-byte runs pass. HT-SIG bytes
WifiHtAmpduPartialReception.test The copied indication is absent at the Rx drop. The 31 later runs are skipped. All 32 runs pass. Partial reception

The wire and reception fixtures use OMNeT++ descriptors to read new fields without a compile-time dependency on missing parent APIs. Missing fields still fail at runtime. No expected-failure declaration weakens the assertions. Cmdenv stops each parent campaign after its first error. The records distinguish that error from later cases that did not execute.

The extended reception fixture covers loss of the first, middle, or last MPDU, plus loss of all delimiters. These four patterns combine with both GIs, typed or raw bytes, and whole-signal or separate-part reception. The resulting 32 cases check all six range outcomes and intact aggregate bytes at the production Rx drop. Each case also requires a later valid CTS to set NAV for 50 microseconds. These cases use scalar radios, HCF, and seed zero with deterministic probabilities.

The helper commits retain direct calculation tests because they introduce no production protocol transition. The test-only and documentation commits also need no artificial parent failure. Structural checks confirm that the amendments preserve every original production tree and the shared test support.

Evidence and limits

Verification for a0f9a35195 on 2026-10-29:

  • Fresh debug and release builds pass before publication.
  • The final debug protocol selection passes all four fixtures: 40 successful simulation runs without skips or expected failures.
  • Eight debug build invocations prepare seven production revisions for the parent comparisons. Every build and fixture compilation passes.
  • Series, description, and source-seal checks pass. Global architecture, naming, and interface checks retain the findings from pinned master without additions.
  • Fingerprint and statistical baselines remain unchanged.

Retained evidence covers nine unit fixtures, fifteen module fixtures, and five fingerprint controls. The module results include 468 aggregate runs, 576 ordinary controls, and sixteen MAC boundary runs. Exact production and fixture comparisons support reuse of these results. They are retained evidence, not fresh execution for this publication. The module fixtures retain the separate dimensional-radio and DCF coverage.

Parent cases skipped after the first error supply no executed parent evidence. Release behavioral tests, feature-isolation builds, C++ lint, and a fresh ordinary-reception comparison with master remain unverified. Full inherited-source coverage, automatic dependency selection, and diagram rendering also remain unverified. These results establish no new error-accuracy or goodput claim. MAC member acceptance, upper delivery, and implicit Block Ack remain outside the implemented scope.

Exact publication commands and evidence records

The installed runner requires a temporary descriptor without its unsupported coverage-report setting. The descriptor retains the selected test settings and points to the active checkout. The repository descriptor remains unchanged.

export MAKEFLAGS=--jobserver-style=pipe
make MODE=debug -j8
make MODE=release -j8

record=/tmp/ampdu-pr1363-publish-20261029
opp_run_protocol_tests --load "$record/inet-compatible.opp" -p inet -m debug --no-build --no-concurrent \
  -w '^tests/protocol/wifi$' \
  -f 'Wifi(VhtHeaderIdentity|MpduDeaggregation|HtAmpduWire|HtAmpduPartialReception)\.test$' \
  --result-file "$record/protocol.json"

base=f5612791b773bc83f654dbfdefa26e243f756c86
doc/project/enforcement/check-architecture.sh
doc/project/enforcement/check-naming.sh --base "$base"
doc/project/enforcement/check-pull-request.sh --base "$base" --head HEAD --description-file "$record/description.md"
doc/project/enforcement/check-interfaces.sh
doc/project/enforcement/check-source-seals.sh --base "$base"

The global gates report 36 architecture findings, 24 naming findings, and 16 interface findings. The comparison with pinned master adds no finding. The gates retain their failure status for those existing findings.

Each linked comparison record gives source revisions, fixture hashes, observed parent and commit results, commands, and coverage limits. The execution record maps all ten commits to their test decisions. Publication logs reside in /tmp/ampdu-pr1363-publish-20261029/. Parent-comparison logs reside in /tmp/ampdu-protocol-parent-20261029/.

Before this commit, the branch has no plan for HT aggregate reception or implicit Block Ack integration.

After this commit, the plans define separate PHY and MAC duties, staged changes, required evidence, and acceptance limits. Both plans use the integrated master base. Their first stages define wire representation, bounded member ranges, and cached PHY outcomes. MAC acceptance remains separate. This commit changes no runtime behavior.

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: plan | behavior.add | - | ieee80211-ampdu-phy-reception
Before this commit, a VHT signal mode creates an HT header. A VHT transmission therefore has the wrong typed header and can enter later HT validation without an HT MCS.

After this commit, the VHT signal mode creates the existing VHT header. The production-radio protocol fixture observes transmission start in both GI modes. It requires the VHT type, excludes the HT type, and checks the selected header length. The parent fails the type assertion. This prerequisite adds no VHT serializer or aggregate profile.

Protocol verification: tests/protocol/wifi/vht-header-identity.md

Protocol comparison: tests/protocol/wifi/vht-header-identity-comparison.md

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: src.ieee80211 | behavior.change.fix | test whatsnew | ieee80211-ampdu-phy-reception
Before this commit, callers have no shared bounded description of delimiter and complete MPDU ranges. The deaggregator and later receiver need the same PSDU-relative offsets and validity results.

After this commit, a pure inspector returns ordered delimiter and MPDU ranges without a change to existing callers. It bounds each member, checks delimiter validity, and advances across invalid delimiter candidates. For example, an overlong delimiter before a typed header still permits a later complete member to appear in the layout.

The direct unit fixture checks lengths, alignment, truncation, final padding, typed delimiter flags, and typed/byte recovery. The inspector consumes no random draw. The next commit introduces its production deaggregation consumer; receiver integration follows later.

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: src.ieee80211 | behavior.add | test | ieee80211-ampdu-phy-reception
Before this commit, production deaggregation trusts delimiter lengths during member extraction. An overlong delimiter can cause an out-of-bounds extraction even when a later complete member remains available. The preceding inspector supplies bounded ranges but has no production consumer.

After this commit, deaggregation extracts only complete MPDU ranges from the shared layout. A malformed delimiter does not prevent recovery of a later bounded member. Returned members preserve region tags with their source offsets. The deaggregator deletes its input, and its caller owns the returned members and vector.

The protocol fixture invokes this production extraction boundary with complete and malformed aggregates in typed and byte representations. It requires exact member counts, lengths, and content. Extraction alone grants no PHY success, FCS acceptance, or MAC delivery permission.

Protocol verification: tests/protocol/wifi/mpdu-deaggregation.md

Protocol comparison: tests/protocol/wifi/mpdu-deaggregation-comparison.md

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: src.ieee80211 | behavior.change.fix | test whatsnew | ieee80211-ampdu-phy-reception
Before this commit, HT header conversion supplies no HT-SIG bytes. A byte-backed singleton aggregate therefore cannot retain its aggregate identity. The preceding VHT prerequisite already supplies the correct VHT header type.

After this commit, the radio assigns HT-SIG fields and CRC from the selected mode and aggregate identity. The serializer preserves all 48 bits. Validation refuses invalid CRC, unsupported fields, and insufficient content before trailer removal. Bounded delimiter inspection remains in its separate prerequisite.

For example, a transmitted 104-octet singleton retains its Aggregation field and matches an independent six-octet vector. The wire fixtures check independent bytes, CRC, singleton identity, and field limits through direct conversion and production radio transmission. Ordinary valid HT duration inputs remain unchanged. MAC aggregate acceptance remains outside this commit.

Protocol verification: tests/protocol/wifi/ampdu-ht-sig-wire.md

The protocol fixture uses descriptors for new decoded fields. It therefore compiles on the parent without its missing getters. The independent wire assertions remain mandatory.

Protocol comparison: tests/protocol/wifi/ampdu-ht-sig-wire-comparison.md

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: src.ieee80211 | behavior.add | test whatsnew migration | ieee80211-ampdu-phy-reception
Before this commit, error models expose complete-packet probabilities but no optional contract for HT aggregate ranges. Receiver integration needs a pure mode-support query and per-length success probability.

After this commit, the optional WLAN role supplies both operations. NIST and Yans implement the role through their shared base. The range operation uses the existing DATA calculation with the requested length. It rejects unsupported modes and invalid ranges without a random draw. The generic IErrorModel contract remains unchanged.

For example, an HT20 MPDU range uses the same probability as the existing DATA calculation for that length and scalar SNIR. Direct checks cover 64 HT20 modes, six lengths, seven SNIR values, and minimum and mean reductions. They also check mode support and unchanged draw counts. The receiver does not use the role until the next commit.

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: src.ieee80211 | behavior.add | test whatsnew | ieee80211-ampdu-phy-reception
Before this commit, the receiver samples an aggregate as one packet. It cannot retain successful members after partial DATA loss. Rx also treats an aggregate container as a standalone MAC frame and can fail during header or FCS checks.

After this commit, the medium cache owns common-field decisions and bounded delimiter and MPDU outcomes. Repeated queries reuse those samples. Partial DATA loss preserves the aggregate bytes. A result tag copies outcomes without reception pointers. Rx rejects aggregate containers before standalone checks through its existing drop and contention path.

For example, an aggregate with one failed MPDU retains successful neighbors and all range outcomes. The drop signal preserves those outcomes when Rx rejects the container. A standalone CTS still updates NAV. DCF and HCF cases cover typed and byte representations, scalar and dimensional radios, and whole and separate signal parts.

The receiver uses the preceding probability role. The MAC supplies exact receive-capability bounds before its MIB update. A present model must cover every advertised HT receive mode within those bounds. The header defines the override contract and required cRuntimeError boundary. Validation cannot change capabilities or consume random draws.

Absent error models retain common PHY checks without error draws. Aggregate error-rate estimates remain unknown; ordinary MPDU metadata remains unchanged. Direct fixtures cover cached decisions, malformed headers, insufficient content, missing roles, and incomplete mode coverage. MAC member acceptance and implicit Block Ack remain pending.

Protocol verification: tests/protocol/wifi/ampdu-partial-reception.md

The protocol fixture uses descriptors to inspect the new indication on both revisions. Thirty-two runs check each MPDU position and delimiter loss.

Protocol comparison: tests/protocol/wifi/ampdu-partial-reception-comparison.md

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: src.ieee80211 | behavior.add+change | test whatsnew migration | ieee80211-ampdu-phy-reception
Before this commit, pure calculation checks cover range probabilities, but deterministic receiver checks do not verify seeded NIST and Yans outcomes. The real models need direct checks through the production receiver.

After this commit, test subclasses call the real implementations through the receiver. Each range probability must equal the existing DATA calculation. Independent generators replay HEADER and range draws. The fixture compares cached outcomes, draw counts, and subsequent random values. Repeated PREAMBLE, decision, and result queries must reuse cached samples.

For example, a second DATA query must retain every outcome and leave the random generator at its expected next value. The reference matrix covers 64 HT20 modes, six lengths, seven SNIR values, and minimum and mean reductions. The receiver campaign uses scalar and dimensional radios, both signal-part modes, and seeds 0, 1, and 2. These checks establish no error-accuracy or goodput claim.

The complete receiver fixture now contains the pure probability matrix from the earlier prerequisite. The temporary independent fixture is removed. Production behavior and stored fingerprint expectations remain unchanged.

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: tests | behavior.add | - | ieee80211-ampdu-phy-reception
Before this commit, ordinary reception controls lack a fixture that compiles unchanged on the pinned parent and the feature branch. The earlier receiver fixture cannot provide that independent compatibility comparison.

After this commit, one fixture records ordinary reception with identical inputs on both revisions. NIST, Yans, absent-model, and non-HT custom controls cover three noise levels and seeds 0, 1, and 2. The campaign uses scalar and dimensional radios with whole and separate signal parts. Each record includes outcomes, duration, metadata, draw counts, and subsequent random values.

For example, a failed ordinary reception must retain the same metadata and next random value as its parent control. The migration guide states the independent-range abstraction and its limits. MAC aggregate receipt and implicit Block Ack remain pending. BerTable retains its documented parent crash, which supplies no successful reception evidence.

The additional fixture and records change no production contract or stored expectation. Execution results belong in the PR description and execution record.

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: tests | behavior.add | - | ieee80211-ampdu-phy-reception
Before this commit, the plans define the PHY stages but lack a final record of their completion and verification limits.

After this commit, the plans identify the completed PHY scope on the integrated master base. The execution record explains the owners, failure behavior, final-commit checks, and limits. Future MAC tasks retain their protocol tests and reviewer documents. MAC acceptance and implicit Block Ack remain pending. This commit changes no runtime behavior.

The protocol review adds comparisons at each behavior commit and its parent. Identical fixtures fail during parent execution and pass after each correction. The execution record lists all ten commit decisions and the focused results.

Plan: plan/pending/ieee80211-ampdu-phy-reception.md
Change: plan | behavior.change | - | ieee80211-ampdu-phy-reception
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the work/ieee80211-ampdu-implicit-blockack branch from 904c5f2 to a0f9a35 Compare October 29, 2026 19:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant