Bug 706 - Backoff counting when starting NS.
Backoff counting when starting NS.
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
pre-release
All All
: P4 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-06 11:35 EDT by Kirill Andreev
Modified: 2010-02-26 04:18 EST (History)
4 users (show)

See Also:


Attachments
Proposed fix. (652 bytes, patch)
2009-10-06 11:35 EDT, Kirill Andreev
Details | Diff
Fix with DoStart (7.28 KB, patch)
2009-12-02 08:01 EST, Kirill Andreev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Andreev 2009-10-06 11:35:28 EDT
Created attachment 621 [details]
Proposed fix.

When the packet is received, DcaTxop must start backoff immediately, but when we initiate our simulation, the backoff is not counted. So, I suppose to add starting backoff in constructor of DcaTxop and in SetMinCw method, because inside constructor MinCw may be incorrect.
Comment 1 Mathieu Lacage 2009-11-16 10:18:27 EST
The risk is that m_cw will not be initialized correctly when the constructor is invoked. I suspect that the best way to do this would be to use the Object::DoStart method I introduced a couple of days ago and move the code you introduced here instead:

void
DcaTxop::DoStart (void)
{
  // XXX... start backoff
  // chainup
  Dcf::DoStart ();
}

And, then, you need to make sure that the MAC layer which creates the DcaTxop class calls its Start method:

void
NqapWifiMac::DoStart (void)
{
  m_beaconDca->Start ();
  m_dca->Start ();
  // chainup
  WifiMac::DoStart ();
}

and the same modification in all other WifiMac subclasses.
Comment 2 Kirill Andreev 2009-12-02 08:01:59 EST
Created attachment 684 [details]
Fix with DoStart
Comment 3 Mathieu Lacage 2009-12-31 05:46:44 EST
If you have tested this and it works, please, commit.
Comment 4 Kirill Andreev 2010-01-11 04:44:00 EST
changeset 5903	395e17028faf
Comment 5 Josh Pelkey 2010-02-20 13:10:05 EST
Why has this been reopened? Will close within a week without a response.
Comment 6 Faker Moatamri 2010-02-22 03:52:37 EST
The changeset have been reverted because it was breaking the builds just few weeks from 3.7 release.
Comment 7 Kirill Andreev 2010-02-26 04:18:07 EST
Changeset 41ee42654550