lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 15 Dec 2006 14:53:26 +0100
From:	Jiri Benc <jbenc@...e.cz>
To:	yi.zhu@...el.com
Cc:	netdev@...r.kernel.org,
	"John W. Linville" <linville@...driver.com>,
	Simon Barber <simon@...icescape.com>
Subject: Re: [PATCH 3/6] d80211: fix classify_1d() priority selection

On Thu, 14 Dec 2006 12:02:27 +0800, Zhu Yi wrote:
> 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.

Signed-off-by: Jiri Benc <jbenc@...e.cz>

---
 net/d80211/wme.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

--- dscape.orig/net/d80211/wme.c
+++ dscape/net/d80211/wme.c
@@ -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;
 }
 

-- 
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