Thread (1 message) 1 message, 1 author, 2011-12-16

Re: skb->priority usage in wireless frame classification

From: Dave Taht <hidden>
Date: 2011-12-16 09:53:43
Also in: linux-wireless

On Fri, Dec 16, 2011 at 10:42 AM, Helmut Schaa
[off-list ref] wrote:
On Fri, Dec 16, 2011 at 10:35 AM, Dave Taht [off-list ref] wrote:
quoted
On Fri, Dec 16, 2011 at 9:45 AM, Helmut Schaa
[off-list ref] wrote:
quoted
[Adding netdev]

Maybe someone from the netdev people can shed some light on this.
We've got the following code in net/wireless/util.c for frame classification
(cfg80211_classify8021d):

/* skb->priority values from 256->263 are magic values to
* directly indicate a specific 802.1d priority.  This is used
* to allow 802.1d priority to be passed directly in from VLAN
* tags, etc.
*/
if (skb->priority >= 256 && skb->priority <= 263)
                 return skb->priority - 256;

I was just thinking about making use of this for some internal mac80211
QoS handling. But is this code still valid? At least I haven't found anything
in the 802.1q code :(
I made use of the above 'feature' while prototyping some Diffserv work
with iptables. I have no idea if there are users of this obscure
overloading of priority in userspace....

The vlan code at least used to do something like this:

net/8021q/vlan.h: *     @vlan_qos: vlan priority: (skb->priority << 13) & 0xE000
Yeah, I saw that too but +256 would be << 8 and not << 13.
Exactly. It's why I used the word 'overload'. Someone in the distant
past saw >> 8 was 'reserved', and figured >> 13 was a safe place to
stick some valuable bits...

or vice versa.
Helmut


-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help