Skip to contentSkip to conversation

tc classes limit

LARTC Gerardo Arceri 3 participants 3 messages Jan 30, 2004 – Feb 1, 2004

lore
Share & tools
lore
#0 lore raw

This may be answered somewhere but i tried googling for it with no luck, so...

What's the limit on number of traffic classes (classid) you can define on Linux ?

Signature · 5 lines
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#1 lore raw
Quoted 3 lines · Gerardo Arceri

What's the limit on number of traffic classes (classid) you can define on Linux ?

Digging in the source code of Linux kernel 2.6.1 it seems that internal data structures for the classful queuing disciplines use a "u32" (unsigned 32-bit long integer) to store the class ID. Maybe there is a lower limit around there though.

Greetings.

Signature · 5 lines
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.2-bk3)
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Gerardo Arceri
Quoted 5 lines · Gerardo Arceri

This may be answered somewhere but i tried googling for it with no luck, so...

What's the limit on number of traffic classes (classid) you can define on Linux ?

From http://docum.org/stef.coene/qos/docs/general.html :

----
Each class and qdisc has a unique number: "<major number:minor number>". For a qdisc the minor number is zero, or you give no number. The major number of a class is the same as the major number of the qdisc the class belongs to. So, pairs x:y are class handles and x:0 or x: are qdisc handles.

Each major number can be a number between 1 and 0x7fff. Major number 0x8000 - 0xffff is used for qdiscs with an unspecified major number. Numbers from ffff:fff0 to ffff:ffff are reserved or have a special meaning.

The major numbers are unique for each qdisc. The minor numbers are unique per major number. You can use hexadecimal numbers.

From include/linux/pkt_sched.h:

/* "Handles"
---------

All the traffic control objects have 32bit identifiers, or "handles".

They can be considered as opaque numbers from user API viewpoint, but actually they always consist of two fields: major and minor numbers, which are interpreted by kernel specially, that may be used by applications, though not recommended.

F.e. qdisc handles always have minor number equal to zero, classes (or flows) have major equal to parent qdisc major, and minor uniquely identifying class inside qdisc.
*/
-----

stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/