d80211: fix classify_1d() priority selection
Subsystems (2)
PATCH 3/6 d80211: fix classify_1d() priority selection
I don't see any reason why packets with DSCP=0x40 should have lower IEEE 802.1D priority than packets with DSCP=0x20. Spare > Background. No?
---
net/d80211/wme.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
e1765ea0d80ad86619300d3253e801883fd745a5
net/d80211/wme.c +2 -2
@@ -131,9 +131,9 @@ static inline unsigned classify_1d(struc dscp = ip->tos &0xfc ;switch (dscp) {case 0x20 : -return 2 ; -case 0x40 :return 1 ; +case 0x40 : +return 2 ;case 0x60 :return 3 ;case 0x80 :
Signature · 1 line
1.2.6
Quoted 2 lines · Zhu Yi
I don't see any reason why packets with DSCP=0x40 should have lower IEEE 802.1D priority than packets with DSCP=0x20. Spare > Background. No?
Hm, seems so. Jouni, is there any reason for this?
Quoted 15 lines
Signed-off-by Zhu Yi <[email protected]>---
net/d80211/wme.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
e1765ea0d80ad86619300d3253e801883fd745a5net/d80211/wme.c +0
-0@@ -131,9 +131,9 @@ static inline unsigned classify_1d(struc dscp = ip->tos &0xfc ;
net/d80211/wme.c static inline unsigned classify_1d(struc · line 139
Quoted 10 lines
net/d80211/wme.c +2
-2switch (dscp) {case 0x20 : -return 2 ; -case 0x40 :return 1 ; +case 0x40 : +return 2 ;case 0x60 :return 3 ;case 0x80 :
Thanks,
Jiri
Signature · 2 lines
Jiri Benc SUSE Labs
Jiri Benc
AppliedQuoted 2 lines · Zhu Yi
I don't see any reason why packets with DSCP=0x40 should have lower IEEE 802.1D priority than packets with DSCP=0x20. Spare > Background. No?
Applied to my tree, thanks.
I also applied the following patch on top of it:
--
Subject: [PATCH] d80211: simplify classify_1d
The switch in classify_1d can be simplified to a bit operation.
--- net/d80211/wme.c | 19 ++----------------- 1 files changed, 2 insertions(+), 17 deletions(-)
net/d80211/wme.c +2 -17
@@ -129,24 +129,9 @@ static inline unsigned classify_1d(struc ip = (struct iphdr *) (skb->data + offset); dscp = ip->tos &0xfc ; -switch (dscp) { -case 0x20 : -return 1 ; -case 0x40 : -return 2 ; -case 0x60 : -return 3 ; -case 0x80 : -return 4 ; -case 0xa0 : -return 5 ; -case 0xc0 : -return 6 ; -case 0xe0 : -return 7 ; -default : +if (dscp &0x1c )return 0 ; - } +return dscp >>5 ; }
Signature · 2 lines
Jiri Benc SUSE Labs