All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] deleting specific filters/classes
@ 2002-04-09 13:58 Mihai RUSU
  2002-04-10  8:28 ` Mihai RUSU
  0 siblings, 1 reply; 2+ messages in thread
From: Mihai RUSU @ 2002-04-09 13:58 UTC (permalink / raw)
  To: lartc

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 ?!

:)

----------------------------
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LARTC] deleting specific filters/classes
  2002-04-09 13:58 [LARTC] deleting specific filters/classes Mihai RUSU
@ 2002-04-10  8:28 ` Mihai RUSU
  0 siblings, 0 replies; 2+ messages in thread
From: Mihai RUSU @ 2002-04-10  8:28 UTC (permalink / raw)
  To: lartc

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 <device> pref <priority> handle <filterhandle> <filtertype>

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:
<hashtableid>:<hashoffset>:<localoffset>

To delete a specific class first of all you have to delete all the filters
that point to that class (flowid <classid>) 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 <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 <parentid> | 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-10  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-09 13:58 [LARTC] deleting specific filters/classes Mihai RUSU
2002-04-10  8:28 ` Mihai RUSU

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.