* [LARTC] Some questions remaining about TC
@ 2003-06-09 21:18 Emmanuel SIMON
2003-06-10 18:55 ` Stef Coene
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Emmanuel SIMON @ 2003-06-09 21:18 UTC (permalink / raw)
To: lartc
Hello everybody,
I try to work with TC for a little while in my study and there still are a few
questions that I can\'t find any answer anywhere.
Firts about qdisc and classes:
- What is exactly the difference between qdsic and class ? They are
so \"intimately tied together\" that i\'m not sure not make the difference. Why
can\'t we have a qdsic HTB with a class CBQ within or reverse.
- We have classes but is there any heritage (i\'m not sure it is the right
word) somewhere: between qdiscs, between classes or between qdiscs and classes.
About DSMARK, I don\'t understand the way it works:
- What is the (mask, Value) ? What is it used for ?
- Does it mark the packet or the structure in the kernel ?
- If i can mark the packet, how is it done ? Can i put only \'minimize
delay\', \'maximize throughput\' and so on, or can i put for exemple 10110111 if i
want in the TOS field ?
- Does it exist a howto only about DSMARK ?
Another subject not so far from LARTC:
Chapter 11 of the howto says we can modify the TOS with Iptables. I\'ve tried to
change it with the table mangle and to set it to a value outside the TOS values
(again). it failed (of course ?). After having modified the source code of
iptable and netfilter and removing the check on the TOS values, it stille
failed ! There is \"something\" in the IP stack that blocks me !! Does anyone
know how to do that ???
I have read all that i found: howtos, memos of Werner Almersberger, Q/A of the
list, books but these questions still remain (and maybe any other). So please,
help.
thanks
Emmanuel
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LARTC] Some questions remaining about TC
2003-06-09 21:18 [LARTC] Some questions remaining about TC Emmanuel SIMON
@ 2003-06-10 18:55 ` Stef Coene
2003-06-11 7:41 ` Lars Landmark
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2003-06-10 18:55 UTC (permalink / raw)
To: lartc
On Monday 09 June 2003 23:18, Emmanuel SIMON wrote:
> Hello everybody,
>
> I try to work with TC for a little while in my study and there still are a
> few questions that I can\'t find any answer anywhere.
>
> Firts about qdisc and classes:
> - What is exactly the difference between qdsic and class ? They are
> so \"intimately tied together\" that i\'m not sure not make the difference.
> Why can\'t we have a qdsic HTB with a class CBQ within or reverse.
> - We have classes but is there any heritage (i\'m not sure it is the right
> word) somewhere: between qdiscs, between classes or between qdiscs and
> classes.
A qdisc is a structure where a packet can be enqueued. The most important is
the root qdisc. That's the qdisc that will proces all packets leaving a NIC.
If you have classfull qdisc you can add classes. A class will hold some part
of the traffic. So all packets leaving a nic are enqueued in the root qdisc
and will be "forwarded" to a class. Each class has 1 qdisc attached to it.
So it's the qdisc attached to a class that will reponsible for sending the
packet
Sorry, can't help you with your other questions.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LARTC] Some questions remaining about TC
2003-06-09 21:18 [LARTC] Some questions remaining about TC Emmanuel SIMON
2003-06-10 18:55 ` Stef Coene
@ 2003-06-11 7:41 ` Lars Landmark
2003-06-11 10:26 ` Emmanuel SIMON
2003-06-11 16:47 ` Stef Coene
3 siblings, 0 replies; 5+ messages in thread
From: Lars Landmark @ 2003-06-11 7:41 UTC (permalink / raw)
To: lartc
On Tue, 10 Jun 2003, Stef Coene wrote:
> On Monday 09 June 2003 23:18, Emmanuel SIMON wrote:
> > Hello everybody,
> >
> > I try to work with TC for a little while in my study and there still are a
> > few questions that I can\'t find any answer anywhere.
> >
> > Firts about qdisc and classes:
> > - What is exactly the difference between qdsic and class ? They are
> > so \"intimately tied together\" that i\'m not sure not make the difference.
> > Why can\'t we have a qdsic HTB with a class CBQ within or reverse.
> > - We have classes but is there any heritage (i\'m not sure it is the right
> > word) somewhere: between qdiscs, between classes or between qdiscs and
> > classes.
> A qdisc is a structure where a packet can be enqueued. The most important is
> the root qdisc. That's the qdisc that will proces all packets leaving a NIC.
> If you have classfull qdisc you can add classes. A class will hold some part
> of the traffic. So all packets leaving a nic are enqueued in the root qdisc
> and will be "forwarded" to a class. Each class has 1 qdisc attached to it.
> So it's the qdisc attached to a class that will reponsible for sending the
> packet
>
> Sorry, can't help you with your other questions.
>
> Stef
>
Hi;
qdisc and classes are as you explained tightly tied together.
As Stef said, qdisc is a struct containing a pointer to a set of function.
In addition do HTB and CBQ hold an array in this qdisc struct. The purpose of
this array is to hold a pointer to each class configured for either CBQ or
HTB. This means; as once you have configured a CBQ qdisc, CBQ allocate this
array. When you now configure a class, the pointer to this class struct
is put into this array.
But this array can only hold pre defined types of class pointers.
HTB and CBQ have two different types of class pointers. This is the main
reason why CBQ and HTB classes can not be allocated to the opposite qdisc.
If this was not enough; When dequeue functions is invoked, this function
use different variables in its class struct. HTB and CBQ do not
necessarily contains the same variables intended to use for the same purpose.
Hopefully this will explain why a CBQ class can not be attached to a HTB
qdisc and vice versa.
Regard
Lars
Student
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [LARTC] Some questions remaining about TC
2003-06-09 21:18 [LARTC] Some questions remaining about TC Emmanuel SIMON
2003-06-10 18:55 ` Stef Coene
2003-06-11 7:41 ` Lars Landmark
@ 2003-06-11 10:26 ` Emmanuel SIMON
2003-06-11 16:47 ` Stef Coene
3 siblings, 0 replies; 5+ messages in thread
From: Emmanuel SIMON @ 2003-06-11 10:26 UTC (permalink / raw)
To: lartc
First, thank you Stef for answering.
That's what I understood. I think my question was not enough precise (??)
My reel question/problem is why are parameters of the bandwidth (such as
rate, burts ...) set on classes rather than on qdiscs ?
I guess a class should only map a flow and should not know how this flow
will be sent. Especially that classes don't send packets. What is the reason
why it is done so ? And what if i don't specify parameters fir a leaf class
? Does it herit from the parent ?
Thanks once more
Manu
> -----Message d'origine-----
> De : lartc-admin@mailman.ds9a.nl
> [mailto:lartc-admin@mailman.ds9a.nl]De
> la part de Stef Coene
> Envoyé : mardi 10 juin 2003 20:55
> À : Emmanuel SIMON; lartc@mailman.ds9a.nl
> Objet : Re: [LARTC] Some questions remaining about TC
>
>
> On Monday 09 June 2003 23:18, Emmanuel SIMON wrote:
> > Hello everybody,
> >
> > I try to work with TC for a little while in my study and
> there still are a
> > few questions that I can\'t find any answer anywhere.
> >
> > Firts about qdisc and classes:
> > - What is exactly the difference between qdsic and class ? They are
> > so \"intimately tied together\" that i\'m not sure not make
> the difference.
> > Why can\'t we have a qdsic HTB with a class CBQ within or reverse.
> > - We have classes but is there any heritage (i\'m not sure
> it is the right
> > word) somewhere: between qdiscs, between classes or between
> qdiscs and
> > classes.
> A qdisc is a structure where a packet can be enqueued. The
> most important is
> the root qdisc. That's the qdisc that will proces all
> packets leaving a NIC.
> If you have classfull qdisc you can add classes. A class
> will hold some part
> of the traffic. So all packets leaving a nic are enqueued in
> the root qdisc
> and will be "forwarded" to a class. Each class has 1 qdisc
> attached to it.
> So it's the qdisc attached to a class that will reponsible
> for sending the
> packet
>
> Sorry, can't help you with your other questions.
>
> Stef
>
> --
>
> stef.coene@docum.org
> "Using Linux as bandwidth manager"
> http://www.docum.org/
> #lartc @ irc.oftc.net
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] Some questions remaining about TC
2003-06-09 21:18 [LARTC] Some questions remaining about TC Emmanuel SIMON
` (2 preceding siblings ...)
2003-06-11 10:26 ` Emmanuel SIMON
@ 2003-06-11 16:47 ` Stef Coene
3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2003-06-11 16:47 UTC (permalink / raw)
To: lartc
On Wednesday 11 June 2003 12:26, Emmanuel SIMON wrote:
> First, thank you Stef for answering.
> That's what I understood. I think my question was not enough precise (??)
>
> My reel question/problem is why are parameters of the bandwidth (such as
> rate, burts ...) set on classes rather than on qdiscs ?
You have to see a class as a virtual channel. Each class is responsible for
the packets that it holds. So the rate / burst / ceil and so one are only
valid for that class. So you have to put packets in the same class that
somehow are the same. Like all telnet/ssh packets. So you can give that
class a small burst and a low latency. Or you put the packets from 1 client
in 1 class so all the traffic to the client is one 1 big channel and he is
reponsible for this.
> I guess a class should only map a flow and should not know how this flow
> will be sent. Especially that classes don't send packets. What is the
> reason why it is done so ? And what if i don't specify parameters fir a
> leaf class ? Does it herit from the parent ?
A class is not reponsible for sending the packets because the class is only
used to create the virtual channels (and so to limit the packets in that
class). Once a packet is dequeued from a virtual channel (and so is dequeued
form a class) it's give to the qdisc attached to that class. So you can add
a small fifo qdisc to that class so packets are send fast. Or you can add a
sfq qdisc so each flow has his own little queue. So you have a lot of
flexibility.
You can even add a classfull qdisc to a class, but that's just a waste of CPU
cycles and will only add extra delays.
Each class needs it's own parameters when you create it. It will not inheret
something from its parent.
> Thanks once more
This is even for more confusing when I have to think about ut. This is in no
docs explained, but I don't think that I'm telling big lies.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-06-11 16:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-09 21:18 [LARTC] Some questions remaining about TC Emmanuel SIMON
2003-06-10 18:55 ` Stef Coene
2003-06-11 7:41 ` Lars Landmark
2003-06-11 10:26 ` Emmanuel SIMON
2003-06-11 16:47 ` Stef Coene
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.