All of lore.kernel.org
 help / color / mirror / Atom feed
* skb->priority usage in wireless frame classification
@ 2011-12-16  8:45 ` Helmut Schaa
  0 siblings, 0 replies; 7+ messages in thread
From: Helmut Schaa @ 2011-12-16  8:45 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless, Johannes Berg

[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 :(

Thanks,
Helmut

^ permalink raw reply	[flat|nested] 7+ messages in thread

* skb->priority usage in wireless frame classification
@ 2011-12-16  8:45 ` Helmut Schaa
  0 siblings, 0 replies; 7+ messages in thread
From: Helmut Schaa @ 2011-12-16  8:45 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA; +Cc: linux-wireless, Johannes Berg

[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 :(

Thanks,
Helmut
--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: skb->priority usage in wireless frame classification
  2011-12-16  8:45 ` Helmut Schaa
  (?)
@ 2011-12-16  9:35 ` Dave Taht
  2011-12-16  9:42     ` Helmut Schaa
  -1 siblings, 1 reply; 7+ messages in thread
From: Dave Taht @ 2011-12-16  9:35 UTC (permalink / raw)
  To: Helmut Schaa; +Cc: netdev, linux-wireless, Johannes Berg

On Fri, Dec 16, 2011 at 9:45 AM, Helmut Schaa
<helmut.schaa@googlemail.com> wrote:
> [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

But I don't see that at first glance in the current code... this part
is functionally the same...

vlan_netlink.c:				m.to   = (pm->vlan_qos >> 13) & 0x7;
vlanproc.c:				   mp->priority, ((mp->vlan_qos >> 13) & 0x7));

Assuming that somewhere else was an assignment from priority to this...

> Thanks,
> Helmut
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: skb->priority usage in wireless frame classification
@ 2011-12-16  9:42     ` Helmut Schaa
  0 siblings, 0 replies; 7+ messages in thread
From: Helmut Schaa @ 2011-12-16  9:42 UTC (permalink / raw)
  To: Dave Taht; +Cc: netdev, linux-wireless, Johannes Berg

On Fri, Dec 16, 2011 at 10:35 AM, Dave Taht <dave.taht@gmail.com> wrote:
> On Fri, Dec 16, 2011 at 9:45 AM, Helmut Schaa
> <helmut.schaa@googlemail.com> wrote:
>> [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.

Helmut

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: skb->priority usage in wireless frame classification
@ 2011-12-16  9:42     ` Helmut Schaa
  0 siblings, 0 replies; 7+ messages in thread
From: Helmut Schaa @ 2011-12-16  9:42 UTC (permalink / raw)
  To: Dave Taht; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-wireless, Johannes Berg

On Fri, Dec 16, 2011 at 10:35 AM, Dave Taht <dave.taht-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Fri, Dec 16, 2011 at 9:45 AM, Helmut Schaa
> <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
>> [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.

Helmut
--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: skb->priority usage in wireless frame classification
@ 2011-12-16  9:53       ` Dave Taht
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Taht @ 2011-12-16  9:53 UTC (permalink / raw)
  To: Helmut Schaa; +Cc: netdev, linux-wireless, Johannes Berg

On Fri, Dec 16, 2011 at 10:42 AM, Helmut Schaa
<helmut.schaa@googlemail.com> wrote:
> On Fri, Dec 16, 2011 at 10:35 AM, Dave Taht <dave.taht@gmail.com> wrote:
>> On Fri, Dec 16, 2011 at 9:45 AM, Helmut Schaa
>> <helmut.schaa@googlemail.com> wrote:
>>> [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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: skb->priority usage in wireless frame classification
@ 2011-12-16  9:53       ` Dave Taht
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Taht @ 2011-12-16  9:53 UTC (permalink / raw)
  To: Helmut Schaa; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-wireless, Johannes Berg

On Fri, Dec 16, 2011 at 10:42 AM, Helmut Schaa
<helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
> On Fri, Dec 16, 2011 at 10:35 AM, Dave Taht <dave.taht-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On Fri, Dec 16, 2011 at 9:45 AM, Helmut Schaa
>> <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
>>> [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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-16  9:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16  8:45 skb->priority usage in wireless frame classification Helmut Schaa
2011-12-16  8:45 ` Helmut Schaa
2011-12-16  9:35 ` Dave Taht
2011-12-16  9:42   ` Helmut Schaa
2011-12-16  9:42     ` Helmut Schaa
2011-12-16  9:53     ` Dave Taht
2011-12-16  9:53       ` Dave Taht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.