From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mihai RUSU Date: Wed, 10 Apr 2002 08:28:39 +0000 Subject: Re: [LARTC] deleting specific filters/classes Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On Tue, 9 Apr 2002, Mihai RUSU wrote: > Hi > > I have a cbq setup with all the filters in tha root class. > If I try to delete a class with the following line: > tc class del dev eth0 classid 1:1000 > it says: > RTNETLINK answers: Device or resource busy > > Is this because I have filters (not with parent this class) with flowid > this class? > > If so, then I tried to delete a specific filter. The tc filter show dev > eth0 command shows me what I have to delete but if I try something like > this: > > tc filter del dev eth0 handle 2:a5:809 > it says: > RTNETLINK answers: No such file or directory > > But 2:a5:809 exists and is on dev eth0... > > Help ?! > > :) > Hi I have found a/the solution. Maybe it would be cool to be included in the HOWTO. To delete a specific filter you can use: tc filter del dev pref handle ex. tc filter del dev eth0 pref 5 handle 800::801 u32 To find out the filter handle you can use tc filter show. I noticed that this handles are structured like this: :: To delete a specific class first of all you have to delete all the filters that point to that class (flowid ) and also all the other classes that are linked to this one (child classes). Then you can use this command: tc class del dev eth0 classid ex. tc class del dev eth0 classid 1:20 The only exception to this are the qdisc. They can be deleted no matter if you have classes to a classful qdisc, filters atached to that classes etc... To delete a qdisc one can use: tc qdisc del dev eth0 [parent | root] Its strange that it doesnt work with "handle" to specify the qdisc handle but it works with the parent handle ;) ---------------------------- Mihai RUSU Disclaimer: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of any company, unless otherwise specifically stated. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/