1809 std::vector<std::pair<bool, std::string>>{{
false,
"A-MPDU disabled"},
1810 {
true,
"A-MPDU enabled"}})
1813 std::vector<std::tuple<uint32_t, GroupcastProtectionMode, std::string>>{
1814 {maxRtsCtsThreshold, GroupcastProtectionMode::RTS_CTS,
"no protection"},
1815 {500, GroupcastProtectionMode::RTS_CTS,
"RTS-CTS"},
1816 {1500, GroupcastProtectionMode::CTS_TO_SELF,
"CTS-TO-SELF"}})
1834 const auto maxChannelWidth =
1835 std::max_element(
stasInfo.cbegin(),
1837 [](
const auto&
lhs,
const auto& rhs) {
1838 return lhs.maxChannelWidth < rhs.maxChannelWidth;
1844 [maxChannelWidth](
const auto&
staInfo) {
1845 return (staInfo.maxChannelWidth != maxChannelWidth);
1847 const std::string scenario =
"STAs=" + printStasInfo(
stasInfo) +
1851 new GcrUrTest(
"GCR-UR without any lost frames: " + scenario,
1853 .numGroupcastPackets =
useAmpdu ? uint16_t(4) : uint16_t(2),
1854 .maxNumMpdusInPsdu =
useAmpdu ? uint16_t(2) : uint16_t(1),
1855 .rtsThreshold = rtsThreshold,
1858 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1860 new GcrUrTest(
"GCR-UR with first frame lost: " + scenario,
1862 .numGroupcastPackets =
useAmpdu ? uint16_t(4) : uint16_t(2),
1863 .maxNumMpdusInPsdu =
useAmpdu ? uint16_t(2) : uint16_t(1),
1864 .rtsThreshold = rtsThreshold,
1867 .mpdusToCorruptPerPsdu = {{1, {{0, {1, 2}}}}}},
1869 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1871 new GcrUrTest(
"GCR-UR with all but last frame lost: " + scenario,
1873 .numGroupcastPackets =
useAmpdu ? uint16_t(4) : uint16_t(2),
1874 .maxNumMpdusInPsdu =
useAmpdu ? uint16_t(2) : uint16_t(1),
1875 .rtsThreshold = rtsThreshold,
1878 .mpdusToCorruptPerPsdu = {{1, {{0, {1, 2}}}},
1884 {7, {{0, {1, 2}}}}}},
1886 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1888 new GcrUrTest(
"GCR-UR with all frames lost: " + scenario,
1890 .numGroupcastPackets =
useAmpdu ? uint16_t(4) : uint16_t(2),
1891 .maxNumMpdusInPsdu =
useAmpdu ? uint16_t(2) : uint16_t(1),
1892 .rtsThreshold = rtsThreshold,
1895 .mpdusToCorruptPerPsdu = {{1, {{0, {1, 2}}}},
1902 {8, {{0, {1, 2}}}}}},
1904 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1908 new GcrUrTest(
"GCR-UR with 1 MPDU always corrupted in first A-MPDU but one "
1909 "different MPDU alternatively, starting with second MPDU: " +
1912 .numGroupcastPackets = 4,
1913 .maxNumMpdusInPsdu = 2,
1914 .rtsThreshold = rtsThreshold,
1916 .mpdusToCorruptPerPsdu = {{1, {{0, {2}}}},
1925 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1927 new GcrUrTest(
"GCR-UR with 1 MPDU always corrupted in first A-MPDU but one "
1928 "different MPDU alternatively, starting with first MPDU: " +
1931 .numGroupcastPackets = 4,
1932 .maxNumMpdusInPsdu = 2,
1933 .rtsThreshold = rtsThreshold,
1935 .mpdusToCorruptPerPsdu = {{1, {{0, {1}}}},
1944 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1946 new GcrUrTest(
"GCR-UR with all MPDUs always corrupted in first A-MPDU "
1947 "except the first MPDU in the last retransmission: " +
1950 .numGroupcastPackets = 4,
1951 .maxNumMpdusInPsdu = 2,
1952 .rtsThreshold = rtsThreshold,
1954 .mpdusToCorruptPerPsdu = {{1, {{0, {1, 2}}}},
1963 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1965 new GcrUrTest(
"GCR-UR with all MPDUs always corrupted in first A-MPDU "
1966 "except the second MPDU in the last retransmission: " +
1969 .numGroupcastPackets = 4,
1970 .maxNumMpdusInPsdu = 2,
1971 .rtsThreshold = rtsThreshold,
1973 .mpdusToCorruptPerPsdu = {{1, {{0, {1, 2}}}},
1982 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
1984 new GcrUrTest(
"GCR-UR with all MPDUs always corrupted in first A-MPDU: " +
1987 .numGroupcastPackets = 4,
1988 .maxNumMpdusInPsdu = 2,
1989 .rtsThreshold = rtsThreshold,
1991 .mpdusToCorruptPerPsdu = {{1, {{0, {1, 2}}}},
1998 {8, {{0, {1, 2}}}}}},
2000 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
2002 "GCR-UR with 1 MPDU always corrupted in second A-MPDU but one "
2003 "different MPDU alternatively, starting with second MPDU: " +
2006 .numGroupcastPackets = 4,
2007 .maxNumMpdusInPsdu = 2,
2008 .rtsThreshold = rtsThreshold,
2010 .mpdusToCorruptPerPsdu = {{9, {{0, {2}}}},
2020 : TestCase::Duration::QUICK);
2022 "GCR-UR with 1 MPDU always corrupted in second A-MPDU but one "
2023 "different MPDU alternatively, starting with first MPDU: " +
2026 .numGroupcastPackets = 4,
2027 .maxNumMpdusInPsdu = 2,
2028 .rtsThreshold = rtsThreshold,
2030 .mpdusToCorruptPerPsdu = {{9, {{0, {1}}}},
2040 : TestCase::Duration::QUICK);
2042 new GcrUrTest(
"GCR-UR with all MPDUs always corrupted in second A-MPDU "
2043 "except the first MPDU in the last retransmission: " +
2046 .numGroupcastPackets = 4,
2047 .maxNumMpdusInPsdu = 2,
2048 .rtsThreshold = rtsThreshold,
2050 .mpdusToCorruptPerPsdu = {{9, {{0, {1, 2}}}},
2051 {10, {{0, {1, 2}}}},
2052 {11, {{0, {1, 2}}}},
2053 {12, {{0, {1, 2}}}},
2054 {13, {{0, {1, 2}}}},
2055 {14, {{0, {1, 2}}}},
2056 {15, {{0, {1, 2}}}},
2059 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
2061 new GcrUrTest(
"GCR-UR with all MPDUs always corrupted in second A-MPDU "
2062 "except the second MPDU in the last retransmission: " +
2065 .numGroupcastPackets = 4,
2066 .maxNumMpdusInPsdu = 2,
2067 .rtsThreshold = rtsThreshold,
2069 .mpdusToCorruptPerPsdu = {{9, {{0, {1, 2}}}},
2070 {10, {{0, {1, 2}}}},
2071 {11, {{0, {1, 2}}}},
2072 {12, {{0, {1, 2}}}},
2073 {13, {{0, {1, 2}}}},
2074 {14, {{0, {1, 2}}}},
2075 {15, {{0, {1, 2}}}},
2078 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
2080 new GcrUrTest(
"GCR-UR with all MPDUs always corrupted in second A-MPDU: " +
2083 .numGroupcastPackets = 4,
2084 .maxNumMpdusInPsdu = 2,
2085 .rtsThreshold = rtsThreshold,
2087 .mpdusToCorruptPerPsdu = {{9, {{0, {1, 2}}}},
2088 {10, {{0, {1, 2}}}},
2089 {11, {{0, {1, 2}}}},
2090 {12, {{0, {1, 2}}}},
2091 {13, {{0, {1, 2}}}},
2092 {14, {{0, {1, 2}}}},
2093 {15, {{0, {1, 2}}}},
2094 {16, {{0, {1, 2}}}}}},
2096 useSpectrum ? TestCase::Duration::EXTENSIVE : TestCase::Duration::QUICK);
2103 .numGroupcastPackets = 1,
2104 .maxNumMpdusInPsdu = 1,
2106 .rtsThreshold = maxRtsCtsThreshold},
2107 {.expectedSkippedRetries = 4}),
2108 TestCase::Duration::QUICK);
2109 AddTestCase(
new GcrUrTest(
"GCR-UR with A-MPDU paused during test and number of packets larger "
2110 "than MPDU buffer size",
2112 .numGroupcastPackets = 300,
2113 .maxNumMpdusInPsdu = 2,
2114 .startGroupcast =
Seconds(1.0),
2116 .rtsThreshold = maxRtsCtsThreshold,
2118 {.packetsPauzeAggregation = 4, .packetsResumeAggregation = 100}),
2119 TestCase::Duration::QUICK);
2125 .numGroupcastPackets = 300,
2127 .maxNumMpdusInPsdu = 1024,
2128 .rtsThreshold = maxRtsCtsThreshold},
2130 TestCase::Duration::QUICK);
2136 .numGroupcastPackets = 300,
2138 .maxNumMpdusInPsdu = 1024,
2139 .rtsThreshold = maxRtsCtsThreshold},
2141 TestCase::Duration::QUICK);
2147 .numGroupcastPackets = 1200,
2149 .maxNumMpdusInPsdu = 1024,
2150 .rtsThreshold = maxRtsCtsThreshold},
2152 TestCase::Duration::QUICK);
2154 "sequence numbers are properly released",
2156 .numGroupcastPackets = 6,
2158 .maxNumMpdusInPsdu = 2,
2161 .rtsThreshold = 500,
2162 .rtsFramesToCorrupt = {3, 4, 5},
2163 .expectedDroppedGroupcastMpdus = {3, 4}},
2164 {.expectedSkippedRetries = 6}),
2165 TestCase::Duration::QUICK);
2167 "sequence numbers are properly released",
2169 .numGroupcastPackets = 6,
2171 .maxNumMpdusInPsdu = 2,
2174 .rtsThreshold = 500,
2175 .ctsFramesToCorrupt = {3, 4, 5},
2176 .expectedDroppedGroupcastMpdus = {3, 4}},
2177 {.expectedSkippedRetries = 6}),
2178 TestCase::Duration::QUICK);
2179 AddTestCase(
new GcrUrTest(
"GCR-UR with reduced lifetime, A-MPDU paused during test and number "
2180 "of packets larger than MPDU buffer size",
2182 .numGroupcastPackets = 300,
2184 .maxNumMpdusInPsdu = 2,
2186 .rtsThreshold = maxRtsCtsThreshold,
2188 {.expectedSkippedRetries = 4,
2189 .packetsPauzeAggregation = 4,
2190 .packetsResumeAggregation = 100}),
2191 TestCase::Duration::QUICK);
2195 std::vector<std::tuple<uint16_t, Time, uint16_t, Time>>{
2201 std::vector<std::pair<std::set<uint8_t>, std::set<uint8_t>>>{{{}, {}},
2207 std::vector<std::tuple<uint32_t, GroupcastProtectionMode, std::string>>{
2208 {maxRtsCtsThreshold, GroupcastProtectionMode::RTS_CTS,
"no protection"},
2209 {500, GroupcastProtectionMode::RTS_CTS,
"RTS-CTS"},
2210 {1500, GroupcastProtectionMode::CTS_TO_SELF,
"CTS-TO-SELF"}})
2236 const auto maxChannelWidth =
2237 std::max_element(
stasInfo.cbegin(),
2239 [](
const auto&
lhs,
const auto& rhs) {
2240 return lhs.maxChannelWidth < rhs.maxChannelWidth;
2246 [maxChannelWidth](
const auto&
staInfo) {
2247 return (staInfo.maxChannelWidth != maxChannelWidth);
2249 std::string scenario =
2255 scenario +=
", mixedGroupcastUnicast";
2258 scenario +=
" (groupcast before unicast)";
2262 scenario +=
" (unicast before groupcast)";
2269 .maxNumMpdusInPsdu = 2,
2272 .rtsThreshold = rtsThreshold,
2276 : TestCase::Duration::QUICK);
2277 if (GetNumNonGcrStas(
stasInfo) == 0)
2283 .maxNumMpdusInPsdu = 2,
2286 .rtsThreshold = rtsThreshold,
2288 .mpdusToCorruptPerPsdu = {{1, {{0, {2}}}}}},
2291 : TestCase::Duration::QUICK);
2296 .maxNumMpdusInPsdu = 2,
2299 .rtsThreshold = rtsThreshold,
2301 .mpdusToCorruptPerPsdu = {{1, {{0, {1}}}}}},
2304 : TestCase::Duration::QUICK);
2309 .maxNumMpdusInPsdu = 2,
2312 .rtsThreshold = rtsThreshold,
2314 .mpdusToCorruptPerPsdu = {{1, {{0, {1, 2}}}}}},
2317 : TestCase::Duration::QUICK);
2321 new GcrBaTest(
"GCR-BA with second MPDU corrupted for first STA: " +
2326 .maxNumMpdusInPsdu = 2,
2329 .rtsThreshold = rtsThreshold,
2331 .mpdusToCorruptPerPsdu = {{1, {{1, {2}}}}}},
2334 : TestCase::Duration::QUICK);
2336 new GcrBaTest(
"GCR-BA with first MPDU corrupted for first STA: " +
2341 .maxNumMpdusInPsdu = 2,
2344 .rtsThreshold = rtsThreshold,
2346 .mpdusToCorruptPerPsdu = {{1, {{1, {1}}}}}},
2349 : TestCase::Duration::QUICK);
2352 "GCR-BA with first different MPDUs corrupted for each STA: " +
2357 .maxNumMpdusInPsdu = 2,
2360 .rtsThreshold = rtsThreshold,
2362 .mpdusToCorruptPerPsdu = {{1, {{1, {1}}, {2, {2}}}}}},
2365 : TestCase::Duration::QUICK);
2367 "GCR-BA with first different MPDUs corrupted for each "
2368 "STA with different order: " +
2373 .maxNumMpdusInPsdu = 2,
2376 .rtsThreshold = rtsThreshold,
2378 .mpdusToCorruptPerPsdu = {{1, {{1, {2}}, {2, {1}}}}}},
2381 : TestCase::Duration::QUICK);
2387 std::string scenario =
"GCR-BA with dropped MPDU because of lifetime expiry";
2390 scenario +=
", mixedGroupcastUnicast";
2393 scenario +=
" (groupcast before unicast)";
2397 scenario +=
" (unicast before groupcast)";
2403 .numGroupcastPackets =
2407 .maxNumMpdusInPsdu = 2,
2411 .rtsThreshold = maxRtsCtsThreshold,
2412 .mpdusToCorruptPerPsdu =
2413 {{1, {{0, {2}}}}, {2, {{0, {2}}}}, {3, {{0, {2}}}}, {4, {{0, {2}}}}},
2414 .expectedDroppedGroupcastMpdus = {2}},
2416 TestCase::Duration::QUICK);
2422 scenario +=
"Groupcast followed by unicast";
2426 scenario +=
"Unicast followed by groupcast";
2431 scenario +=
"GCR-BA";
2433 scenario +=
" with ";
2438 .maxNumMpdusInPsdu = 2,
2441 .rtsThreshold = maxRtsCtsThreshold,
2442 .addbaReqsToCorrupt = {1}},
2444 TestCase::Duration::QUICK);
2449 .maxNumMpdusInPsdu = 2,
2452 .rtsThreshold = maxRtsCtsThreshold,
2453 .addbaRespsToCorrupt = {1}},
2455 TestCase::Duration::QUICK);
2460 .maxNumMpdusInPsdu = 2,
2463 .rtsThreshold = maxRtsCtsThreshold,
2464 .addbaReqsToCorrupt = {1, 2, 3, 4, 5, 6, 7, 8}},
2466 TestCase::Duration::QUICK);
2471 .maxNumMpdusInPsdu = 2,
2474 .rtsThreshold = maxRtsCtsThreshold,
2475 .baInactivityTimeout = 10},
2477 TestCase::Duration::QUICK);
2480 "GCR-BA with BARs sent over 2 TXOPs because of TXOP limit",
2484 .numGroupcastPackets = 2,
2485 .maxNumMpdusInPsdu = 2,
2487 .rtsThreshold = maxRtsCtsThreshold,
2489 {.expectedNTxBarsPerTxop = {1, 2}}),
2490 TestCase::Duration::QUICK);
2495 .numGroupcastPackets = 2,
2496 .maxNumMpdusInPsdu = 2,
2498 .rtsThreshold = maxRtsCtsThreshold,
2500 {.expectedNTxBarsPerTxop = {1, 2, 1, 2}}),
2501 TestCase::Duration::QUICK);
2504 .numGroupcastPackets = 300,
2505 .maxNumMpdusInPsdu = 2,
2506 .rtsThreshold = maxRtsCtsThreshold},
2508 TestCase::Duration::QUICK);
2514 .numGroupcastPackets = 300,
2516 .maxNumMpdusInPsdu = 1024,
2517 .rtsThreshold = maxRtsCtsThreshold},
2519 TestCase::Duration::QUICK);
2525 .numGroupcastPackets = 300,
2527 .maxNumMpdusInPsdu = 1024,
2528 .rtsThreshold = maxRtsCtsThreshold},
2531 TestCase::Duration::QUICK);
2537 .numGroupcastPackets = 1200,
2539 .maxNumMpdusInPsdu = 1024,
2540 .rtsThreshold = maxRtsCtsThreshold},
2542 TestCase::Duration::QUICK);
2544 "sequence numbers are properly released",
2546 .numGroupcastPackets = 6,
2548 .maxNumMpdusInPsdu = 2,
2551 .rtsThreshold = 500,
2552 .rtsFramesToCorrupt = {2, 3, 4},
2553 .expectedDroppedGroupcastMpdus = {3, 4}},
2555 TestCase::Duration::QUICK);
2557 "sequence numbers are properly released",
2559 .numGroupcastPackets = 6,
2561 .maxNumMpdusInPsdu = 2,
2564 .rtsThreshold = 500,
2565 .ctsFramesToCorrupt = {2, 3, 4},
2566 .expectedDroppedGroupcastMpdus = {3, 4}},
2568 TestCase::Duration::QUICK);