[PATCH] tests: Modify the QoS mapping tests
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Dec 13 03:37:35 PST 2023
From: Ilan Peer <ilan.peer at intel.com>
The cfg80211 default QoS mapping was updated to align
with the recommendations in section 4 in RFC8325. Align the QoS
mapping test accordingly.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
This patch depends on the corresponding pending kernel change:
https://patchwork.kernel.org/project/linux-wireless/patch/20231211085121.8a1c7d1f0034.I50aed38be78ae9aea052938e2cb6b5800010ecd4@changeid/
---
tests/hwsim/test_ap_qosmap.py | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/tests/hwsim/test_ap_qosmap.py b/tests/hwsim/test_ap_qosmap.py
index fb26474871..8ed3fe4734 100644
--- a/tests/hwsim/test_ap_qosmap.py
+++ b/tests/hwsim/test_ap_qosmap.py
@@ -89,8 +89,20 @@ def test_ap_qosmap_default(dev, apdev):
dev[0].request("DATA_TEST_CONFIG 1")
hapd.request("DATA_TEST_CONFIG 1")
Wlantest.setup(hapd)
+
+ # build initial default mapping
+ dscp_to_tid = {}
for dscp in [0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63]:
- check_qos_map(apdev[0], hapd, dev[0], addr, dscp, dscp >> 3)
+ dscp_to_tid[dscp] = dscp >> 3
+
+ # update the mapping based on the recommendations in section 4 in RFC8325
+ dscp_to_tid[16] = 0
+ dscp_to_tid[24] = 4
+ dscp_to_tid[48] = 7
+
+ for dscp, tid in dscp_to_tid.items():
+ check_qos_map(apdev[0], hapd, dev[0], addr, dscp, tid)
+
dev[0].request("DATA_TEST_CONFIG 0")
hapd.request("DATA_TEST_CONFIG 0")
@@ -127,9 +139,19 @@ def test_ap_qosmap_default_acm(dev, apdev):
dev[0].request("DATA_TEST_CONFIG 1")
hapd.request("DATA_TEST_CONFIG 1")
Wlantest.setup(hapd)
+ # build initial default mapping
+ dscp_to_tid = {}
for dscp in [0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63]:
- ap_tid = dscp >> 3
- tid = ap_tid
+ dscp_to_tid[dscp] = dscp >> 3
+
+ # update the mapping based on the recommendations in section 4 in RFC8325
+ dscp_to_tid[16] = 0
+ dscp_to_tid[24] = 4
+ dscp_to_tid[48] = 7
+
+ for dscp, tid in dscp_to_tid.items():
+ ap_tid = tid
+
# downgrade VI/VO to BE
if tid in [4, 5, 6, 7]:
tid = 3
--
2.38.1
More information about the Hostap
mailing list