Re: [LARTC] Some questions remaining about TC

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 
 



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux