All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Problem attaching htb class to a htb qdisc
@ 2007-03-15  8:47 Ruben Porras
  2007-03-30  0:15 ` Andy Furniss
  0 siblings, 1 reply; 2+ messages in thread
From: Ruben Porras @ 2007-03-15  8:47 UTC (permalink / raw)
  To: lartc

I'm trying to build a QoS system that would divide the outgoing traffic
into four categories, each one also subdivided into two more categories.
For that I chose a htb root qdisc subdivided into four classes, each of
these classes contains also a htb qdisc. Until these point everything
goes well, but when I try to attach a new class to the leaf htb qdisc a
problem with the sintaxis arises. Code follows:
        
        
        tc qdisc add dev $DEV root handle 1: htb default 30
        
        tc class add dev $DEV parent 1: classid 1:1 htb rate
        ${UPLINK}kbit
        
        tc class add dev $DEV parent 1:1 classid 1:10 htb rate
        ${UPLINK}kbit
        tc class add dev $DEV parent 1:1 classid 1:20 htb rate
        ${UPLINK}kbit
        tc class add dev $DEV parent 1:1 classid 1:30 htb rate
        ${UPLINK}kbit
        tc class add dev $DEV parent 1:1 classid 1:40 htb rate
        ${UPLINK}kbit
        
        tc qdisc add dev $DEV parent 1:10 handle 10: htb default 12
        tc class add dev $DEV parent 10: classid 1:11 htb rate
        ${UPLINK}kbit
        prio 1
        
        RTNETLINK answers: Invalid argument
        
        tc class add dev $DEV parent 10: classid 1:12 htb rate
        ${UPLINK}kbit
        prio 2
        
        RTNETLINK answers: Invalid argument
        
        tc qdisc add dev $DEV parent 1:11 handle 11: sfq perturb 10
        tc qdisc add dev $DEV parent 1:12 handle 12: sfq perturb 10
        
        ...
        
If I attach the classes to 1: instead of 10: everything goes well, but I
do not understand why I can't attach a class to 10:
        
Any help would be appreciated.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] Problem attaching htb class to a htb qdisc
  2007-03-15  8:47 [LARTC] Problem attaching htb class to a htb qdisc Ruben Porras
@ 2007-03-30  0:15 ` Andy Furniss
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Furniss @ 2007-03-30  0:15 UTC (permalink / raw)
  To: lartc

Ruben Porras wrote:
> I'm trying to build a QoS system that would divide the outgoing traffic
> into four categories, each one also subdivided into two more categories.
> For that I chose a htb root qdisc subdivided into four classes, each of
> these classes contains also a htb qdisc. Until these point everything
> goes well, but when I try to attach a new class to the leaf htb qdisc a
> problem with the sintaxis arises. Code follows:
>         
>         
>         tc qdisc add dev $DEV root handle 1: htb default 30

Remember if $DEV is eth arp will go here.
>         
>         tc class add dev $DEV parent 1: classid 1:1 htb rate
>         ${UPLINK}kbit
>         
>         tc class add dev $DEV parent 1:1 classid 1:10 htb rate
>         ${UPLINK}kbit
>         tc class add dev $DEV parent 1:1 classid 1:20 htb rate
>         ${UPLINK}kbit
>         tc class add dev $DEV parent 1:1 classid 1:30 htb rate
>         ${UPLINK}kbit
>         tc class add dev $DEV parent 1:1 classid 1:40 htb rate
>         ${UPLINK}kbit

If you want UPLNK to be the max then children need UPLINK/4 - the parent 
will not cap it. Use ceil UPLINK aswell if you want each to be able to 
reach max when other classes are empty.
>         
>         tc qdisc add dev $DEV parent 1:10 handle 10: htb default 12

This is strange, not sure if it's what you want - you don't need another 
htb here, though it is possible it's not normal. If you just want a 
child under 1:10 then do as you do below with parent 1:10, but remember 
parents don't cap rate of children.

>         tc class add dev $DEV parent 10: classid 1:11 htb rate
>         ${UPLINK}kbit
>         prio 1


If you really want htb under htb then classid 10:11 may work.

Andy.


>         
>         RTNETLINK answers: Invalid argument
>         
>         tc class add dev $DEV parent 10: classid 1:12 htb rate
>         ${UPLINK}kbit
>         prio 2
>         
>         RTNETLINK answers: Invalid argument
>         
>         tc qdisc add dev $DEV parent 1:11 handle 11: sfq perturb 10
>         tc qdisc add dev $DEV parent 1:12 handle 12: sfq perturb 10
>         
>         ...
>         
> If I attach the classes to 1: instead of 10: everything goes well, but I
> do not understand why I can't attach a class to 10:
>         
> Any help would be appreciated.
> 
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
> 

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-30  0:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-15  8:47 [LARTC] Problem attaching htb class to a htb qdisc Ruben Porras
2007-03-30  0:15 ` Andy Furniss

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.