From mboxrd@z Thu Jan 1 00:00:00 1970 From: Taylor Grant Date: Thu, 21 Apr 2005 06:47:50 +0000 Subject: Re: [LARTC] deleting tc rules Message-Id: <42674C96.9040500@riverviewtech.net> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org 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 l= oose all your shaping for 10.0.0.28/30 as well? B/c from what you have wri= tten "...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 th= is is exactly what you are wanting as in no shaping for the 10.0.0.0/30 net= work. That or I am miss reading you to say that there is no shaping for th= e 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 rec= ent (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=F8tz wrote: > Hi >=20 > 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) >=20 > 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. >=20 > When I for example delete rules beginning with the last added rules - > I get an error when deleting the rule for 'class': >=20 > [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=20 >=20 > If I try to delete the whole part of 'handle 104': >=20 > [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 1= 04: > [root@malinko shape_www-0.20]# tc filter del dev eth0 parent 2:22 handle = 104: protocol ip prio 5 u32 divisor 256 >=20 > 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. >=20 > Are there known bugs when deleting with tc? > Is there some way to do this? >=20 >=20 > 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 >=20 >=20 >=20 > # shaping 10.0.0.28/30 # > tc filter add dev eth0 parent 2:22 handle 102: protocol ip prio 5 u32 div= isor 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: >=20 > tc class add dev eth0 parent 2:22 classid 2:1002 htb rate 128kbit ceil 12= 8kbit 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: matc= h ip dst 10.0.0.29 flowid 2:1002 >=20 > tc class add dev eth0 parent 2:22 classid 2:1004 htb rate 128kbit ceil 12= 8kbit 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: matc= h ip dst 10.0.0.30 flowid 2:1004 >=20 > tc class add dev eth0 parent 2:22 classid 2:1006 htb rate 128kbit ceil 12= 8kbit 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: matc= h ip dst 10.0.0.31 flowid 2:1006 >=20 >=20 >=20 > # shaping 10.0.0.0/30 # > tc filter add dev eth0 parent 2:22 handle 104: protocol ip prio 5 u32 div= isor 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: >=20 > tc class add dev eth0 parent 2:22 classid 2:1008 htb rate 128kbit ceil 12= 8kbit burst 0 cburst 0 > tc qdisc add dev eth0 parent 2:1008 handle 1008: sfq perturb 4=20 > 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 >=20 > tc class add dev eth0 parent 2:22 classid 2:1010 htb rate 128kbit ceil 12= 8kbit burst 0 cburst 0 > tc qdisc add dev eth0 parent 2:1010 handle 1010: sfq perturb 4=20 > 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 >=20 > tc class add dev eth0 parent 2:22 classid 2:1012 htb rate 128kbit ceil 12= 8kbit 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