Skip to content

ieee80211: complete Basic Block Ack transfers without queued DATA - #1344

Open
mgonzalezlopezudc wants to merge 7 commits into
inet-framework:masterfrom
mgonzalezlopezudc:work/compressed-blockack-s4
Open

mgonzalezlopezudc wants to merge 7 commits into
inet-framework:masterfrom
mgonzalezlopezudc:work/compressed-blockack-s4

Conversation

@mgonzalezlopezudc

@mgonzalezlopezudc mgonzalezlopezudc commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Basic Block Ack can leave outstanding DATA without a BAR when the queue becomes empty or the accepted window blocks further DATA. Previously, HCF required a DATA candidate before channel access. A short transfer could therefore stall when the BAR threshold exceeded the available DATA count.

S4 lets HCF contend for a due BAR without queued DATA. The ACK policy groups outstanding DATA by peer and TID. Below the threshold, it defers BAR only when the next eligible DATA belongs to that group and fits its window. For example, a window of one and a threshold of five require BAR after the first outstanding DATA. A positive response permits window progress without a second DATA candidate.

HCF previews DATA without extraction or sequence allocation. BAR collision and failure update contention state without a DATA retry charge. Failed Block Ack feedback causes later DATA retransmission to set Retry. Final resolution or expiry permits completion DELBA at a safe exchange boundary, including agreements with zero inactivity timeout.

The shared originator agreement owns sequence distance, bitmap membership, and window advancement. HCF supplies unresolved sequence numbers for the same peer and TID. The ACK policy and ACK handler reuse the shared operations. The 64-position bitmap range remains separate from the accepted window size. This final refactor preserves packet behavior and recorded expectations.

Later BAR exchanges must fit the applicable TXOP and TXNAV bounds. Their cost includes BAR airtime, SIFS, and the selected response duration. The initial Control overrun exception remains available. Basic single protection reserves only a prepared successor. If further DATA requires extraction, the frame sequence ends the TXOP first.

These boundaries can increase contention and ADDBA exchanges between bursts. Custom queue and policy implementations must follow the migration guide. BAR callers must supply agreement context explicitly; omitted arguments fail compilation. The affected source paths are unsealed. The change adds no wire format, configuration default, or architectural exception.

Basic remains a historical compatibility profile. Production Compressed selection still fails initialization. S5 owns that capability. General Basic DATA admission and full NAV conformance remain outside this change. Multiple protection retains its existing successor policy.

Dependency and commit order

This PR depends on #1343. The comparison starts at master commit 675655fc3559231c56b12d651384cb8695255abc and ends at 728d3dd911018b1ae8d3ae4f7fa0c3184fe15d53. The first four commits are the exact synchronized #1343 prefix. The next three add S4. All seven commits also form the corresponding prefix of #1363.

The dependency supplies safe agreement setup and retirement, duplicate Action control, deferred DATA eligibility, and selected extraction with ordinary queue effects. S4 adds DATA preview, complete Basic BAR resolution, and shared window operations.

  1. 435fc0866d adds selected extraction with ordinary queue effects; it prepares the lifecycle consumer.
  2. 2c6b1df761 connects Action delivery, setup, retirement, reset, and deferred DATA selection.
  3. 832dc3672c gives the frame-sequence handler ownership of interruption outcomes.
  4. 0c23400688 records S3b completion and its verification scope.
  5. 23c1939f27 exposes DATA preview without extraction or sequence assignment.
  6. 2c454a83d1 completes Basic BAR selection, retry feedback, reservation, and final transfer resolution.
  7. 728d3dd911 gives the originator agreement ownership of window operations.

The Basic BAR commit, 2c454a83d1, retains the seven approved S4 baseline updates. The window refactor changes no baseline value.

The QoS service exposes preview through IOriginatorQosMacDataService. InProgressFrames returns borrowed candidates. Originator policy contracts require agreement state. HCF, EDCA, recovery procedures, and frame sequences use those contracts. Five compile-time assertions reject omitted agreement arguments through the affected interface and concrete types. Explicit null arguments retain their documented behavior.

