From: "Martin Schiøtz" <malinux@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] deleting tc rules
Date: Wed, 20 Apr 2005 20:40:25 +0000 [thread overview]
Message-ID: <e208f5d105042013403f1a64e8@mail.gmail.com> (raw)
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
next reply other threads:[~2005-04-20 20:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 20:40 Martin Schiøtz [this message]
2005-04-21 6:47 ` [LARTC] deleting tc rules Taylor Grant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e208f5d105042013403f1a64e8@mail.gmail.com \
--to=malinux@gmail.com \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.