Bug 595

Summary: PHY may start receive packet inside SIFS
Product: ns-3 Reporter: Kirill V. Andreev <kirillano>
Component: wifiAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mathieu.lacage
Priority: P1    
Version: ns-3.4   
Hardware: All   
OS: All   
Attachments: Proposed fix
Testcace added
NS_ASSERT fixed

Description Kirill V. Andreev 2009-06-16 12:44:04 UTC
Created attachment 467 [details]
Proposed fix

PHY passes information to DcfManager about PHY events, and DCF manager must catch situation, when PHY starts to transmit and m_rxing is true. This may occur only after the following steps:
1. PHY has started to receive a packet inside SIFS.
2. MacLow has started to transmit an ACK frame (or any other frame) when SIFS has expired.
3. PHY has started to transmit this ACK frame and has cancelled previously started receiving:
  if (m_state->IsStateSync ())
    {
      m_endSyncEvent.Cancel ();
    }
and has not tell anything to DcfManager.
4. IsBusy method of DcfManager decides that the medium is busy (because m_rxing was not unset)
5. Next transmission causes collision at DcfManager layer due to IsBusy () (see DcfManager::RequestAccess)


The idea to solve this problem is to check m_rxing flag when running DcfManager::NotifyTxStartNow (see patch)
Comment 1 Mathieu Lacage 2009-06-19 03:19:02 UTC
this looks right, but, as usual for changes to the Dcf code, I would like to see an associated testcase. Could you do this for me ? 
Comment 2 Kirill V. Andreev 2009-06-19 05:16:53 UTC
OK
Comment 3 Kirill V. Andreev 2009-06-22 10:11:41 UTC
Created attachment 475 [details]
Testcace added

Added a test which cheks that RX inside SIFS was managed properly.
Comment 4 Mathieu Lacage 2009-06-25 09:25:36 UTC
changeset 9b07308116ed
Comment 5 Kirill V. Andreev 2009-06-26 08:55:03 UTC
Created attachment 490 [details]
NS_ASSERT fixed

Fixed NS_ASSERT: '<' replaced with '<='
Comment 6 Kirill V. Andreev 2009-06-26 09:02:33 UTC
This assert has failed, but after replacing '<' with '<=' everything has become OK. this assert was added, because cancel RX may occur only when we cancel RX inside SIFS
Comment 7 Mathieu Lacage 2009-06-26 09:26:37 UTC
changeset e66fc1287031