Verification and limits

Fresh debug and release builds pass at 728d3dd911018b1ae8d3ae4f7fa0c3184fe15d53 with all 12 available CPUs. The debug campaign covers every changed test fixture in the master comparison. All selected fixtures report their expected successful result.

Check Result
Debug and release compilation Both PASS.
Module fixtures 18 PASS.
Unit fixtures 2 PASS.
Functional fingerprint cases 7 PASS, with unchanged expectations.
Series and description gates All five PASS.
Source seals and scoped MAC architecture PASS.
Global architecture, naming, and interface gates The same inherited findings remain. These gates retain exit code 1.

The global comparison checks the finding text. Counts of unchanged interfaces and examined declarations can differ between stages. These counts do not introduce new findings.

Executed commands and selectors

The build commands run from this PR's checkout root:

make MODE=debug -j12
make MODE=release -j12
opp_repl --load /home/user/omnetpp-6.4.0aipre2/.venv/lib/python3.14/site-packages/opp_repl/opp/inet.opp -p inet

The opp_repl adapter selects this checkout's inet_project. It calls the checked-out test functions with these exact arguments. It rejects empty selections and unexpected results.

run_module_tests(simulation_project=inet_project, mode="debug", filter=r"(?:Ieee80211BlockAckActionDelivery_1\.test|Ieee80211BlockAckActionDispatch_1\.test|Ieee80211BlockAckActionDisposal_1\.test|Ieee80211BlockAckAdmission_1\.test|Ieee80211BlockAckAssociationReset_1\.test|Ieee80211BlockAckCompletionCost_1\.test|Ieee80211BlockAckDataSelection_1\.test|Ieee80211BlockAckDeferral_1\.test|Ieee80211BlockAckDeferredCollision_1\.test|Ieee80211BlockAckFragmentRetirement_1\.test|Ieee80211BlockAckLifecycle_1\.test|Ieee80211BlockAckNegotiation_1\.test|Ieee80211BlockAckResponseWait_1\.test|Ieee80211BlockAckRetiredData_1\.test|Ieee80211BlockAckScheduling_1\.test|Ieee80211HcfHeader_1\.test|Ieee80211HcfMultipleProtection_2\.test|PacketSelectiveExtraction_1\.test)$", concurrent=False)
run_unit_tests(simulation_project=inet_project, mode="debug", filter=r"(?:Ieee80211BlockAckScheduling_1\.test|Ieee80211MultipleProtection_1\.test)$", concurrent=False)

The fingerprint command runs from tests/fingerprint:

./fingerprinttest -d -F tyf -t 3 -m 'showcases/wireless/blockack/|showcases/wireless/fragmentation/.*-c HCFfragblockack |showcases/wireless/txop/|examples/adhoc/qos/.*-c MacQos -r 1|examples/wireless/qos/.*-c MacQosWithBlockAck ' showcases.csv examples.csv

The mechanical checks use the pinned master base 675655fc3559231c56b12d651384cb8695255abc. They cover the complete series and description, source seals, scoped MAC architecture, and the three global gates. This campaign changes no recorded expectation.

All seven commits retain their scoped debug results from the #1363 reconstruction. The final tree exactly equals the former PR head, 0227b294bdf2dca3c3cbd23d2da1155732654205. Fresh checks below cover the synchronized head.

The module fixtures supply accepted agreements or responses at controlled boundaries. They do not prove every radio-loss or management exchange path. This campaign makes no delayed Block Ack, Multi-TID, A-MPDU, or Compressed support claim. Release behavioral tests and graphical tyf fingerprints remain unverified. This synchronization supplies no new independent correctness audit.

The S4 execution record retains earlier commands, Duration observations, approved baselines, and contract checks. Those records retain their original revision scope.

Fingerprint justification

The user approved the seven S4 baseline updates on 2026-10-15. They now belong to 2c454a83d1; prerequisite baseline changes belong to S3b. The final refactor changes none of these values.

