Skip to contentSkip to conversation

tc class change.... for CBQ rate control

LARTC yuxiao 1 participant 1 message Oct 8, 2002

lore
Share & tools
lore

yuxiao

author
#0 lore raw

Hi stef;

I do two testings about bounded and CBQ rate control.

1. The first script is that I give inital EF bandwidth (6Mbit, bounded), BE (4Mbit, borrow), the total is 10Mbit( bounded), Late, I change the reservation of EF every 5 min.
for example.
I use "tc class change dev eth1 .....8Mbit......." change EF from 6Mbit to 8Mbit,
then I run "tc class ls dev eth1" to see, EF bw is indeed to change to 8Mbit, but BE doen't change

question:
Since BE can borrow, when EF change bw, how I can let BE change its's bw as
well automatically. (EF and BE shift resource)

2. The second case I test "bounded for EF" , again, interface 100Mbit, the sum of EF+BE is 10Mbit(bounded). But it seems doen't workI don't know why

My script for this testing is following, take from
http://dsmpls.atlantis.rug.ac.be/

#!/bin/bash
# This script will set-up an example DS tree

TC=/usr/local/bin/tc

$TC qdisc add dev eth1 root handle 1:0 dsmark indices 64 default_index 0 #tcindex classid 2.2 #set_tc_index

$TC filter add dev eth1 parent 1:0 protocol ip tcindex mask 0xfc shift 2

$TC filter add dev eth1 parent 1:0 protocol ip prio 1 tcindex mask 0xfc shift
2 pass_on

# Second a CBQ qdisc is used in order to support EF, and BE classes $TC qdisc add dev eth1 parent 1:0 handle 2:0 cbq bandwidth 100Mbit cell 8 avpkt 1000 mpu 64
$TC filter add dev eth1 parent 2:0 protocol ip prio 1 tcindex mask 0xf0 shift
4 pass_on

# add interior layer of CBQ to limit total traffic for EF and BE is 10Mbit
$TC class add dev $i parent 2:0 classid 2:1 cbq bandwidth 100Mbit rate
10Mbit \
    avpkt 1000 prio 8 allot 1514 weight 1Mbit cell 8 maxburst 21 bounded

## Definition of the CBQ leaf classes to support EF and BE
## EF class
$TC class add dev eth1 parent 2:1 classid 2:5 cbq bandwidth 100Mbit rate 6Mbit
avpkt 1000 prio 1 bounded allot 1514 weight 600kbit maxburst 10 defmap 0
$TC qdisc add dev eth1 parent 2:5 pfifo limit 10
$TC filter add dev eth1 parent 1:0 protocol ip prio 1 handle 0x2e tcindex classid 1:151
$TC filter add dev eth1 parent 2:0 protocol ip prio 1 handle 5 tcindex classid
2:5

## BE class specific setup
$TC class add dev eth1 parent 2:1 classid 2:6 cbq bandwidth 100Mbit rate 3Mbit
avpkt 1000 prio 7 allot 1514 weight 300kbit maxburst 21 borrow
$TC qdisc add dev eth1 parent 2:6 red limit 600KB min 150KB max 450KB burst
200 avpkt 1000 bandwidth 100Mbit probability 0.4
$TC filter add dev eth1 parent 1:0 protocol ip prio 1 handle 0x0 tcindex classid 1:161
$TC filter add dev eth1 parent 2:0 protocol ip prio 1 handle 6 tcindex classid
2:6

## OSPF - RSVP Pipe class specific setup
$TC class add dev eth1 parent 2:1 classid 2:7 cbq bandwidth 100Mbit rate 1Mbit
avpkt 1000 prio 1 bounded allot 1514 weight 100kbit maxburst 10 defmap
0
$TC qdisc add dev eth1 parent 2:5 pfifo limit 10
$TC filter add dev eth1 parent 1:0 protocol ip prio 1 handle 0x30 tcindex classid 1:171
$TC filter add dev eth1 parent 2:0 protocol ip prio 1 handle 7 tcindex classid
2:7

For BE class, no matter overlimt, underlimi, at limt, seemd fine, but for EF class, bounded doesn't work, still can borrow bandwidth from BE?

I show two case in my testing

A: First case, I send BE traffic underlimt, 2Mbit (initial allocation is 3Mbit). For EF, inital allocaion is 6Mbit, the sum of EF+BE is 10Mbit, since CBQ not accurate, The measue result for sum is 12Mbit

sender (EF) EF measure (actual) BE measure (actual)

2M 2M 2M

4M 4.1M 2M

6M 6.2M 2M

8M 8.3M 2M

10M 9.7M 2M

15M 9.7M 2M

20M 9.7M 2M

I think since EF is bounded, when you send more traffic >6Mbit, should drop, but seems it borrow some bandwidth for BE or his parent...??

B: second case is when BE overlimt , I send BE 20Mbit

sender(EF) EF measure (actual) BE measure (actual)

3M 3M 8.7M

4M 4.1M 7.6M

6M 6.2M 5.5M

7M 5.9M 5.9M

8M 5.9M 5.9M

10M 5.9M 5.9M

15M 5.9M 5.9M

in this case, after EF overlimit, he drop, keep max assigned BW (6Mbit), BE share the remaining BW. I think it is correct.

Can you tell me why bounded for EF doesn't work?

thanks for your help

regards,

yuxiao

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