wifi: (fixes #2926) Align SSRC and SLRC mechanism to the standard
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -958,7 +958,7 @@ MinstrelHtWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
|
||||
}
|
||||
|
||||
bool
|
||||
MinstrelHtWifiManager::DoNeedDataRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
|
||||
MinstrelHtWifiManager::DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << st << packet << normally);
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ private:
|
||||
uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus,
|
||||
double rxSnr, double dataSnr);
|
||||
bool IsLowLatency (void) const;
|
||||
bool DoNeedDataRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally);
|
||||
bool DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally);
|
||||
|
||||
/**
|
||||
* Check the validity of a combination of number of streams, chWidth and mode.
|
||||
|
||||
@@ -855,7 +855,7 @@ MinstrelWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
|
||||
}
|
||||
|
||||
bool
|
||||
MinstrelWifiManager::DoNeedDataRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
|
||||
MinstrelWifiManager::DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << st << packet << normally);
|
||||
MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *)st;
|
||||
|
||||
@@ -273,7 +273,7 @@ private:
|
||||
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station);
|
||||
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station);
|
||||
|
||||
bool DoNeedDataRetransmission (WifiRemoteStation *st,
|
||||
bool DoNeedRetransmission (WifiRemoteStation *st,
|
||||
Ptr<const Packet> packet, bool normally);
|
||||
|
||||
bool IsLowLatency (void) const;
|
||||
|
||||
@@ -353,14 +353,14 @@ bool
|
||||
Txop::NeedRtsRetransmission (Ptr<const Packet> 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<const Packet> 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
|
||||
|
||||
@@ -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<uint32_t> ())
|
||||
.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<const Packet> 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<const Packet> 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<const Packet> packet, bool normally)
|
||||
{
|
||||
return normally;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::DoNeedDataRetransmission (WifiRemoteStation *station,
|
||||
Ptr<const Packet> packet, bool normally)
|
||||
WifiRemoteStationManager::DoNeedRetransmission (WifiRemoteStation *station,
|
||||
Ptr<const Packet> packet, bool normally)
|
||||
{
|
||||
return normally;
|
||||
}
|
||||
|
||||
@@ -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<const Packet> 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<const Packet> packet);
|
||||
bool NeedRetransmission (Mac48Address address, const WifiMacHeader *header,
|
||||
Ptr<const Packet> packet);
|
||||
/**
|
||||
* \param address remote address
|
||||
* \param header MAC header
|
||||
@@ -1080,20 +1070,6 @@ private:
|
||||
*/
|
||||
virtual bool DoNeedRts (WifiRemoteStation *station,
|
||||
Ptr<const Packet> 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<const Packet> 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<const Packet> packet, bool normally);
|
||||
/**
|
||||
* \param station the station that we need to communicate
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user