Skip to contentSkip to conversation

QoS limitations ....

DISCUSSION Raymond Leach 2 participants 2 messages Dec 17, 2002

lore
Share & tools
lore
#0 lore raw

Hi all

Does anyone know of a limit to the number of filters or classes that can be attached to a single qdisc (let's say CBQ or HTB)?

I have a client that want to do bandwidth throttling per ip across 10 class C subnets.

What problems can I expect, and does anyone have any other suggestions on how to accomplish this?

Ray

Signature · 19 lines
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(  Raymond Leach                       )
 ) Knowledge Factory                  (
(                                      )
 ) Tel: +27 11 445 8100               (
(  Fax: +27 11 445 8101                )
 )                                    (
(  http://www.knowledgefactory.co.za/  )
 ) http://www.saptg.co.za/            (
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   o                                o
    o                              o
        .--.                  .--.
       | o_o|                |o_o |
       | \_:|                |:_/ |
      / /   \\              //   \ \
     ( |     |)            (|     | )
     /`\_   _/'\          /'\_   _/`\
     \___)=(___/          \___)=(___/
#1 lore raw

After some checking i found this:
/* "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.

Macros to manipulate handles:
*/

#define TC_H_MAJ_MASK (0xFFFF0000U)
#define TC_H_MIN_MASK (0x0000FFFFU)
#define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
#define TC_H_MIN(h) ((h)&TC_H_MIN_MASK)
#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))

#define TC_H_UNSPEC     (0U)
#define TC_H_ROOT       (0xFFFFFFFFU)
#define TC_H_INGRESS    (0xFFFFFFF1U)

inside include/linux/pkt_sched.h (linux 2.4.19 kernel tree). It seems that you can set FFFF class ids as stated by the minor mask. Hope to be right,

Marcello

Il mar, 2002-12-17 alle 12:16, Raymond Leach ha scritto:

Quoted 12 lines

Hi all

Does anyone know of a limit to the number of filters or classes that can be attached to a single qdisc (let's say CBQ or HTB)?

I have a client that want to do bandwidth throttling per ip across 10 class C subnets.

What problems can I expect, and does anyone have any other suggestions on how to accomplish this?

Ray

Signature · 1 line
Marcello Scacchetti <[email protected]>