Bug 1205 - EDCA is incorrectly modelled as DCF
EDCA is incorrectly modelled as DCF
Product: ns-3
Classification: Unclassified
Component: wifi
All All
: P5 normal
Assigned To: sebastien.deronne
Depends on:
  Show dependency treegraph
Reported: 2011-07-03 08:28 EDT by Dean Armstrong
Modified: 2016-02-22 18:34 EST (History)
5 users (show)

See Also:

An attempt at illustrating the difference between EDCA and DCF (33.04 KB, application/pdf)
2011-07-03 08:28 EDT, Dean Armstrong
First draft of proposed correction to EDCA behaviour (3.18 KB, patch)
2011-07-04 06:54 EDT, Dean Armstrong
Details | Diff
patch to fix (3.53 KB, patch)
2016-02-18 17:40 EST, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Armstrong 2011-07-03 08:28:51 EDT
Created attachment 1183 [details]
An attempt at illustrating the difference between EDCA and DCF

EDCA and DCF are fundamentally different channel access mechanisms. Specifically, the rules around maintenance of the backoff counter, and the slot boundaries on which transmission can begin are subtly, but significantly different between the two.

In DCF (see Clause of IEEE Std. 802.11-2007), the backoff counter is decremented at end of each idle slot following DIFS. As soon as it hits zero, channel access is won and the transmission begins.										

In EDCA (see Clause of IEEE Std. 802.11-2007), at slot boundaries following AIFS (including the one immediately following AIFS) either the backoff counter decrements, or, if that counter is already zero then channel access is won. It is significant that only one of these things can happen on any give slot boundary.

With starting parameters apparently equal (i.e., AIFS = DIFS, and same value of backoff count chosen at the same point in time), the difference becomes apparent when a busy medium requires that backoff is suspended. Each time this happens, the DCF rules lead to transmission starting a slot later than it would have under the EDCA rules. I've attached a PDF that attempts to illustrate this difference with an example.

Unfortunately, the ns-3 Wi-Fi module aggregates instances of a DCF model (to give the EDCA queues) and calls the result EDCA; it's not.
Comment 1 Dean Armstrong 2011-07-04 06:54:51 EDT
Created attachment 1185 [details]
First draft of proposed correction to EDCA behaviour

I think the attached changes (against head of ns-3-dev) do the job in addressing this bug. Note that they do cause two regression test failures which I've not looked into in detail, but which I suspect are due to PCAP trace differences due to the corrected EDCA behaviour.

As always, comments welcome.
Comment 2 Tom Henderson 2016-02-18 17:40:43 EST
Created attachment 2279 [details]
patch to fix
Comment 3 Tom Henderson 2016-02-18 17:45:05 EST
This bug was again reported by Ali Rostami, with a similar proposal of how to fix, so I updated Dean's old patch to ns-3-dev; suggest to commit before release.
Comment 4 sebastien.deronne 2016-02-19 11:17:56 EST
This looks ok to be pushed
Comment 5 sebastien.deronne 2016-02-22 18:34:31 EST
changeset 11900:10e125f6ed5e