-
Notifications
You must be signed in to change notification settings - Fork 527
ieee80211: make rate control adapt per receiver, add per-receiver configured rates #1124
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
adamgeorge309
wants to merge
6
commits into
master
Choose a base branch
from
topic/gy/ieee80211-per-station-rate-control
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.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e05a11b
ieee80211: fix TxopProcedure::getRemaining() returning the elapsed time
adamgeorge309 359e5b6
ieee80211: make rate control adapt per receiver
adamgeorge309 1baf651
networklayer: name the host owning a MAC address
adamgeorge309 0d76de8
ieee80211: record the data rate per station
adamgeorge309 9d2ea1f
ieee80211: add per-receiver configured unicast data-frame rates
adamgeorge309 42d0174
ieee80211: tag datarateSelected with the receiving station
adamgeorge309 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
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
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
Oops, something went wrong.
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 newly seen peer's rate immediately jumps one step above the configured starting rate
The per-peer rate state is created with an unset timer (
State state;atsrc/inet/linklayer/ieee80211/mac/ratecontrol/AarfRateControl.cc:45), so the periodic "increase" deadline is already in the past the moment the peer appears, and the very first transmission to it is sent one rate step above the configured starting rate.Impact: The configured starting rate is effectively ignored for every peer first used after the increase interval, and an extra spurious rate-change value is recorded for that peer.
Timer initialised to zero makes increaseRateIfTimerIsExpired fire on first use
State::timerdefaults toSIMTIME_ZERO(src/inet/linklayer/ieee80211/mac/ratecontrol/AarfRateControl.h:26).getRate()callsstateFor()and thenincreaseRateIfTimerIsExpired(state)(src/inet/linklayer/ieee80211/mac/ratecontrol/AarfRateControl.cc:124-125), whose condition issimTime() - state.timer >= interval(default 50 ms). For any station whose state is created after t = 50 ms this is immediately true, sostate.modeis bumped to the next faster mode and a seconddatarateChangedis emitted before the first frame is sent. Previously there was a single module-wide state created at t≈0, so this typically did not happen; with lazily created per-peer state it happens for essentially every peer.frameTransmitted()has the same path. Initialisingstate.timer = simTime()at creation preserves the intended "seeded from initialRate" semantics.Was this helpful? React with 👍 or 👎 to provide feedback.
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.
Fixed in a follow-up commit — confirmed, thanks.
Reproduced in
examples/wireless/hiddennodewithinitialRate = 2Mbpsand traffic starting at t = 1s: the per-station vector opened with two values at t = 1, 2 Mbps then 5.5 Mbps, and the first frame went out at 5.5 Mbps. With the timer seeded at creation it opens with a single 2 Mbps value.OnoeRateControlhas the same defect and is fixed in the same commit. It is milder there —computeMode()returns early while the station has no successful transmission yet — but it still divides by zero on the way in, leavingavgRetriesPerFrameat NaN.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.
Fixed in 65474d9 (current head): the state is created with
state.timer = simTime(), so the increase interval starts when the station is first seen rather than at t=0.