The observer evidence comes from 8745330c1c, before the final API and shared-window refactors. Those observer runs use shorter limits and an added listener. They explain the first observed frame differences, not every later event. IEEE Std 802.11-2024, 9.2.5.2(a)(8)–(9), supplies the cited final-frame reservation rules. This evidence does not establish full Basic or NAV conformance.

Configuration and run Observed parent-to-final change Reason
Block Ack NoFragmentation, run 0 First DATA Duration changes from 384 to 44 microseconds. Its ACK has zero Duration, and the TXOP ends. The zero-limit exchange reserves only its immediate ACK. ADDBA setup and later BAR behavior also change the trajectory.
Block Ack MixedTraffic, run 0 First DATA Duration changes from 716 to 44 microseconds. Its ACK has zero Duration, and the TXOP ends. The queued large successor belongs to a later TXOP. Its airtime must not extend the current reservation.
TXOP General, run 0 DATA sequence 1 reserves 44 instead of 1284 microseconds. Its ACK has zero Duration, and the TXOP ends. HCF no longer reserves an unextracted successor. The frame sequence enforces the same boundary.
Fragmentation HCFfragblockack, run 0 Sequence 1, fragment 2, changes Retry from 0 to 1 at 4.840765056 ms. Size and Duration initially match. HCF marks retransmission after failed Block Ack feedback. Later burst boundaries can cause additional differences.
Wireless MacQosWithBlockAck, run 0 ADDBA request Duration changes from 184 to 44 microseconds. Its ACK has zero Duration, and the TXOP ends. The Management exchange reserves its immediate ACK without unrelated queued DATA. Later extraction can also change aggregation.
Block Ack Fragmentation, run 0 Sequence 1, fragment 15, advertises zero Duration and ends its TXOP. The earlier S4 candidate advertised 464 microseconds. Final Block Ack DATA has no immediate response. BAR follows in a separate TXOP. The old reservation did not describe that exchange.
Ad hoc MacQos, run 1 Sequence 1, fragment 2, advertises 44 microseconds. Its ACK advertises zero, and the TXOP ends. The earlier S4 candidate advertised 484 microseconds. Final Normal Ack DATA reserves SIFS plus ACK. It no longer reserves a queued unit before aggregation or agreement setup.

The values below list tplx, ~tNl, and ~tND, in that order. TXOP records only the first two ingredients.

Configuration Baseline before S4 Approved baseline
NoFragmentation b828-6bd6;026f-2c6d;2cd4-4795 9161-625d;6a02-09aa;cbc0-3b0a
Fragmentation 021a-d29a;1597-ec6a;feff-7e88 36f4-5c22;66b0-94cd;45f3-af4f
MixedTraffic 5b9e-801f;8731-2504;9724-d1ce 351b-d4ba;5c1f-69a8;6182-6da3
HCFfragblockack f509-65f1;6b3a-0d65;c474-7174 2597-1e2e;d269-c6ae;2f5c-4cca
TXOP General f58d-d2fd;38f7-f642 ab91-87f3;f30c-6aa4
Ad hoc MacQos, run 1 5fbb-9fd9;c0a4-97f6;2373-df01 4fd2-bb56;ecaf-89f7;9398-0fae
MacQosWithBlockAck f8a4-9474;1cba-cccc;538e-67df 6edb-0326;2a8a-50ee;4301-882d

Before this commit, consumers can inspect queued packets but cannot extract a later eligible packet with ordinary pull effects. Collection removal represents disposal. Deferred Block Ack DATA needs selection past an ineligible head without loss of queue observations.

After this commit, the optional collection contract provides a pure predicate query and atomic selected extraction. PacketQueue, CompoundPacketQueueBase, and PriorityScheduler preserve configured service order. Each layer applies its ordinary pull effects once. For example, extraction behind a deferred head retains ownership, residence metadata, and queue events.

An unsupported provider reports UnsupportedPacketSelection before extraction. Other queue and predicate errors retain their types. Direct tests cover storage, ownership, metadata, events, scheduler order, and unsupported providers. Ordinary head service remains unchanged.

