-
Notifications
You must be signed in to change notification settings - Fork 527
Fix remaining TXOP duration calculation #1126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mgonzalezlopezudc
wants to merge
2
commits into
inet-framework:master
Choose a base branch
from
mgonzalezlopezudc:feat-ht
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+88
−2
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| %description: | ||
| Tests that TxopProcedure reports the remaining time until the TXOP limit. | ||
|
|
||
| %includes: | ||
| #include "inet/linklayer/ieee80211/mac/originator/TxopProcedure.h" | ||
|
|
||
| using namespace omnetpp; | ||
| using namespace inet; | ||
| using namespace inet::ieee80211; | ||
|
|
||
| namespace Ieee80211TxopProcedure_1 { | ||
|
|
||
| class TestTxopProcedure : public TxopProcedure | ||
| { | ||
| protected: | ||
| virtual void initialize(int stage) override | ||
| { | ||
| if (stage == INITSTAGE_LOCAL) | ||
| limit = par("txopLimit"); | ||
| } | ||
| }; | ||
|
|
||
| Define_Module(TestTxopProcedure); | ||
|
|
||
| } // namespace Ieee80211TxopProcedure_1 | ||
|
|
||
| %file: TestNetwork.ned | ||
|
|
||
| import inet.linklayer.ieee80211.mac.originator.TxopProcedure; | ||
|
|
||
| simple TestTxopProcedure extends TxopProcedure | ||
| { | ||
| parameters: | ||
| @class(TestTxopProcedure); | ||
| } | ||
|
|
||
| network TestNetwork | ||
| { | ||
| submodules: | ||
| test: Test; | ||
| txop: TestTxopProcedure { | ||
| parameters: | ||
| txopLimit = 10ms; | ||
| } | ||
| } | ||
|
|
||
| %inifile: omnetpp.ini | ||
| [General] | ||
| ned-path = .;../../../../src;../../lib | ||
| network = TestNetwork | ||
|
|
||
| %activity: | ||
|
|
||
| auto txop = check_and_cast<TxopProcedure *>(cSimulation::getActiveSimulation()->getModuleByPath("txop")); | ||
|
|
||
| auto getRemainingThrows = [txop]() { | ||
| try { | ||
| txop->getRemaining(); | ||
| return false; | ||
| } | ||
| catch (const cRuntimeError&) { | ||
| return true; | ||
| } | ||
| }; | ||
|
|
||
| ASSERT(getRemainingThrows()); | ||
|
|
||
| txop->startTxop(AC_VI); | ||
| ASSERT(txop->getRemaining() == SimTime(10, SIMTIME_MS)); | ||
|
|
||
| wait(0.003); | ||
| ASSERT(txop->getRemaining() == SimTime(7, SIMTIME_MS)); | ||
|
|
||
| wait(0.007); | ||
| ASSERT(txop->getRemaining() == SIMTIME_ZERO); | ||
|
|
||
| wait(0.001); | ||
| ASSERT(txop->getRemaining() == SIMTIME_ZERO); | ||
|
|
||
| txop->endTxop(); | ||
| ASSERT(getRemainingThrows()); | ||
|
|
||
| EV << "TXOP remaining time is correct at all boundaries.\n"; | ||
|
|
||
| %contains: stdout | ||
| TXOP remaining time is correct at all boundaries. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 A stored reference result for a wireless roaming test was replaced even though that test cannot be affected by the change
The expected result for the mobile-IPv6 roaming test is overwritten with a new value (
7ed8-bee3/~tNlbattests/fingerprint/mipv6-refactoring.csv:13) even though that simulation never exercises the changed prioritized-transmission code, so a genuine unrelated change in behavior is silently accepted as the new baseline.Impact: A real behavior change (or nondeterminism) in the roaming scenario is hidden, and future runs will be compared against a value that was never justified.
Why the roaming scenario cannot exercise TxopProcedure
TxopProcedureonly exists insideEdcaf, which is instantiated insideHcf, andHcfis created only whenqosStationis true (src/inet/linklayer/ieee80211/mac/Ieee80211Mac.ned:86and:116).examples/ipv6/mipv6roaming/omnetpp.ininever setsqosStation(it configures**.wlan*.mac.dcf.channelAccess.cwMin), so the non-QoS DCF path is used andTxopProcedure::getRemaining()is never called.Consistently, the actually TXOP-sensitive baselines (e.g.
tests/fingerprint/examples.csv:657-661,tests/fingerprint/showcases.csv:316-317,344) were left untouched — which is plausible because the only caller,src/inet/linklayer/ieee80211/mac/framesequence/HcfFs.cc:65, evaluatesgetRemaining() > 0and old/new expressions differ only at the exact expiry instant. That makes the single updated non-QoS row inconsistent with the rest of the change.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root cause: bookkeeping failure to the July 802.11 on-wire serialization batch, which updated the duplicate
examples.csvrow’s data-sensitive fingerprint but omittedmipv6-refactoring.csv.Historical isolation found the real cause:
The corresponding
examples.csvrow (line 385) already contains the correct network fingerprints; tplx, ~tNl, and ~tND all passed. Its graphical tyf ingredient differed under fake-GUI execution, but that ingredient is unrelated and intentionally unreliable.I also reran all 20 relevant QoS/HCF baselines across examples.csv and showcases.csv, including the dedicated TXOP showcase. Every baseline passed unchanged, so the TXOP fix requires no additional fingerprint updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@levy ready for your review and approval