From: Taylor Grant <gtaylor@riverviewtech.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] deleting tc rules
Date: Thu, 21 Apr 2005 06:47:50 +0000 [thread overview]
Message-ID: <42674C96.9040500@riverviewtech.net> (raw)
In-Reply-To: <e208f5d105042013403f1a64e8@mail.gmail.com>
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
prev parent reply other threads:[~2005-04-21 6:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 20:40 [LARTC] deleting tc rules Martin Schiøtz
2005-04-21 6:47 ` Taylor Grant [this message]
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=42674C96.9040500@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--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.