All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Acker <dacker@roinet.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Kalle Valo <kalle.valo@iki.fi>,
	linux-wireless@vger.kernel.org, patrik.flykt@nokia.com
Subject: Re: WMM classification guideline for applications?
Date: Sun, 06 Dec 2009 20:34:59 -0500	[thread overview]
Message-ID: <4B1C5BC3.70108@roinet.com> (raw)
In-Reply-To: <1260124341.3461.22.camel@johannes.local>

Johannes Berg wrote:
> On Sun, 2009-12-06 at 13:10 -0500, David Acker wrote:
>> Johannes Berg wrote:
>>> On Fri, 2009-12-04 at 11:08 -0500, David Acker wrote:
>>>
>>>> I am not an expert on how the kernel handles vlans, but it appears that 
>>>> the priority field's value is set by the user space VLAN creation tools 
>>>> through an ioctl with SET_VLAN_EGRESS_PRIORITY_CMD which calls 
>>>> vlan_dev_set_egress_priority to map an skb priority to a vlan priority.
>>>> vlan_dev_hard_header then uses this information to populate the vlan 
>>>> priority field based on the skb priority field.
>>>>
>>>> In this case it would seem that skb priority and the vlan priority are 
>>>> both set and there may be a non-trivial mapping between the two. 
>>> But doesn't that also mean that mac80211 can happily ignore the VLAN
>>> priority in the packet, because the vlan code will have propagated it to
>>> the skb->priority, if the administrator wishes to use it?
>> You are correct on rx.
> 
> I don't see how RX matters at all, to mac80211?
When a packet is received on a higher priority WMM queue, should it 
reflect that in skb->priority?

> 
>>   The tricky part is the non-trivial mapping on 
>> tx.  If mac80211 only looks at the skb->priority and assumes priority 0 
>> means best effort, the code could be missing that skb->priority 0 maps 
>> to vlan priority 7.  If we define that mac80211 only looks at 
>> skb->priority, perhaps we should allow user space control of the mapping 
>> of the skb->priority to WMM priority queue.  This could be similar to 
>> the mapping capabilities in the VLAN code.  That way, an admin can make 
>> sure that the skb priority is mapped to both an appropriate vlan 
>> priority and an appropriate WMM priority queue.
> 
> I don't understand. If I TX a packet, on a specific VLAN, then it'll go
> through the VLAN code first, get 802.1q tags and then be passed to
> mac80211, which ought be be fine with just looking at the priority value
> the packet now got.

The packet will get tags which will contain the vlan priority mapped 
from the original skb->priority.  What if the administrator wanted all 
applications that used a specific VLAN to have high priority.  Without 
having to change the applications, he could make the mapping of skb 
priority 0 to go a high priority VLAN.  It would be nice if he could 
also make skb->priority 0 go to a high priority WMM queue.  It is fine 
to base every thing on the skb priority but it would be nice if the 
mapping of skb priority to WMM queue was not static.  It should have a 
user space API that is similar in functionality to the VLAN priority API.

As an example, I have a system where a wireless router has multiple 
SSIDs.  One SSID is for guests and has little or no security and is on 
VLAN 1 with a VLAN priority of 0.  Another SSID is for system 
configuration and has high security (802.11i) and is on VLAN 2 with a 
VLAN priority of 7.  The VLAN tagging is handled by the router; clients 
send normal frames.  Their applications do not require any changes.  The 
router will give higher priority to the system configuration VLAN during 
any queuing.  When the packets are sent, I have code (in madwifi in this 
example) to put the packets with VLAN priority 0 in the best effort 
queue while packets in vlan priority 7 go into the voice queue.  This 
code also sets the skb->priority field based on the VLAN priority.  This 
allows the queuing of the packet to the wifi0 device to reflect the 
appropriate ordering.  The router supports meshing such that the WMM 
queues are used for packets between the routers.  In this manner, the 
QoS required for the higher priority VLAN is reflected through the whole 
network, including the eventual wired destination.

To support this in mac80211, it would be nice to specify the mapping of 
skb->priority to WMM queue on a per SSID basis.  This would allow QoS to 
be application driven or SSID driven.
-ack


__________ Information from ESET Smart Security, version of virus signature database 4665 (20091206) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  reply	other threads:[~2009-12-07  1:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 14:02 WMM classification guideline for applications? Kalle Valo
2009-12-04 15:14 ` David Acker
2009-12-04 15:24   ` Kalle Valo
2009-12-04 16:08     ` David Acker
2009-12-04 16:56       ` Greg Oliver
2009-12-04 19:15         ` Dan Williams
2009-12-04 20:01           ` David Acker
2009-12-07 15:11             ` Kalle Valo
2009-12-04 21:01           ` Kalle Valo
2009-12-06 10:46       ` Johannes Berg
2009-12-06 18:10         ` David Acker
2009-12-06 18:32           ` Johannes Berg
2009-12-07  1:34             ` David Acker [this message]
2009-12-06 10:57 ` Johannes Berg
2009-12-07 15:50   ` Kalle Valo

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=4B1C5BC3.70108@roinet.com \
    --to=dacker@roinet.com \
    --cc=johannes@sipsolutions.net \
    --cc=kalle.valo@iki.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=patrik.flykt@nokia.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 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.