@@ -798,15 +798,16 @@ class HeAggregationTest : public AmpduAggregationTest
798798};
799799
800800HeAggregationTest::HeAggregationTest (uint16_t bufferSize)
801- : AmpduAggregationTest(" Check the correctness of 802.11ax aggregation operations, size=" +
802- std::to_string (bufferSize),
803- Params{.standard = WIFI_STANDARD_80211ax,
804- .nLinks = 1 ,
805- .dataMode = " HeMcs11" ,
806- .bufferSize = bufferSize,
807- .maxAmsduSize = 0 ,
808- .maxAmpduSize = 6500631 ,
809- .txopLimit = Seconds (0 )})
801+ : AmpduAggregationTest(
802+ " Check the correctness of 802.11ax aggregation operations, buffer size=" +
803+ std::to_string (bufferSize),
804+ Params{.standard = WIFI_STANDARD_80211ax,
805+ .nLinks = 1 ,
806+ .dataMode = " HeMcs11" ,
807+ .bufferSize = bufferSize,
808+ .maxAmsduSize = 0 ,
809+ .maxAmpduSize = 6500631 ,
810+ .txopLimit = Seconds (0 )})
810811{
811812}
812813
@@ -860,37 +861,42 @@ class EhtAggregationTest : public AmpduAggregationTest
860861 * Constructor.
861862 *
862863 * @param bufferSize the size (in number of MPDUs) of the BlockAck buffer
864+ * @param maxAmpduSize the maximum size (in bytes) allowed per A-MPDU
863865 */
864- EhtAggregationTest (uint16_t bufferSize);
866+ EhtAggregationTest (uint16_t bufferSize, uint32_t maxAmpduSize );
865867
866868 private:
867869 void DoRun () override ;
868870};
869871
870- EhtAggregationTest::EhtAggregationTest (uint16_t bufferSize)
871- : AmpduAggregationTest(" Check the correctness of 802.11be aggregation operations, size=" +
872- std::to_string (bufferSize),
873- Params{.standard = WIFI_STANDARD_80211be,
874- .nLinks = 2 ,
875- .dataMode = " EhtMcs13" ,
876- .bufferSize = bufferSize,
877- .maxAmsduSize = 0 ,
878- .maxAmpduSize = 102000 ,
879- .txopLimit = Seconds (0 )})
872+ EhtAggregationTest::EhtAggregationTest (uint16_t bufferSize, uint32_t maxAmpduSize)
873+ : AmpduAggregationTest(
874+ " Check the correctness of 802.11be aggregation operations, buffer size=" +
875+ std::to_string (bufferSize) + ", max A-MPDU size=" + std::to_string(maxAmpduSize),
876+ Params{.standard = WIFI_STANDARD_80211be,
877+ .nLinks = 2 ,
878+ .dataMode = " EhtMcs13" ,
879+ .bufferSize = bufferSize,
880+ .maxAmsduSize = 0 ,
881+ .maxAmpduSize = maxAmpduSize,
882+ .txopLimit = Seconds (0 )})
880883{
881884}
882885
883886void
884887EhtAggregationTest::DoRun ()
885888{
886889 /*
887- * Test behavior when 1200 packets of 100 bytes each are ready for transmission. The max
888- * A-MPDU size limit (102000 B) is computed to have at most 750 MPDUs aggregated in a single
889- * A-MPDU (each MPDU is 130 B, plus 4 B of A-MPDU subframe header, plus 2 B of padding).
890+ * Test behavior when 1200 packets of 100 bytes each are ready for transmission. In the first
891+ * tests, the max A-MPDU size limit (102000 B) is computed to have at most 750 MPDUs aggregated
892+ * in a single A-MPDU (each MPDU is 130 B, plus 4 B of A-MPDU subframe header, plus 2 B of
893+ * padding). In the last test, the max A-MPDU size limit is the upper bound allowed by the
894+ * standard (6500631 B), which allows to aggregate 1024 MPDUs (the buffer size) in a single
895+ * A-MPDU.
890896 */
891897 const std::size_t numPackets = 1200 ;
892898 EnqueuePkts (numPackets, 100 , Mac48Address (" 00:00:00:00:00:02" ));
893- const std::size_t maxNMpdus = 750 ;
899+ const auto maxNMpdus = std::min<std:: size_t >(m_params. maxAmpduSize / 136 , m_params. bufferSize ) ;
894900
895901 for (uint8_t linkId = 0 ; linkId < m_params.nLinks ; linkId++)
896902 {
@@ -917,7 +923,7 @@ EhtAggregationTest::DoRun()
917923
918924 uint16_t expectedRemainingPacketsInQueue;
919925
920- if (m_params.bufferSize >= maxNMpdus)
926+ if (m_params.bufferSize > maxNMpdus)
921927 {
922928 // two A-MPDUs are transmitted concurrently on the two links and together saturate
923929 // the transmit window
@@ -1300,8 +1306,9 @@ WifiAggregationTestSuite::WifiAggregationTestSuite()
13001306 AddTestCase (new TwoLevelAggregationTest, TestCase::Duration::QUICK);
13011307 AddTestCase (new HeAggregationTest (64 ), TestCase::Duration::QUICK);
13021308 AddTestCase (new HeAggregationTest (256 ), TestCase::Duration::QUICK);
1303- AddTestCase (new EhtAggregationTest (512 ), TestCase::Duration::QUICK);
1304- AddTestCase (new EhtAggregationTest (1024 ), TestCase::Duration::QUICK);
1309+ AddTestCase (new EhtAggregationTest (512 , 102000 ), TestCase::Duration::QUICK);
1310+ AddTestCase (new EhtAggregationTest (1024 , 102000 ), TestCase::Duration::QUICK);
1311+ AddTestCase (new EhtAggregationTest (1024 , 15523200 ), TestCase::Duration::QUICK);
13051312 AddTestCase (new PreservePacketsInAmpdus (true ), TestCase::Duration::QUICK);
13061313 AddTestCase (new PreservePacketsInAmpdus (false ), TestCase::Duration::QUICK);
13071314}
0 commit comments