Bug 1205

Summary: EDCA is incorrectly modelled as DCF
Product: ns-3 Reporter: Dean Armstrong <deanarm>
Component: wifiAssignee: sebastien.deronne
Status: RESOLVED FIXED    
Severity: normal CC: deanarm, ns-bugs, ruben, sebastien.deronne, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: An attempt at illustrating the difference between EDCA and DCF
First draft of proposed correction to EDCA behaviour
patch to fix

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 9.2.5.2 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 9.9.1.3 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