Plan: plan/pending/ieee80211-compressed-blockack-replacement.md
Change: src.queueing | behavior.add | test whatsnew | ieee80211-compressed-blockack-replacement
Before this commit, Action dispatch can reuse deleted headers and repeat agreement effects. Setup can accept an uncorrelated response. Teardown can retain obsolete work or unsent fragments of transmitted DATA. DATA extraction can advance sequence state before setup resolves.

After this commit, HCF dispatches complete accepted Actions once. Handlers correlate peer, TID, and dialog token before acceptance. The response determines agreement parameters. Directional retirement detaches the agreement before cleanup. Association replacement clears both roles before notification. Accepted physical exchanges finish safely but cannot submit retired protected frames after CTS.

Setup defers new DATA extraction until the procedure resolves. Already numbered DATA resolves before ADDBA. A later successor can start setup after an empty interval without an empty request. The response timeout starts after the request ACK. Uncertain setup requires DELBA before surviving unsent DATA can resume.

The QoS data service assigns a monotonic allocation index before fragmentation. All fragments retain that index in a tag. The agreement retains its highest transmitted index after ACK removal. Teardown uses that index to discard incomplete DATA. Older retransmissions cannot move the boundary backward. Wire sequence numbers remain unchanged.

For example, sequence 0 transmits before sequences 1 through 2047 expire. Fragment 0 of sequence 2048 next transmits. Teardown discards its unsent siblings despite the exact half-range gap. Later intact DATA and unrelated peer DATA remain eligible. Deferred deletion protects references during accepted physical exchanges.

An internal collision that discards first DATA also triggers retirement. HCF queues DELBA before the unsent successor can resume. Contention uses current eligibility, so deferred work cannot charge another category an internal collision. HCF schedules the earliest absolute deadline across both agreement roles.

These lifecycle contracts change together because retirement requires safe Action invalidation and accepted-exchange completion at first use. The shared queue capability precedes this commit. Direct fixtures cover Action correlation, timeout, collision, fragment retirement, sequence gaps, and association reset. The migration guide explains custom-module contracts.

Seven approved Basic fingerprint rows describe the changed setup boundaries. Numbered DATA resolves before setup, while infrastructure MacQosWithBlockAck waits for later DATA instead of empty-successor setup. Graphical expectations remain unchanged. Basic remains the default. Compressed exchanges, final-transfer arbitration, and MAC stop/start remain outside this commit.

Plan: plan/pending/ieee80211-compressed-blockack-replacement.md
Change: src.ieee80211 | behavior.change.fix | test whatsnew migration fingerprint | ieee80211-compressed-blockack-replacement
Before this commit, HCF chooses completion or failure when an accepted Action interrupts a response wait. The frame-sequence handler owns the relevant exchange state, so receive dispatch duplicates that decision.

After this commit, HCF requests interruption without an outcome argument. The frame-sequence handler checks whether recipient processing retires the outgoing frame. A retired frame completes without failure feedback. Other exchanges retain the ordinary failure path. HCF cancels the receive timer at sequence completion.

For example, a correlated Action can retire outgoing management work during a response wait. The handler completes that retired exchange without failure feedback. Existing fixtures also cover refusals, unrelated Actions, and immediate ACK behavior. Custom handlers must implement the no-argument interruption operation. The migration guide explains this contract. Built-in packet behavior and event order remain unchanged.

Plan: plan/pending/ieee80211-compressed-blockack-replacement.md
Change: src.ieee80211 | refactor | test migration | ieee80211-compressed-blockack-replacement
Before this commit, the branch lacks committed S3b completion records. Reviewers need component responsibilities, scope limits, and verification results in one record.

After this commit, plan/done/ contains the summary and execution record. The summary explains agreement setup, retirement, peer reset, and safe physical completion. The execution record explains allocation indices and separates results by original source revision. Those historical revision identifiers remain unchanged.

The records describe debug and release compilation, focused module fixtures, and functional fingerprint checks for the original implementation and later retirement repair. This documentation commit changes no protocol behavior or recorded expectation. S4 and production Compressed exchanges remain outside the completed stage.

