From: bert hubert <ahu@ds9a.nl>
To: lartc@vger.kernel.org
Subject: [LARTC] Re: CBQ and all other qdiscs now REALLY completely documented (almost!)
Date: Sun, 09 Dec 2001 01:30:29 +0000 [thread overview]
Message-ID: <marc-lartc-100786222321565@msgid-missing> (raw)
In-Reply-To: <marc-lartc-100785387206372@msgid-missing>
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
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
prev parent reply other threads:[~2001-12-09 1:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-08 23:23 [LARTC] Re: CBQ and all other qdiscs now REALLY completely documented (almost!) bert hubert
2001-12-09 1:30 ` bert hubert [this message]
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=marc-lartc-100786222321565@msgid-missing \
--to=ahu@ds9a.nl \
--cc=lartc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox