From: Jiri Benc <jbenc@suse.cz>
To: yi.zhu@intel.com
Cc: netdev@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
Simon Barber <simon@devicescape.com>
Subject: Re: [PATCH 3/6] d80211: fix classify_1d() priority selection
Date: Fri, 15 Dec 2006 14:53:26 +0100 [thread overview]
Message-ID: <20061215145326.46af16de@griffin.suse.cz> (raw)
In-Reply-To: <20061214040227.GA10661@mail.intel.com>
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@suse.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
prev parent reply other threads:[~2006-12-15 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-14 4:02 [PATCH 3/6] d80211: fix classify_1d() priority selection Zhu Yi
2006-12-14 11:13 ` Jiri Benc
2006-12-15 13:53 ` Jiri Benc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061215145326.46af16de@griffin.suse.cz \
--to=jbenc@suse.cz \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=simon@devicescape.com \
--cc=yi.zhu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).