* [LARTC] deleting tc rules
@ 2005-04-20 20:40 Martin Schiøtz
2005-04-21 6:47 ` Taylor Grant
0 siblings, 1 reply; 2+ messages in thread
From: Martin Schiøtz @ 2005-04-20 20:40 UTC (permalink / raw)
To: lartc
Hi
I'm doing traffic shaping with tc on '10.0.0.0/30' and '10.0.0.28/30'.
I want to delete part of shaping rules on the fly. (see my
configuration at the end of this mail)
I wan't to delete the shaping for '10.0.0.0/30' on the fly while still
keeping the shaping for part '10.0.0.28/30' running.
When I for example delete rules beginning with the last added rules -
I get an error when deleting the rule for 'class':
[root@malinko shape_www-0.20]# tc filter del dev eth0 protocol ip prio
5 parent 2:22 u32 ht 104:3: match ip dst 10.0.0.3 flowid 2:1012
[root@malinko shape_www-0.20]# tc qdisc del dev eth0 parent 2:1012
handle 1012: sfq perturb 4
[root@malinko shape_www-0.20]# tc class del dev eth0 parent 2:22
classid 2:1012 htb rate 128kbit ceil 128kbit burst 0 cburst 0
RTNETLINK answers: Device or resource busy
If I try to delete the whole part of 'handle 104':
[root@malinko shape_www-0.20]# tc filter del dev eth0 protocol ip prio
5 parent 2: u32 match ip dst 10.0.0.0/30 hashkey mask 0x000000ff at 16
link 104:
[root@malinko shape_www-0.20]# tc filter del dev eth0 parent 2:22
handle 104: protocol ip prio 5 u32 divisor 256
Here there is no error but all filter rules is deleted also filter
rules for '10.0.0.0/30' and a have no shaping at all.
Are there known bugs when deleting with tc?
Is there some way to do this?
This is my test configation:
---------------------------------------
# shaping eth0 trunk
tc qdisc add dev eth0 root handle 2: htb
tc class add dev eth0 parent 2: classid 2:22 htb rate 34mbit ceil
34mbit burst 0kbit cburst 0kbit
tc filter add dev eth0 parent 2:22 protocol ip prio 5 u32
# shaping 10.0.0.28/30 #
tc filter add dev eth0 parent 2:22 handle 102: protocol ip prio 5 u32
divisor 256
tc filter add dev eth0 protocol ip prio 5 parent 2: u32 match ip dst
10.0.0.28/30 hashkey mask 0x000000ff at 16 link 102:
tc class add dev eth0 parent 2:22 classid 2:1002 htb rate 128kbit ceil
128kbit burst 0 cburst 0
tc qdisc add dev eth0 parent 2:1002 handle 1002: sfq perturb 4
tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 102:1d:
match ip dst 10.0.0.29 flowid 2:1002
tc class add dev eth0 parent 2:22 classid 2:1004 htb rate 128kbit ceil
128kbit burst 0 cburst 0
tc qdisc add dev eth0 parent 2:1004 handle 1004: sfq perturb 4
tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 102:1e:
match ip dst 10.0.0.30 flowid 2:1004
tc class add dev eth0 parent 2:22 classid 2:1006 htb rate 128kbit ceil
128kbit burst 0 cburst 0
tc qdisc add dev eth0 parent 2:1006 handle 1006: sfq perturb 4
tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 102:1f:
match ip dst 10.0.0.31 flowid 2:1006
# shaping 10.0.0.0/30 #
tc filter add dev eth0 parent 2:22 handle 104: protocol ip prio 5 u32
divisor 256
tc filter add dev eth0 protocol ip prio 5 parent 2: u32 match ip dst
10.0.0.0/30 hashkey mask 0x000000ff at 16 link 104:
tc class add dev eth0 parent 2:22 classid 2:1008 htb rate 128kbit ceil
128kbit burst 0 cburst 0
tc qdisc add dev eth0 parent 2:1008 handle 1008: sfq perturb 4
tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 104:1:
match ip dst 10.0.0.1 flowid 2:1008
tc class add dev eth0 parent 2:22 classid 2:1010 htb rate 128kbit ceil
128kbit burst 0 cburst 0
tc qdisc add dev eth0 parent 2:1010 handle 1010: sfq perturb 4
tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 104:2:
match ip dst 10.0.0.2 flowid 2:1010
tc class add dev eth0 parent 2:22 classid 2:1012 htb rate 128kbit ceil
128kbit burst 0 cburst 0
tc qdisc add dev eth0 parent 2:1012 handle 1012: sfq perturb 4
tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 104:3:
match ip dst 10.0.0.3 flowid 2:1012
Best regards,
Martin
_______________________________________________
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] deleting tc rules
2005-04-20 20:40 [LARTC] deleting tc rules Martin Schiøtz
@ 2005-04-21 6:47 ` Taylor Grant
0 siblings, 0 replies; 2+ messages in thread
From: Taylor Grant @ 2005-04-21 6:47 UTC (permalink / raw)
To: lartc
Martin, did you mean to say that when you delete handle 104: (tc filter del dev eth0 parent 2:22 handle 104: protocol ip prio 5 u32 divisor 256) you loose all your shaping for 10.0.0.28/30 as well? B/c from what you have written "...Here there is no error but all filter rules is deleted also filter rules for '10.0.0.0/30' and a have no shaping at all..." it sounds like this is exactly what you are wanting as in no shaping for the 10.0.0.0/30 network. That or I am miss reading you to say that there is no shaping for the eth0 device at all. I personally don't know of any bugs in the tc code, but you might want to cross post to the devl mail list. Have you tried recent (latest / beta) versions of tc / IPRoute2?
Sorry, I know that this is not much help, but it is the best that I can do.
Grant. . . .
Martin Schiøtz wrote:
> Hi
>
> I'm doing traffic shaping with tc on '10.0.0.0/30' and '10.0.0.28/30'.
> I want to delete part of shaping rules on the fly. (see my
> configuration at the end of this mail)
>
> I wan't to delete the shaping for '10.0.0.0/30' on the fly while still
> keeping the shaping for part '10.0.0.28/30' running.
>
> When I for example delete rules beginning with the last added rules -
> I get an error when deleting the rule for 'class':
>
> [root@malinko shape_www-0.20]# tc filter del dev eth0 protocol ip prio 5 parent 2:22 u32 ht 104:3: match ip dst 10.0.0.3 flowid 2:1012
> [root@malinko shape_www-0.20]# tc qdisc del dev eth0 parent 2:1012 handle 1012: sfq perturb 4
> [root@malinko shape_www-0.20]# tc class del dev eth0 parent 2:22 classid 2:1012 htb rate 128kbit ceil 128kbit burst 0 cburst 0
> RTNETLINK answers: Device or resource busy
>
> If I try to delete the whole part of 'handle 104':
>
> [root@malinko shape_www-0.20]# tc filter del dev eth0 protocol ip prio 5 parent 2: u32 match ip dst 10.0.0.0/30 hashkey mask 0x000000ff at 16 link 104:
> [root@malinko shape_www-0.20]# tc filter del dev eth0 parent 2:22 handle 104: protocol ip prio 5 u32 divisor 256
>
> Here there is no error but all filter rules is deleted also filter
> rules for '10.0.0.0/30' and a have no shaping at all.
>
> Are there known bugs when deleting with tc?
> Is there some way to do this?
>
>
> This is my test configation:
> ---------------------------------------
> # shaping eth0 trunk
> tc qdisc add dev eth0 root handle 2: htb
> tc class add dev eth0 parent 2: classid 2:22 htb rate 34mbit ceil 34mbit burst 0kbit cburst 0kbit
> tc filter add dev eth0 parent 2:22 protocol ip prio 5 u32
>
>
>
> # shaping 10.0.0.28/30 #
> tc filter add dev eth0 parent 2:22 handle 102: protocol ip prio 5 u32 divisor 256
> tc filter add dev eth0 protocol ip prio 5 parent 2: u32 match ip dst 10.0.0.28/30 hashkey mask 0x000000ff at 16 link 102:
>
> tc class add dev eth0 parent 2:22 classid 2:1002 htb rate 128kbit ceil 128kbit burst 0 cburst 0
> tc qdisc add dev eth0 parent 2:1002 handle 1002: sfq perturb 4
> tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 102:1d: match ip dst 10.0.0.29 flowid 2:1002
>
> tc class add dev eth0 parent 2:22 classid 2:1004 htb rate 128kbit ceil 128kbit burst 0 cburst 0
> tc qdisc add dev eth0 parent 2:1004 handle 1004: sfq perturb 4
> tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 102:1e: match ip dst 10.0.0.30 flowid 2:1004
>
> tc class add dev eth0 parent 2:22 classid 2:1006 htb rate 128kbit ceil 128kbit burst 0 cburst 0
> tc qdisc add dev eth0 parent 2:1006 handle 1006: sfq perturb 4
> tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 102:1f: match ip dst 10.0.0.31 flowid 2:1006
>
>
>
> # shaping 10.0.0.0/30 #
> tc filter add dev eth0 parent 2:22 handle 104: protocol ip prio 5 u32 divisor 256
> tc filter add dev eth0 protocol ip prio 5 parent 2: u32 match ip dst 10.0.0.0/30 hashkey mask 0x000000ff at 16 link 104:
>
> tc class add dev eth0 parent 2:22 classid 2:1008 htb rate 128kbit ceil 128kbit burst 0 cburst 0
> tc qdisc add dev eth0 parent 2:1008 handle 1008: sfq perturb 4
> tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 104:1: match ip dst 10.0.0.1 flowid 2:1008
>
> tc class add dev eth0 parent 2:22 classid 2:1010 htb rate 128kbit ceil 128kbit burst 0 cburst 0
> tc qdisc add dev eth0 parent 2:1010 handle 1010: sfq perturb 4
> tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 104:2: match ip dst 10.0.0.2 flowid 2:1010
>
> tc class add dev eth0 parent 2:22 classid 2:1012 htb rate 128kbit ceil 128kbit burst 0 cburst 0
> tc qdisc add dev eth0 parent 2:1012 handle 1012: sfq perturb 4
> tc filter add dev eth0 protocol ip prio 5 parent 2:22 u32 ht 104:3: match ip dst 10.0.0.3 flowid 2:1012
_______________________________________________
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:[~2005-04-21 6:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-20 20:40 [LARTC] deleting tc rules Martin Schiøtz
2005-04-21 6:47 ` Taylor Grant
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.