diff mbox series

tests: Modify the QoS mapping tests

Message ID 20231213113735.289408-1-andrei.otcheretianski@intel.com
State New
Headers show
Series tests: Modify the QoS mapping tests | expand

Commit Message

Andrei Otcheretianski Dec. 13, 2023, 11:37 a.m. UTC
From: Ilan Peer <ilan.peer@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@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(-)

Comments

Jouni Malinen Dec. 23, 2023, 10:40 a.m. UTC | #1
On Wed, Dec 13, 2023 at 01:37:35PM +0200, Andrei Otcheretianski wrote:
> The cfg80211 default QoS mapping was updated to align
> with the recommendations in section 4 in RFC8325. Align the QoS
> mapping test accordingly.

Thanks, applied. Though, I changed this to accept both the current
mac80211 mapping and the one proposed in the patch that has not yet been
applied.
Johannes Berg Dec. 23, 2023, 5:30 p.m. UTC | #2
On Sat, 2023-12-23 at 12:40 +0200, Jouni Malinen wrote:
> On Wed, Dec 13, 2023 at 01:37:35PM +0200, Andrei Otcheretianski wrote:
> > The cfg80211 default QoS mapping was updated to align
> > with the recommendations in section 4 in RFC8325. Align the QoS
> > mapping test accordingly.
> 
> Thanks, applied. Though, I changed this to accept both the current
> mac80211 mapping and the one proposed in the patch that has not yet been
> applied.
>  
Should I take that to mean that you think making the kernel change is
reasonable / makes sense?

johannes
Jouni Malinen Jan. 4, 2024, 9:11 a.m. UTC | #3
On Sat, Dec 23, 2023 at 06:30:52PM +0100, Johannes Berg wrote:
> On Sat, 2023-12-23 at 12:40 +0200, Jouni Malinen wrote:
> > On Wed, Dec 13, 2023 at 01:37:35PM +0200, Andrei Otcheretianski wrote:
> > > The cfg80211 default QoS mapping was updated to align
> > > with the recommendations in section 4 in RFC8325. Align the QoS
> > > mapping test accordingly.
> > 
> > Thanks, applied. Though, I changed this to accept both the current
> > mac80211 mapping and the one proposed in the patch that has not yet been
> > applied.
> >  
> Should I take that to mean that you think making the kernel change is
> reasonable / makes sense?

Yes
diff mbox series

Patch

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