Plan: plan/done/ieee80211-compressed-blockack-s3b-summary.md
Change: plan | behavior.add | -
Before this commit, the shared in-progress queue can obtain a successor only through extraction. The QoS data service already supports preview, but the generic contract does not expose it. BAR selection needs the candidate before queue ownership or sequence state changes.

After this commit, the contract exposes preview, sequence lookup, and aggregation capability. The in-progress queue can return a borrowed candidate and prospective sequence number. The ordinary successor query retains extraction as its default.

For example, a queued frame retains sequence 77 while preview reports prospective sequence 0. Preview leaves the frame in its queue. The DATA-selection fixture checks this result, ownership, and an empty in-progress set. Existing transmission behavior remains unchanged.

Plan: plan/pending/ieee80211-compressed-blockack-replacement.md
Change: src.ieee80211 | refactor | test whatsnew migration | ieee80211-compressed-blockack-replacement
Before this commit, BAR selection can extract DATA and combine counts across peers or TIDs. A short burst can lack a final response when its length remains below the BAR threshold. Duration forecasts can extract or incorrectly reserve an unprepared successor.

After this commit, HCF selects BAR work before DATA extraction. The ACK policy groups outstanding DATA by peer and TID within the accepted window. Below the threshold, it defers BAR only for the next DATA within that group and window. EDCA can contend for BAR without a DATA candidate.

Matched responses resolve only the selected peer and TID. Resolved DATA advances the window; the response starting sequence number alone cannot advance it. BAR policy calls require an explicit agreement-handler argument. Transmitted-BAR processing also requires an explicit originator agreement. Omitted arguments fail compilation. Explicit null arguments retain their documented behavior.

BAR collision and failure update contention state without a DATA retry entry. Retransmitted DATA sets Retry after failed Block Ack feedback. At a safe exchange boundary, final resolution or expiration triggers completion DELBA. HCF first checks queued DATA in the TID category to avoid repeated unrelated scans.

Basic single protection reserves only an already prepared successor. The sequence ends the TXOP before further extraction can change aggregation, fragmentation, or setup. Final zero-limit DATA reserves only its immediate required response. Prepared fragments can continue; unprepared successors require another TXOP. This policy can require more contention. Multiple protection retains its successor policy.

For example, a window of one and BAR threshold of five require BAR before the next sequence leaves the window. Direct fixtures also cover separate peers and TIDs, timeout, collision, expiration, final Duration, and later-BAR admission. The timing fixture checks the former 40-microsecond overrun and the permitted initial Control-frame exception.

Seven previously approved non-graphical fingerprint rows accompany their causal source change. Final ACK reservations, setup order, Retry feedback, and extraction boundaries explain those values. The execution record retains each exact value and its original approval. Graphical values remain unchanged and unverified.

BAR selection, Duration forecasts, and continuation share one candidate contract without extraction. They stay together so each recorded expectation describes the complete behavior. Production Compressed exchanges, general Basic DATA admission, and complete NAV conformance remain outside this commit.

Plan: plan/pending/ieee80211-compressed-blockack-replacement.md
Change: src.ieee80211 | behavior.change | test whatsnew migration fingerprint | ieee80211-compressed-blockack-replacement
Before this commit, HCF calculates window advancement, while ACK callers repeat modulo-4096 distance calculations. Their results are correct, but separate definitions make later maintenance harder.

After this commit, OriginatorBlockAckAgreement owns sequence distance, bitmap membership, and window advancement. HCF supplies unresolved sequence numbers for the same peer and TID. ACK policy and feedback use the shared operations. Existing virtual window accessors remain in the advancement path.

For example, a window at 4094 advances to unresolved sequence 4095 and next to sequence 0 after resolution. With no unresolved DATA, it advances to the next allocation. Boundary tests also check the distinct 64-position bitmap range. Packet behavior, ownership, event order, and recorded expectations remain unchanged.

Plan: plan/pending/ieee80211-compressed-blockack-replacement.md
Change: src.ieee80211 | refactor | test | ieee80211-compressed-blockack-replacement
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the work/compressed-blockack-s4 branch from 0227b29 to 728d3dd Compare October 17, 2026 21:29

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