From: bert hubert <ahu@ds9a.nl>
To: lartc@mailman.ds9a.nl, linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: CBQ and all other qdiscs now REALLY completely documented (almost!)
Date: Sun, 9 Dec 2001 02:30:29 +0100 [thread overview]
Message-ID: <20011209023029.A25580@outpost.ds9a.nl> (raw)
In-Reply-To: <20011209002344.C20125@outpost.ds9a.nl> <Pine.GSO.4.30.0112081841050.4764-100000@shell.cyberus.ca>
In-Reply-To: <Pine.GSO.4.30.0112081841050.4764-100000@shell.cyberus.ca>; from hadi@cyberus.ca on Sat, Dec 08, 2001 at 08:14:10PM -0500
On Sat, Dec 08, 2001 at 08:14:10PM -0500, jamal wrote:
> Yes, sorry the last 4 are int_bulk (value 4) and not just bulk (2). good
> eye. You are still abusing the word TOS. Thats only 4 bits not 8;
> Use the terminology from RFC1349 at least.
Will do.
> > http://ds9a.nl/lartc/HOWTO/cvs/2.4routing/output/2.4routing-9.html#ss9.2
> >
> > Your table appears to imply that a Maximum Reliability, Mininum Delay
> > packet, TOS bits=9, gets mapped to band 1, not 0, which would not make
> > sense.
>
> This is the priomap: 1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1
> It says 1 is the right value
AFAICT, the priomap maps skb->priority to band. So the translation is as
follows:
Type of Service octet, which is fed to:
skb->priority = rt_tos2priority(iph->tos);
To extract the four TOS bits, and to translate to prio:
static inline char rt_tos2priority(u8 tos)
{
return ip_tos2prio[IPTOS_TOS(tos)>>1];
}
----
__u8 ip_tos2prio[16] = {
TC_PRIO_BESTEFFORT,
ECN_OR_COST(FILLER),
TC_PRIO_BESTEFFORT,
ECN_OR_COST(BESTEFFORT),
TC_PRIO_BULK,
ECN_OR_COST(BULK),
TC_PRIO_BULK,
ECN_OR_COST(BULK),
TC_PRIO_INTERACTIVE,
ECN_OR_COST(INTERACTIVE),
TC_PRIO_INTERACTIVE,
ECN_OR_COST(INTERACTIVE),
TC_PRIO_INTERACTIVE_BULK,
ECN_OR_COST(INTERACTIVE_BULK),
TC_PRIO_INTERACTIVE_BULK,
ECN_OR_COST(INTERACTIVE_BULK)
};
---
#define TC_PRIO_BESTEFFORT 0
#define TC_PRIO_FILLER 1
#define TC_PRIO_BULK 2
#define TC_PRIO_INTERACTIVE_BULK 4
#define TC_PRIO_INTERACTIVE 6
#define TC_PRIO_CONTROL 7
#define TC_PRIO_MAX 15
net/sched/sched_generic.c:
static const u8 prio2band[TC_PRIO_MAX+1] =
{ 1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1 };
list = ((struct sk_buff_head*)qdisc->data) +
prio2band[skb->priority&TC_PRIO_MAX];
> > CBQ can use the skb->priority to classify:
>
> so do prio and pfifo_fast (as i am sure you are aware)
Of course, but only CBQ (& HTB, by the way) can extract a classid directly
from it, without a priomap. Devik is planning to learn HTB to extract a
classid directly from the fwmark, to skip a layer of indirection.
Regards,
bert hubert
--
http://www.PowerDNS.com Versatile DNS Software & Services
Trilab The Technology People
Netherlabs BV / Rent-a-Nerd.nl - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
next prev parent reply other threads:[~2001-12-09 1:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-01 0:33 Finally, CBQ nearly completely documented bert hubert
2001-12-03 2:00 ` CBQ and all other qdiscs now REALLY completely documented (almost!) bert hubert
2001-12-03 2:26 ` [LARTC] " Jim Fleming
2001-12-08 19:20 ` jamal
2001-12-08 19:55 ` further CBQ/tc documentation ds9a.nl/lartc/manpages bert hubert
2001-12-08 20:43 ` jamal
2001-12-08 23:23 ` CBQ and all other qdiscs now REALLY completely documented (almost!) bert hubert
2001-12-09 1:14 ` jamal
2001-12-09 1:30 ` bert hubert [this message]
2001-12-09 2:10 ` jamal
2001-12-09 18:14 ` CBQ and all other qdiscs now REALLY completely documented kuznet
2001-12-09 18:18 ` bert hubert
2001-12-09 21:45 ` jamal
2001-12-09 21:53 ` bert hubert
2001-12-09 22:07 ` jamal
2001-12-09 22:13 ` bert hubert
2001-12-10 0:58 ` jamal
2001-12-10 17:04 ` kuznet
2001-12-10 0:41 ` CBQ MANPAGE: I hear the theme of '2001, A Space Odyssey' bert hubert
2001-12-10 1:04 ` jamal
2001-12-10 1:12 ` bert hubert
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=20011209023029.A25580@outpost.ds9a.nl \
--to=ahu@ds9a.nl \
--cc=lartc@mailman.ds9a.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.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.