From: Jamal Hadi Salim <jhs@mojatatu•com>
To: Daniel Borkmann <daniel@iogearbox•net>, davem@davemloft•net
Cc: alexei.starovoitov@gmail•com, john.fastabend@gmail•com,
netdev@vger•kernel.org
Subject: Re: [PATCH net-next] net, cls: allow for deleting all filters for given parent
Date: Sun, 5 Jun 2016 08:24:33 -0400 [thread overview]
Message-ID: <57541A01.909@mojatatu.com> (raw)
In-Reply-To: <cd8455dfef0cccec5ef0a1ca2d1f678e9397d66e.1465056745.git.daniel@iogearbox.net>
On 16-06-04 12:24 PM, 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
> #
>
> Previously, RTM_DELTFILTER requests with invalid prio of 0 were
> rejected, so only netlink requests with RTM_NEWTFILTER and NLM_F_CREATE
> flag were allowed where the kernel would auto-generate a pref/prio.
> We can piggyback on that and use prio of 0 as a wildcard for
> requests of RTM_DELTFILTER.
>
> Signed-off-by: Daniel Borkmann <daniel@iogearbox•net>
Looks good to me.
Acked-by: Jamal Hadi Salim <jhs@mojatatu•com>
cheers,
jamal
next prev parent reply other threads:[~2016-06-05 12:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 16:24 [PATCH net-next] net, cls: allow for deleting all filters for given parent Daniel Borkmann
2016-06-05 12:24 ` Jamal Hadi Salim [this message]
2016-06-05 12:53 ` Sergei Shtylyov
2016-06-05 17:47 ` Daniel Borkmann
2016-06-06 16:41 ` Sergei Shtylyov
2016-06-06 17:12 ` Cong Wang
2016-06-06 19:25 ` Daniel Borkmann
2016-06-06 19:52 ` Cong Wang
2016-06-06 20:32 ` Daniel Borkmann
2016-06-08 21:30 ` Daniel Borkmann
2016-06-09 22:54 ` Cong Wang
2016-06-10 11:49 ` Jamal Hadi Salim
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=57541A01.909@mojatatu.com \
--to=jhs@mojatatu$(echo .)com \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=john.fastabend@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox