From: Jamal Hadi Salim <jhs@mojatatu•com>
To: Daniel Borkmann <daniel@iogearbox•net>,
Alexei Starovoitov <ast@plumgrid•com>,
"David S. Miller" <davem@davemloft•net>
Cc: John Fastabend <john.fastabend@gmail•com>, netdev@vger•kernel.org
Subject: Re: [PATCH v2 net-next 1/2] cls_bpf: introduce integrated actions
Date: Fri, 18 Sep 2015 08:04:04 -0400 [thread overview]
Message-ID: <55FBFDB4.30908@mojatatu.com> (raw)
In-Reply-To: <55FABC7B.6060502@iogearbox.net>
Hi Daniel,
On 09/17/15 09:13, Daniel Borkmann wrote:
> Hmm, I don't really agree. With cls_bpf you have non-linear
> classifications as opposed to walking a chain of classifiers:
A chain of classifiers is a better description today (non-linear would
be an appropriate description before cls_bpf ;->).
> worst case, I have to walk through N classifiers just to find
> out that the last one matches that I need to drop - this doesn't
> scale at all.
The scaling reason with that posted example is not
a strong one. You can get good performance with any classifier
for that policy description.
F.E with Alexei's second best classifier:->:
tc filter add dev eth0 parent ffff: protocol arp prio 1 u32\
match all ..
tc filter add dev eth0 parent ffff: protocol ip prio 1 u32\
...
But I do get the gist of your arguement otherwise and some
short circuits are ok as you had earlier.
>Given that we can make this decision right here,
> we can use this fact and have simple return codes provided as
> well.
I think it makes sense for the simple case.
But you have every other opcode in there, not just basic
accept/drop. I am worried this is leading towards an
enclave of bpf do-everything.
cheers,
jamal
next prev parent reply other threads:[~2015-09-18 12:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 6:05 [PATCH v2 net-next 0/2] bpf: performance improvements Alexei Starovoitov
2015-09-16 6:05 ` [PATCH v2 net-next 1/2] cls_bpf: introduce integrated actions Alexei Starovoitov
2015-09-17 12:37 ` Jamal Hadi Salim
2015-09-17 13:13 ` Daniel Borkmann
2015-09-17 15:19 ` Alexei Starovoitov
2015-09-18 12:13 ` Jamal Hadi Salim
2015-09-18 12:51 ` Daniel Borkmann
2015-09-18 12:04 ` Jamal Hadi Salim [this message]
2015-09-16 6:05 ` [PATCH v2 net-next 2/2] bpf: add bpf_redirect() helper Alexei Starovoitov
2015-09-16 6:45 ` John Fastabend
2015-09-18 4:10 ` [PATCH v2 net-next 0/2] bpf: performance improvements David Miller
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=55FBFDB4.30908@mojatatu.com \
--to=jhs@mojatatu$(echo .)com \
--cc=ast@plumgrid$(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