All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Acker <dacker@roinet.com>
To: Dan Williams <dcbw@redhat.com>
Cc: Greg Oliver <oliver.greg@gmail.com>,
	Kalle Valo <kalle.valo@iki.fi>,
	linux-wireless@vger.kernel.org, patrik.flykt@nokia.com
Subject: Re: WMM classification guideline for applications?
Date: Fri, 04 Dec 2009 15:01:43 -0500	[thread overview]
Message-ID: <4B196AA7.3040603@roinet.com> (raw)
In-Reply-To: <1259954135.27022.6.camel@localhost.localdomain>

Dan Williams wrote:
> On Fri, 2009-12-04 at 10:56 -0600, Greg Oliver wrote:
>> On Fri, Dec 4, 2009 at 10:08 AM, David Acker <dacker@roinet.com> wrote:
>>> Kalle Valo wrote:
>>>> David Acker <dacker@roinet.com> writes:
>>>>> What do think of also supporting a method 4, VLAN priority field (0-7)?
>>>> Sorry, I haven't heard about this. I don't even know how applications
>>>> should set this. Can you show an example, please?
>>> Sure.  A system could be setup with multiple VLANs available on its outgoing
>>> port.  Imagine eth0.1, eth0.2 and eth0.7.  Each one is a different VLAN with
>>> a different priority mapping setup.  The application can use the high
>>> priority VLAN which should then be reflected in the over the air packets
>>> using a high priority WMM queue.  If the driver implements the appropriate
>>> VLAN functionality it should be able to detect VLAN tagged packets and pick
>>> the appropriate WMM hardware queue.  I think a driver can use vlan_get_tag
>>> to get the Tag Control Information (TCI) field.  The TCI field contains a
>>> 3-bit Priority Code Point (PCP) field for 8 different priorities.
>>>
>>> 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. pkt_sched.h
>>> defines some skb priorities but also leaves many undefined.  The
>>> skb->priority is also larger then the vlan priority.  If both are set, which
>>> will take precedence?
>>> -ack
>> I do nto mean to be negative, but how can vlan based priority mapping
>> be anything but "going in reverse" by today's QoS standards?  The
>> whole point of packet marking is to alleviate the "this port is better
>> than that port", so traffic from any port can be made equal to that of
>> another..  Port (vlan/subnet/interface, etc) agnostic...  This would
>> seem like a regression to me...  All of the major router/switch
>> vendors provide mappings between these techniques already for this
>> reason.  Hopefully, they will not be needed much longer.
> 
> Also, I think that unless it's a simple as a setsockopt() or some
> one-call method like that, app writers aren't really going to use it.
> For something as conceptually simple as QoS (even if the implementation
> is complex), as an app writer I'd want to say "this packet is priority
> 3" and not "this packet is priority 4, so I need to find the
> corresponding VLAN, and if that's not set up for me already then fail".

On the other hand, an administrator could create a high priority VLAN/IP 
subnet and setup the mapping so that the default skb priority goes to a 
high priority vlan.  The applications using this don't have to change at 
all.

Minimally, I think that Linux wireless needs to define what priority 
related fields it uses to drive WMM.  It is fine to ignore the VLAN 
priority as long as it is documented.  Going with the skb priority 
sounds like a good plan since it is used to drive the VLAN priority anyway.

Going with IPv4 DSCP may be a bit problematic.  See 
http://marc.info/?l=linux-netdev&m=125875775229644&w=2 and 
http://sourceware.org/bugzilla/show_bug.cgi?id=10789 .
-ack


  reply	other threads:[~2009-12-04 20:01 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 [this message]
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
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=4B196AA7.3040603@roinet.com \
    --to=dacker@roinet.com \
    --cc=dcbw@redhat.com \
    --cc=kalle.valo@iki.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=oliver.greg@gmail.com \
    --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.