[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160611003117.GA87076@ast-mbp.thefacebook.com>
Date: Fri, 10 Jun 2016 17:31:20 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: davem@...emloft.net, xiyou.wangcong@...il.com, jhs@...atatu.com,
john.fastabend@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] net, cls: allow for deleting all filters for
given parent
On Fri, Jun 10, 2016 at 11:10:22PM +0200, Daniel Borkmann wrote:
> Add a possibility where the user can just specify the parent and
> all filters under that parent are then being purged. Currently,
> for example for scripting, one needs to specify pref/prio to have
> a well-defined number for 'tc filter del' command for addressing
> the previously created instance or additionally filter handle in
> case of priorities being the same. Improve usage by allowing the
> option for tc to specify the parent and removing the whole chain
> for that given parent.
>
> Example usage after patch, no tc changes required:
>
> # tc qdisc replace dev foo clsact
> # tc filter add dev foo egress bpf da obj ./bpf.o
> # tc filter add dev foo egress bpf da obj ./bpf.o
> # tc filter show dev foo egress
> filter protocol all pref 49151 bpf
> filter protocol all pref 49151 bpf handle 0x1 bpf.o:[classifier] direct-action
> filter protocol all pref 49152 bpf
> filter protocol all pref 49152 bpf handle 0x1 bpf.o:[classifier] direct-action
> # tc filter del dev foo egress
> # tc filter show dev foo egress
> #
useful feature. thanks!
Acked-by: Alexei Starovoitov <ast@...nel.org>
Powered by blists - more mailing lists