From: Kalle Valo <kalle.valo@iki.fi>
To: David Miller <davem@davemloft.net>
Cc: kaber@trash.net, netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: Network QoS support in applications
Date: Tue, 26 Jan 2010 14:56:50 +0200 [thread overview]
Message-ID: <87wrz5m3cd.fsf@purkki.valot.fi> (raw)
In-Reply-To: <20100126.041610.226004766.davem@davemloft.net> (David Miller's message of "Tue\, 26 Jan 2010 04\:16\:10 -0800 \(PST\)")
David Miller <davem@davemloft.net> writes:
> From: Kalle Valo <kalle.valo@iki.fi>
> Date: Tue, 26 Jan 2010 13:51:55 +0200
>
>> Let's take a bittorrent client as an example. The traffic it generates
>> is not important and it doesn't matter if bittorrent packets have
>> lower priority compared to other streams. What SO_PRIORITY value
>> should all bittorrent clients to use to mark their packets as low
>> priority (for example background class from IEEE 802.1d Annex G).
>
> This is a local policy decision.
>
> There is no universal way of doing any of this, really.
In my opinion we already now need a universal solution for the user
space applications to classify their streams. Having a local solution
doesn't get us far, people don't want to configure their laptops or
phones, they just want to use them :)
Having a well defined API for this makes it easier for everyone. Also
proprietary applications, like skype, can make use of QoS.
It doesn't matter how we map these internally in kernel, but the
interface to user space needs to be documented and maintained. I'm
willing to work on this, but we first need a concensus for the method.
I'm leaning towards using IPv4 DS/TOS and IPv6 Traffic Class fields
using IEEE 802.1d values. That way, with luck, the class of the packet
is visible even more than one hop. In fact cfg80211/mac80211 is
already doing this for IPv4:
/* Given a data frame determine the 802.1p/1d tag to use. */
unsigned int cfg80211_classify8021d(struct sk_buff *skb)
{
unsigned int dscp;
/* 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;
switch (skb->protocol) {
case htons(ETH_P_IP):
dscp = ip_hdr(skb)->tos & 0xfc;
break;
default:
return 0;
}
return dscp >> 5;
}
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=blob;f=net/wireless/util.c;h=be2ab8c59e3a9806425b2b958d87dfe50d80111d;hb=HEAD#l598
So the idea is that the three left most bits (Class Selector
Codepoints from DiffServ RFC 2474) would contain these values from
IEEE 802.1d-2004 Annex G:
0 best effort
1 background
2 (spare)
3 excellent effort
4 controlled load
5 video
6 voice
7 network control
What do people think of this?
Feel free to flame, it was -20 C (-4 F) this morning. I would need
some warmth here :)
--
Kalle Valo
next prev parent reply other threads:[~2010-01-26 12:56 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-26 8:27 Network QoS support in applications Kalle Valo
2010-01-26 8:27 ` Kalle Valo
2010-01-26 11:30 ` Patrick McHardy
2010-01-26 11:30 ` Patrick McHardy
2010-01-26 11:51 ` Kalle Valo
2010-01-26 11:51 ` Kalle Valo
2010-01-26 11:59 ` Patrick McHardy
2010-01-26 11:59 ` Patrick McHardy
2010-01-26 12:16 ` David Miller
2010-01-26 12:16 ` David Miller
2010-01-26 12:56 ` Kalle Valo [this message]
2010-01-26 13:06 ` David Miller
2010-01-26 13:47 ` Kalle Valo
2010-01-26 13:47 ` Kalle Valo
2010-01-26 14:02 ` Dunc
2010-01-26 14:27 ` Kalle Valo
2010-01-26 14:27 ` Kalle Valo
2010-01-26 21:54 ` Edgar E. Iglesias
2010-01-26 21:54 ` Edgar E. Iglesias
2010-01-27 7:11 ` Kalle Valo
2010-01-27 1:57 ` Zhu Yi
2010-01-27 13:24 ` Benny Amorsen
2010-03-11 19:21 ` Philip A. Prindeville
2010-03-11 19:27 ` David Miller
2010-03-11 19:27 ` David Miller
2010-03-11 19:29 ` Philip A. Prindeville
2010-03-11 19:29 ` Philip A. Prindeville
2010-05-19 0:04 ` Philip A. Prindeville
2010-05-31 19:30 ` Ben Gardiner
2010-05-31 19:30 ` Ben Gardiner
2010-05-31 20:28 ` Philip Prindeville
2010-01-26 14:43 ` Rémi Denis-Courmont
2010-01-26 14:43 ` Rémi Denis-Courmont
2010-01-26 13:06 ` Henning Rogge
2010-01-26 13:06 ` Henning Rogge
2010-01-27 6:59 ` Kalle Valo
2010-01-26 15:29 ` Steven Blake
2010-01-27 7:03 ` Kalle Valo
2010-01-27 16:18 ` Olaf van der Spek
2010-01-27 16:26 ` Greg Oliver
2010-03-11 18:56 ` Philip A. Prindeville
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=87wrz5m3cd.fsf@purkki.valot.fi \
--to=kalle.valo@iki.fi \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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.