Bug 625 - Wrong calculation of GetAccessGrantStart in DcfManager
: Wrong calculation of GetAccessGrantStart in DcfManager
Status: RESOLVED FIXED
: ns-3
wifi
: ns-3-dev
: All All
: P3 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-07-07 08:30 EDT by
Modified: 2009-07-16 06:20 EDT (History)


Attachments
Proposed fix (414 bytes, patch)
2009-07-07 08:30 EDT, Kirill Andreev
Details | Diff
Propose fix + test (1.64 KB, application/octet-stream)
2009-07-16 02:49 EDT, Kirill Andreev
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-07-07 08:30:51 EDT
Created an attachment (id=516) [details]
Proposed fix

DcfManager checks that it is not in RX mode by comparing last RX end and last
RX start "if (m_lastRxEnd >= m_lastRxStart)", but in case of hidden stations
these moments of time may be equal, and wrong decision will be made (for
example, we have started to receive a frame exactly after previous received
frame) (see figure). So, to prevent this situation it is better to check
m_rxing flag.
Also the proposed fix does not change any regression or unit tests.


stations:
1 2 3

frames at station 2:
|frame from 1| |frame from 3|
             ^ ^
             these 2 moments may be equal if stations 1 and 3 don't hear each
other
------- Comment #1 From 2009-07-13 04:01:18 EDT -------
Is this fixing an actual bug ? If so, could you try to provide a new testcase
which shows the bug ?
------- Comment #2 From 2009-07-16 02:49:23 EDT -------
Created an attachment (id=534) [details]
Propose fix + test

You can see, that without path expected access time is the same as in the
previous test
------- Comment #3 From 2009-07-16 02:50:48 EDT -------
I have written a tescase, but in new patch I have removed NS_ASSERT () in
dcf-manager.cc line 580, because when I have run my test, this ASSERT has
failed (and using this ASSERT I have observed this bug). Also we can see, that
expected access is wrong when we receive second frame exactly at the moment of
endRx of the first frame (this is possible with hidden terminals)
------- Comment #4 From 2009-07-16 03:15:05 EDT -------
(In reply to comment #3)
> I have written a tescase, but in new patch I have removed NS_ASSERT () in
> dcf-manager.cc line 580, because when I have run my test, this ASSERT has
> failed (and using this ASSERT I have observed this bug). Also we can see, that
> expected access is wrong when we receive second frame exactly at the moment of
> endRx of the first frame (this is possible with hidden terminals)
> 

I really don't understand why you are removing that ASSERT (which you
introduced yourself previously). Can you explain better what triggers that
assert to fail ?
------- Comment #5 From 2009-07-16 03:55:22 EDT -------
(In reply to comment #4)
> (In reply to comment #3)
> > I have written a tescase, but in new patch I have removed NS_ASSERT () in
> > dcf-manager.cc line 580, because when I have run my test, this ASSERT has
> > failed (and using this ASSERT I have observed this bug). Also we can see, that
> > expected access is wrong when we receive second frame exactly at the moment of
> > endRx of the first frame (this is possible with hidden terminals)
> > 
> 
> I really don't understand why you are removing that ASSERT (which you
> introduced yourself previously). Can you explain better what triggers that
> assert to fail ?
> 
I have removed this ASSERT just to show, taht the tescase itself fails, rather
than this ASSERT. So, it shall not be removed at all.
------- Comment #6 From 2009-07-16 04:04:50 EDT -------
ack :)

feel free to commit then. (Do you have commit powers ?)
------- Comment #7 From 2009-07-16 04:14:35 EDT -------
(In reply to comment #6)
> ack :)
> 
> feel free to commit then. (Do you have commit powers ?)
> 
No, I have no commit powers.
------- Comment #8 From 2009-07-16 06:20:10 EDT -------
changeset: f17f12944235