wifi: Align TXOP limit for VI and VO to 802.11-2020
This commit is contained in:
@@ -49,8 +49,8 @@
|
||||
//
|
||||
// The configuration is the following on the 4 networks:
|
||||
// - STA A sends AC_BE traffic to AP A with default AC_BE TXOP value of 0 (1 MSDU);
|
||||
// - STA B sends AC_BE traffic to AP B with non-default AC_BE TXOP of 3.008 ms;
|
||||
// - STA C sends AC_VI traffic to AP C with default AC_VI TXOP of 3.008 ms;
|
||||
// - STA B sends AC_BE traffic to AP B with non-default AC_BE TXOP of 4096 us;
|
||||
// - STA C sends AC_VI traffic to AP C with default AC_VI TXOP of 4096 us;
|
||||
// - STA D sends AC_VI traffic to AP D with non-default AC_VI TXOP value of 0 (1 MSDU);
|
||||
//
|
||||
// The user can select the distance between the stations and the APs, can enable/disable the RTS/CTS mechanism
|
||||
@@ -97,6 +97,7 @@ int main (int argc, char *argv[])
|
||||
double distance = 5; //meters
|
||||
bool enablePcap = 0;
|
||||
bool verifyResults = 0; //used for regression
|
||||
Time txopLimit = MicroSeconds (4096);
|
||||
|
||||
CommandLine cmd (__FILE__);
|
||||
cmd.AddValue ("payloadSize", "Payload size in bytes", payloadSize);
|
||||
@@ -161,7 +162,7 @@ int main (int argc, char *argv[])
|
||||
Ptr<QosTxop> edca;
|
||||
wifi_mac->GetAttribute ("BE_Txop", ptr);
|
||||
edca = ptr.Get<QosTxop> ();
|
||||
edca->SetTxopLimit (MicroSeconds (3008));
|
||||
edca->SetTxopLimit (txopLimit);
|
||||
|
||||
// Trace TXOP duration for BE on STA1
|
||||
dev = wifiStaNodes.Get (1)->GetDevice (0);
|
||||
@@ -378,30 +379,30 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
throughput = totalPacketsThroughB * payloadSize * 8 / (simulationTime * 1000000.0);
|
||||
std::cout << "AC_BE with non-default TXOP limit (3.008ms): " << '\n'
|
||||
std::cout << "AC_BE with non-default TXOP limit (4.096ms): " << '\n'
|
||||
<< " Throughput = " << throughput << " Mbit/s" << '\n';
|
||||
if (verifyResults && (throughput < 35 || throughput > 36))
|
||||
if (verifyResults && (throughput < 36.5 || throughput > 37))
|
||||
{
|
||||
NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
|
||||
exit (1);
|
||||
}
|
||||
std::cout << " Maximum TXOP duration = " << beTxopTracer.m_max.GetMicroSeconds () << " us" << '\n';
|
||||
if (verifyResults && (beTxopTracer.m_max < MicroSeconds (2700) || beTxopTracer.m_max > MicroSeconds (3008)))
|
||||
if (verifyResults && (beTxopTracer.m_max < MicroSeconds (3008) || beTxopTracer.m_max > txopLimit))
|
||||
{
|
||||
NS_LOG_ERROR ("Maximum TXOP duration " << beTxopTracer.m_max << " is not in the expected boundaries!");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
throughput = totalPacketsThroughC * payloadSize * 8 / (simulationTime * 1000000.0);
|
||||
std::cout << "AC_VI with default TXOP limit (3.008ms): " << '\n'
|
||||
std::cout << "AC_VI with default TXOP limit (4.096ms): " << '\n'
|
||||
<< " Throughput = " << throughput << " Mbit/s" << '\n';
|
||||
if (verifyResults && (throughput < 35.5 || throughput > 36.5))
|
||||
if (verifyResults && (throughput < 37.0 || throughput > 37.5))
|
||||
{
|
||||
NS_LOG_ERROR ("Obtained throughput " << throughput << " is not in the expected boundaries!");
|
||||
exit (1);
|
||||
}
|
||||
std::cout << " Maximum TXOP duration = " << viTxopTracer.m_max.GetMicroSeconds () << " us" << '\n';
|
||||
if (verifyResults && (viTxopTracer.m_max < MicroSeconds (2700) || viTxopTracer.m_max > MicroSeconds (3008)))
|
||||
if (verifyResults && (viTxopTracer.m_max < MicroSeconds (3008) || viTxopTracer.m_max > txopLimit))
|
||||
{
|
||||
NS_LOG_ERROR ("Maximum TXOP duration " << viTxopTracer.m_max << " is not in the expected boundaries!");
|
||||
exit (1);
|
||||
|
||||
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.
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.
@@ -615,14 +615,14 @@ WifiMac::ConfigureDcf (Ptr<Txop> dcf, uint32_t cwmin, uint32_t cwmax,
|
||||
cwMaxValue = (cwmin + 1) / 2 - 1;
|
||||
aifsnValue = 2;
|
||||
txopLimitDsss = MicroSeconds (3264);
|
||||
txopLimitNoDsss = MicroSeconds (1504); // TODO should be MicroSeconds (2080)
|
||||
txopLimitNoDsss = MicroSeconds (2080);
|
||||
break;
|
||||
case AC_VI:
|
||||
cwMinValue = (cwmin + 1) / 2 - 1;
|
||||
cwMaxValue = cwmin;
|
||||
aifsnValue = 2;
|
||||
txopLimitDsss = MicroSeconds (6016);
|
||||
txopLimitNoDsss = MicroSeconds (3008); // TODO should be MicroSeconds (4096)
|
||||
txopLimitNoDsss = MicroSeconds (4096);
|
||||
break;
|
||||
case AC_BE:
|
||||
cwMinValue = cwmin;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "ns3/yans-wifi-helper.h"
|
||||
#include "ns3/mobility-helper.h"
|
||||
#include "ns3/pointer.h"
|
||||
#include <ns3/attribute-container.h>
|
||||
#include "ns3/packet-socket-server.h"
|
||||
#include "ns3/packet-socket-client.h"
|
||||
#include "ns3/packet-socket-helper.h"
|
||||
@@ -488,6 +489,8 @@ TwoLevelAggregationTest::DoRun (void)
|
||||
|
||||
m_mac->SetAttribute ("VI_MaxAmsduSize", UintegerValue (3050)); // max 2 MSDUs per A-MSDU
|
||||
m_mac->SetAttribute ("VI_MaxAmpduSize", UintegerValue (65535));
|
||||
m_mac->GetVIQueue ()->SetAttribute ("TxopLimits",
|
||||
AttributeContainerValue<TimeValue> (std::vector<Time> {MicroSeconds (3008)}));
|
||||
m_manager->SetAttribute ("DataMode", StringValue ("HtMcs2")); // 19.5Mbps
|
||||
|
||||
hdr.SetQosTid (tid);
|
||||
|
||||
Reference in New Issue
Block a user