diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 1bdf161ab..8af6c5847 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -43,6 +43,7 @@ Bugs fixed - Bug 2920 - wifi: Default MaxSlrc and fragmentation threshold values differ from standard - Bug 2924 - documentation about Peek/Dequeue usage - Bug 2925 - wifi: MinstrelHt provides strange results at low SNR with A-MPDU enabled +- Bug 2926 - wifi: SSRC and SLRC mechanism not fully aligned to the standard - Bug 2931 - Queue Disc drops the CE marked packets Known issues diff --git a/examples/wireless/examples-to-run.py b/examples/wireless/examples-to-run.py index df0b687ef..d23c908bc 100755 --- a/examples/wireless/examples-to-run.py +++ b/examples/wireless/examples-to-run.py @@ -47,8 +47,8 @@ cpp_examples = [ ("he-wifi-network --simulationTime=0.3 --frequency=5 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=639", "True", "True"), ("he-wifi-network --simulationTime=0.25 --frequency=2.4 --useRts=0 --minExpectedThroughput=6 --maxExpectedThroughput=238", "True", "True"), ("he-wifi-network --simulationTime=0.3 --frequency=2.4 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=224", "True", "True"), - ("simple-ht-hidden-stations --simulationTime=1 --enableRts=0 --minExpectedThroughput=16.5 --maxExpectedThroughput=17", "True", "True"), - ("simple-ht-hidden-stations --simulationTime=1 --enableRts=1 --minExpectedThroughput=20 --maxExpectedThroughput=20.5", "True", "True"), + ("simple-ht-hidden-stations --simulationTime=1 --enableRts=0 --nMpdus=32 --minExpectedThroughput=55 --maxExpectedThroughput=56", "True", "True"), + ("simple-ht-hidden-stations --simulationTime=1 --enableRts=1 --nMpdus=32 --minExpectedThroughput=57 --maxExpectedThroughput=58", "True", "True"), ("mixed-network --simulationTime=1", "True", "True"), ("wifi-aggregation --simulationTime=1 --verifyResults=1", "True", "True"), ("80211e-txop --simulationTime=1 --verifyResults=1", "True", "True"), diff --git a/src/aodv/test/aodv-chain-regression-test-0-0.pcap b/src/aodv/test/aodv-chain-regression-test-0-0.pcap index 1ff92ca3e..b93fae2c0 100644 Binary files a/src/aodv/test/aodv-chain-regression-test-0-0.pcap and b/src/aodv/test/aodv-chain-regression-test-0-0.pcap differ diff --git a/src/aodv/test/aodv-chain-regression-test-1-0.pcap b/src/aodv/test/aodv-chain-regression-test-1-0.pcap index e925605ec..daf53462d 100644 Binary files a/src/aodv/test/aodv-chain-regression-test-1-0.pcap and b/src/aodv/test/aodv-chain-regression-test-1-0.pcap differ diff --git a/src/aodv/test/bug-606-test-0-0.pcap b/src/aodv/test/bug-606-test-0-0.pcap index 5029708ce..612c88e2a 100644 Binary files a/src/aodv/test/bug-606-test-0-0.pcap and b/src/aodv/test/bug-606-test-0-0.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap index 3d7f2823f..0494e2140 100644 Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-0-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap index 34978f1c0..a017f3ebb 100644 Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-1-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap index f2e6e03b9..6b21e0ba8 100644 Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-2-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap index 362350158..b2c4eb373 100644 Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-3-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap index 862e57972..c25ecae68 100644 Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-4-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap b/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap index 2da032d76..a6cb27903 100644 Binary files a/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap and b/src/mesh/test/dot11s/hwmp-reactive-regression-test-5-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-simplest-regression-test-0-1.pcap b/src/mesh/test/dot11s/hwmp-simplest-regression-test-0-1.pcap index b7cd8fa5f..c890e9287 100644 Binary files a/src/mesh/test/dot11s/hwmp-simplest-regression-test-0-1.pcap and b/src/mesh/test/dot11s/hwmp-simplest-regression-test-0-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-simplest-regression-test-1-1.pcap b/src/mesh/test/dot11s/hwmp-simplest-regression-test-1-1.pcap index e1d83ae5e..62e940bad 100644 Binary files a/src/mesh/test/dot11s/hwmp-simplest-regression-test-1-1.pcap and b/src/mesh/test/dot11s/hwmp-simplest-regression-test-1-1.pcap differ diff --git a/src/wifi/model/minstrel-ht-wifi-manager.cc b/src/wifi/model/minstrel-ht-wifi-manager.cc index 785f4a268..ea8081f20 100644 --- a/src/wifi/model/minstrel-ht-wifi-manager.cc +++ b/src/wifi/model/minstrel-ht-wifi-manager.cc @@ -958,7 +958,7 @@ MinstrelHtWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) } bool -MinstrelHtWifiManager::DoNeedDataRetransmission (WifiRemoteStation *st, Ptr packet, bool normally) +MinstrelHtWifiManager::DoNeedRetransmission (WifiRemoteStation *st, Ptr packet, bool normally) { NS_LOG_FUNCTION (this << st << packet << normally); diff --git a/src/wifi/model/minstrel-ht-wifi-manager.h b/src/wifi/model/minstrel-ht-wifi-manager.h index 3cfab003e..41f1126d6 100644 --- a/src/wifi/model/minstrel-ht-wifi-manager.h +++ b/src/wifi/model/minstrel-ht-wifi-manager.h @@ -241,7 +241,7 @@ private: uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus, double rxSnr, double dataSnr); bool IsLowLatency (void) const; - bool DoNeedDataRetransmission (WifiRemoteStation *st, Ptr packet, bool normally); + bool DoNeedRetransmission (WifiRemoteStation *st, Ptr packet, bool normally); /** * Check the validity of a combination of number of streams, chWidth and mode. diff --git a/src/wifi/model/minstrel-wifi-manager.cc b/src/wifi/model/minstrel-wifi-manager.cc index 94c299ac1..5093bd85a 100644 --- a/src/wifi/model/minstrel-wifi-manager.cc +++ b/src/wifi/model/minstrel-wifi-manager.cc @@ -855,7 +855,7 @@ MinstrelWifiManager::DoGetRtsTxVector (WifiRemoteStation *st) } bool -MinstrelWifiManager::DoNeedDataRetransmission (WifiRemoteStation *st, Ptr packet, bool normally) +MinstrelWifiManager::DoNeedRetransmission (WifiRemoteStation *st, Ptr packet, bool normally) { NS_LOG_FUNCTION (this << st << packet << normally); MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *)st; diff --git a/src/wifi/model/minstrel-wifi-manager.h b/src/wifi/model/minstrel-wifi-manager.h index 79830a0bb..559b1e5f2 100644 --- a/src/wifi/model/minstrel-wifi-manager.h +++ b/src/wifi/model/minstrel-wifi-manager.h @@ -273,7 +273,7 @@ private: WifiTxVector DoGetDataTxVector (WifiRemoteStation *station); WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station); - bool DoNeedDataRetransmission (WifiRemoteStation *st, + bool DoNeedRetransmission (WifiRemoteStation *st, Ptr packet, bool normally); bool IsLowLatency (void) const; diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index a71d27de5..381ec2899 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -353,14 +353,14 @@ bool Txop::NeedRtsRetransmission (Ptr packet, const WifiMacHeader &hdr) { NS_LOG_FUNCTION (this); - return m_stationManager->NeedRtsRetransmission (hdr.GetAddr1 (), &hdr, packet); + return m_stationManager->NeedRetransmission (hdr.GetAddr1 (), &hdr, packet); } bool Txop::NeedDataRetransmission (Ptr packet, const WifiMacHeader &hdr) { NS_LOG_FUNCTION (this); - return m_stationManager->NeedDataRetransmission (hdr.GetAddr1 (), &hdr, packet); + return m_stationManager->NeedRetransmission (hdr.GetAddr1 (), &hdr, packet); } bool diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index ec9481f21..2e3377f1d 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -334,13 +334,13 @@ WifiRemoteStationManager::GetTypeId (void) MakeBooleanAccessor (&WifiRemoteStationManager::IsLowLatency), MakeBooleanChecker ()) .AddAttribute ("MaxSsrc", - "The maximum number of retransmission attempts for an RTS. " - " This value will not have any effect on some rate control algorithms.", + "The maximum number of retransmission attempts for any packet with size <= RtsCtsThreshold. " + "This value will not have any effect on some rate control algorithms.", UintegerValue (7), MakeUintegerAccessor (&WifiRemoteStationManager::SetMaxSsrc), MakeUintegerChecker ()) .AddAttribute ("MaxSlrc", - "The maximum number of retransmission attempts for a DATA packet. " + "The maximum number of retransmission attempts for any packet with size > RtsCtsThreshold. " "This value will not have any effect on some rate control algorithms.", UintegerValue (4), MakeUintegerAccessor (&WifiRemoteStationManager::SetMaxSlrc), @@ -1144,27 +1144,27 @@ WifiRemoteStationManager::GetUseGreenfieldProtection (void) const } bool -WifiRemoteStationManager::NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header, +WifiRemoteStationManager::NeedRetransmission (Mac48Address address, const WifiMacHeader *header, Ptr packet) { NS_LOG_FUNCTION (this << address << packet << *header); NS_ASSERT (!address.IsGroup ()); WifiRemoteStation *station = Lookup (address, header); - bool normally = station->m_ssrc < m_maxSsrc; - NS_LOG_DEBUG ("WifiRemoteStationManager::NeedDataRetransmission count: " << station->m_ssrc << " result: " << std::boolalpha << normally); - return DoNeedRtsRetransmission (station, packet, normally); -} - -bool -WifiRemoteStationManager::NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header, - Ptr packet) -{ - NS_LOG_FUNCTION (this << address << packet << *header); - NS_ASSERT (!address.IsGroup ()); - WifiRemoteStation *station = Lookup (address, header); - bool normally = station->m_slrc < m_maxSlrc; - NS_LOG_DEBUG ("WifiRemoteStationManager::NeedDataRetransmission count: " << station->m_slrc << " result: " << std::boolalpha << normally); - return DoNeedDataRetransmission (station, packet, normally); + bool longMpdu = (packet->GetSize () + header->GetSize () + WIFI_MAC_FCS_LENGTH) > m_rtsCtsThreshold; + uint32_t retryCount, maxRetryCount; + if (longMpdu) + { + retryCount = station->m_slrc; + maxRetryCount = m_maxSlrc; + } + else + { + retryCount = station->m_ssrc; + maxRetryCount = m_maxSsrc; + } + bool normally = retryCount < maxRetryCount; + NS_LOG_DEBUG ("WifiRemoteStationManager::NeedRetransmission count: " << retryCount << " result: " << std::boolalpha << normally); + return DoNeedRetransmission (station, packet, normally); } bool @@ -1979,15 +1979,8 @@ WifiRemoteStationManager::DoNeedRts (WifiRemoteStation *station, } bool -WifiRemoteStationManager::DoNeedRtsRetransmission (WifiRemoteStation *station, - Ptr packet, bool normally) -{ - return normally; -} - -bool -WifiRemoteStationManager::DoNeedDataRetransmission (WifiRemoteStation *station, - Ptr packet, bool normally) +WifiRemoteStationManager::DoNeedRetransmission (WifiRemoteStation *station, + Ptr packet, bool normally) { return normally; } diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index 0d7518758..12a1ed7f5 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -688,7 +688,7 @@ public: double ackSnr, WifiMode ackMode, double dataSnr); /** * Should be invoked after calling ReportRtsFailed if - * NeedRtsRetransmission returns false + * NeedRetransmission returns false * * \param address the address of the receiver * \param header MAC header of the DATA packet @@ -696,7 +696,7 @@ public: void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header); /** * Should be invoked after calling ReportDataFailed if - * NeedDataRetransmission returns false + * NeedRetransmission returns false * * \param address the address of the receiver * \param header MAC header of the DATA packet @@ -748,16 +748,6 @@ public: */ bool NeedCtsToSelf (WifiTxVector txVector); - /** - * \param address remote address - * \param header MAC header - * \param packet the packet to send - * - * \return true if we want to restart a failed RTS/CTS handshake, - * false otherwise. - */ - bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header, - Ptr packet); /** * \param address remote address * \param header MAC header @@ -766,8 +756,8 @@ public: * \return true if we want to resend a packet after a failed transmission attempt, * false otherwise. */ - bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header, - Ptr packet); + bool NeedRetransmission (Mac48Address address, const WifiMacHeader *header, + Ptr packet); /** * \param address remote address * \param header MAC header @@ -1080,20 +1070,6 @@ private: */ virtual bool DoNeedRts (WifiRemoteStation *station, Ptr packet, bool normally); - /** - * \param station the station that we need to communicate - * \param packet the packet to send - * \param normally indicates whether the normal 802.11 rts enable mechanism would - * request that the rts is retransmitted or not. - * - * \return true if we want to restart a failed RTS/CTS handshake, - * false otherwise. - * - * Note: This method is called after an rts/cts handshake has been attempted - * and has failed. - */ - virtual bool DoNeedRtsRetransmission (WifiRemoteStation *station, - Ptr packet, bool normally); /** * \param station the station that we need to communicate * \param packet the packet to send @@ -1102,10 +1078,10 @@ private: * \return true if we want to resend a packet after a failed transmission attempt, * false otherwise. * - * Note: This method is called after a unicast packet transmission has been attempted - * and has failed. + * Note: This method is called after any unicast packet transmission (control, management, + * or data) has been attempted and has failed. */ - virtual bool DoNeedDataRetransmission (WifiRemoteStation *station, + virtual bool DoNeedRetransmission (WifiRemoteStation *station, Ptr packet, bool normally); /** * \param station the station that we need to communicate diff --git a/src/wifi/test/wifi-aggregation-test.cc b/src/wifi/test/wifi-aggregation-test.cc index 912624c20..2415df038 100644 --- a/src/wifi/test/wifi-aggregation-test.cc +++ b/src/wifi/test/wifi-aggregation-test.cc @@ -231,7 +231,7 @@ AmpduAggregationTest::DoRun (void) NS_TEST_EXPECT_MSG_EQ (isAmpdu, false, "no MPDU aggregation should be performed if there is no agreement"); NS_TEST_EXPECT_MSG_EQ (m_low->m_aggregateQueue[0]->GetNPackets (), 0, "aggregation queue is not flushed"); - m_manager->SetMaxSlrc (0); //set to 0 in order to fake that the maximum number of retries has been reached + m_manager->SetMaxSsrc (0); //set to 0 in order to fake that the maximum number of retries has been reached m_txop->MissedAck (); NS_TEST_EXPECT_MSG_EQ (m_txop->m_currentPacket, 0, "packet should be discarded");