diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index a2a08e972..1a057abf8 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -45,6 +45,7 @@ The wimax module was removed and moved to the ns-3 App Store. - (internet) #1251 - Added check for longest prefix match in GlobalRouting - (wifi) Block transmission on other EMLSR links as soon as it is detected that the main PHY is receiving an A-MPDU, to prevent that the EMLSR client starts an UL TXOP before the end of the A-MPDU - (wifi) EMLSR clients can switch to listening operations when receiving the MAC header of a broadcast frame that is not a Trigger Frame nor a Multi-STA BA +- (wifi) Immediate channel access should not be postponed by a backoff slot if channel access is requested at a slot boundary ## Release 3.45 diff --git a/examples/wireless/examples-to-run.py b/examples/wireless/examples-to-run.py index b166e540a..7868a79c2 100644 --- a/examples/wireless/examples-to-run.py +++ b/examples/wireless/examples-to-run.py @@ -195,7 +195,7 @@ cpp_examples = [ "True", ), ( - "wifi-eht-network --simulationTime=0.25s --udp=0 --downlink=0 --useRts=0 --nStations=4 --dlAckType=AGGR-MU-BAR --enableUlOfdma=1 --enableBsrp=1 --mpduBufferSize=1024 --mcs=8 --muSchedAccessReqInterval=45ms --frequency2=6 --minExpectedThroughput=50 --maxExpectedThroughput=550 --RngRun=3", + "wifi-eht-network --simulationTime=0.25s --udp=0 --downlink=0 --useRts=0 --nStations=4 --dlAckType=AGGR-MU-BAR --enableUlOfdma=1 --enableBsrp=1 --mpduBufferSize=1024 --mcs=8 --muSchedAccessReqInterval=45ms --frequency2=6 --minExpectedThroughput=50 --maxExpectedThroughput=550", "True", "True", ), diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap index 7bb053ac4..c18fc35a1 100644 Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-0-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap index 5d1256467..a483ef549 100644 Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-1-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap index f9b93200d..34a03fac0 100644 Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-2-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap index 0d23240fa..179312d08 100644 Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-3-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap b/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap index 6493dad22..a43447a2a 100644 Binary files a/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.pcap and b/src/mesh/test/dot11s/hwmp-proactive-regression-test-4-1.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 7525cf0a4..bd62fb14d 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 5ced06a0b..5833be2a2 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 8ef84f0f3..d15b1c789 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 51c6c6926..3406dda85 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 674030751..0fe7813f6 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 10f2e0c43..8051d40af 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 664ad5954..a4f6f2d05 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 ce04d31e3..9f7b9a4f6 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/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap index bc55ea3db..adc829b00 100644 Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-0-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap index 0f7dbaf41..ec9ab0e7d 100644 Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-1-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap index cb46d1545..2719fa322 100644 Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-2-1.pcap differ diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap index 0ebb4197a..95a67d1c8 100644 Binary files a/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap and b/src/mesh/test/dot11s/hwmp-target-flags-regression-test-3-1.pcap differ diff --git a/src/mesh/test/flame/flame-regression-test-0-1.pcap b/src/mesh/test/flame/flame-regression-test-0-1.pcap index b93b5b31a..946b12f94 100644 Binary files a/src/mesh/test/flame/flame-regression-test-0-1.pcap and b/src/mesh/test/flame/flame-regression-test-0-1.pcap differ diff --git a/src/mesh/test/flame/flame-regression-test-1-1.pcap b/src/mesh/test/flame/flame-regression-test-1-1.pcap index 5413f34c3..793264502 100644 Binary files a/src/mesh/test/flame/flame-regression-test-1-1.pcap and b/src/mesh/test/flame/flame-regression-test-1-1.pcap differ diff --git a/src/mesh/test/flame/flame-regression-test-2-1.pcap b/src/mesh/test/flame/flame-regression-test-2-1.pcap index cc5acb9ed..3785712a6 100644 Binary files a/src/mesh/test/flame/flame-regression-test-2-1.pcap and b/src/mesh/test/flame/flame-regression-test-2-1.pcap differ diff --git a/src/wifi/model/channel-access-manager.cc b/src/wifi/model/channel-access-manager.cc index 2aab6b7d5..131c180e6 100644 --- a/src/wifi/model/channel-access-manager.cc +++ b/src/wifi/model/channel-access-manager.cc @@ -17,6 +17,7 @@ #include "ns3/log.h" #include "ns3/simulator.h" +#include #include #undef NS_LOG_APPEND_CONTEXT @@ -591,13 +592,13 @@ ChannelAccessManager::RequestAccess(Ptr txop) */ Time accessGrantStart = GetAccessGrantStart() + (txop->GetAifsn(m_linkId) * GetSlot()); - if (txop->IsQosTxop() && txop->GetBackoffStart(m_linkId) > accessGrantStart) + if (const auto diff = txop->GetBackoffStart(m_linkId) - accessGrantStart; + txop->IsQosTxop() && diff.IsStrictlyPositive()) { - // The backoff start time reported by the EDCAF is more recent than the last - // time the medium was busy plus an AIFS, hence we need to align it to the - // next slot boundary. - Time diff = txop->GetBackoffStart(m_linkId) - accessGrantStart; - uint32_t nIntSlots = (diff / GetSlot()).GetHigh() + 1; + // The backoff start time reported by the EDCAF is more recent than the last time the medium + // was busy plus an AIFS, hence we need to align it to the next slot boundary. + const auto div = diff / GetSlot(); + const uint32_t nIntSlots = div.GetHigh() + (div.GetLow() > 0 ? 1 : 0); txop->UpdateBackoffSlotsNow(0, accessGrantStart + (nIntSlots * GetSlot()), m_linkId); } diff --git a/src/wifi/test/channel-access-manager-test.cc b/src/wifi/test/channel-access-manager-test.cc index e71016d85..ff156b7a6 100644 --- a/src/wifi/test/channel-access-manager-test.cc +++ b/src/wifi/test/channel-access-manager-test.cc @@ -1746,15 +1746,15 @@ LargestIdlePrimaryChannelTest::DoRun() * that the frame is not transmitted. A backoff value is kept being generated as long as the * frame is kept in the queue. * - * Backoff Last - * Backoff Backoff Backoff value #3, backoff - * value #0 value #1 value #2 unblock queue value - * | ┌─────┐ | | | ┌─────┐ ┌────┐ | - * | ┌───┐ │Assoc│ | |Decrement| |Decrement| |Decrement│ADDBA│ │QoS │ | - * | │ACK│ │Resp │ |AIFS| backoff |slot| backoff |slot| backoff │ Req │. .│data│ | - * ──┬─────┬┴───┴──┴─────┴┬───┬────────────────────────────────────────────┴─────┴───┴────┴┬───┬── - * │Assoc│ │ACK│ │ACK│ - * │ Req │ └───┘ └───┘ + * Backoff Last + * Backoff Backoff Backoff value #3, backoff + * value #0 value #1 value #2 unblock queue value + * | ┌─────┐ | | | ┌─────┐ ┌────┐ | + * | ┌───┐ │Assoc│ | | Decrement | Decrement | Decrement │ADDBA│ │QoS │ | + * | │ACK│ │Resp │ |AIFS| backoff | backoff | backoff │ Req │. .│data│ | + * ──┬─────┬┴───┴──┴─────┴┬───┬────────────────────────────────────────┴─────┴───┴────┴┬───┬── + * │Assoc│ │ACK│ │ACK│ + * │ Req │ └───┘ └───┘ * └─────┘ * * The ProactiveBackoff test checks the generation of backoff values when the attribute is set @@ -2164,10 +2164,6 @@ BackoffGenerationTest::BackoffGenerated(AcIndex ac, uint32_t backoff, uint8_t li offset, "Backoff value generated too early"); m_nextBackoffGen.Cancel(); - - // we get here when the backoff expired but no transmission occurred, thus we have - // generated a new backoff value and we will start decrementing the counter in a slot - delay = m_apMac->GetWifiPhy(linkId)->GetSlot(); } if (m_nGenBackoff < nValues) diff --git a/src/wifi/test/wifi-dynamic-bw-op-test.cc b/src/wifi/test/wifi-dynamic-bw-op-test.cc index 3e243e0dd..1c47e2776 100644 --- a/src/wifi/test/wifi-dynamic-bw-op-test.cc +++ b/src/wifi/test/wifi-dynamic-bw-op-test.cc @@ -155,8 +155,8 @@ WifiUseAvailBwTest::Transmit(uint8_t bss, client->SetAttribute("Interval", TimeValue(MicroSeconds(0))); client->SetRemote(m_sockets[0]); m_apDevices.Get(0)->GetNode()->AddApplication(client); - client->SetStartTime(Seconds(0)); // start now - client->SetStopTime(Seconds(1)); // stop in a second + client->SetStartTime(TimeStep(1)); // start shortly after the start of PPDU in BSS 1 + client->SetStopTime(Seconds(1)); // stop in a second client->Initialize(); // after 1us (to allow for propagation delay), the largest idle primary @@ -470,20 +470,18 @@ WifiDynamicBwOpTestSuite::WifiDynamicBwOpTestSuite() AddTestCase( new WifiUseAvailBwTest({"{50, 160, BAND_5GHZ, 5}", "{42, 80, BAND_5GHZ, 2}"}, MHz_u{80}), TestCase::Duration::QUICK); - // clang-format off /** - * ───────────────────────────── primary 160 ───────────────────────────── - * primary20 - * ┌────────┬────────┬────────┬────────┬───────┬────────┬────────┬────────┌────────┬────────┬────────┬────────┬───────┬────────┬────────┬────────┐ - * BSS 0 │ 1 │ 5 │ 9 │ 13 │ 17 │ 21 │ 25 │ 29 │ 33 │ 37 │ 41 │ 45 │ 49 │ 53 │ 57 │ 61 │ - * └────────┴────────┴────────┴────────┴───────┴────────┴────────┴────────└────────┴────────┴────────┴────────┴───────┴────────┴────────┴────────┘ + * ────────────── primary 160 ────────────── + * primary20 + * ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * BSS 0 │ 1 │ 5 │ 9 │ 13 │ 17 │ 21 │ 25 │ 29 │ 33 │ 37 │ 41 │ 45 │ 49 │ 53 │ 57 │ 61 │ + * └────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘ * - * ┌────────┬────────┬────────┬────────┬───────┬────────┬────────┬────────┐ - * BSS 1 │ 1 │ 5 │ 9 │ 13 │ 17 │ 21 │ 25 │ 29 │ - * └────────┴────────┴────────┴────────┴───────┴────────┴────────┴────────┘ - * primary20 + * ┌────┬────┬────┬────┬────┬────┬────┬────┐ + * BSS 1 │ 1 │ 5 │ 9 │ 13 │ 17 │ 21 │ 25 │ 29 │ + * └────┴────┴────┴────┴────┴────┴────┴────┘ + * primary20 */ - // clang-format on AddTestCase( new WifiUseAvailBwTest({"{31, 320, BAND_6GHZ, 10}", "{15, 160, BAND_6GHZ, 7}"}, 160), TestCase::Duration::QUICK);