From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@plumgrid.com>,
David Miller <davem@davemloft.net>
Cc: tgraf@suug.ch, jiri@resnulli.us, netdev@vger.kernel.org
Subject: Re: [PATCH v3 net-next 2/2] tc: add 'needs_l2' flag to ingress qdisc
Date: Fri, 10 Apr 2015 07:49:45 -0400 [thread overview]
Message-ID: <5527B8D9.6030606@mojatatu.com> (raw)
In-Reply-To: <55269CEE.5040406@iogearbox.net>
On 04/09/15 11:38, Daniel Borkmann wrote:
> On 04/09/2015 12:49 PM, Jamal Hadi Salim wrote:
> ...
>> Your changes penalize everyone else because of this assumption
>> bpf makes. We have always tried to be sensitive to perfomance.
>
> That includes also BPF, right? ;)
Yes, of course - we are trying to reach some conclusion i hope. I
have no qualms on ebpf; but I have concerns for other users of tc.
If the whole world is suddenly going to shift to ebpf then it is
easy to make a call. I doubt that will _ever_ happen.
As a new kid on the block ebpf needs to provide a strong case for
making such changes which affect everyone else.
It is not a simple "fix" that Alexei posted that will suffice to
make everything on ingress appear at offset 0. I am afraid, a lot
more intrusion will be needed (and we have avoided it all these
years).
> I mean you'd need to push extra
> unneeded per-packet instructions down into the interpreter and
> JITs that neither the output path needs in case of {cls,act}_bpf,
> and generally other users working on skbs such as team driver, all
> possible kind of sockets with filters attached, xt_bpf, etc, etc
> just to accommodate for the ingress use-case. I mean I understand
> your concern, but making BPF cls/act responsible for that knowledge
> has it's downsides just as well.
>
The main downside is usability for someone who wants to write code
that is inserted in the kernel. They have to know whether their code
will run on ingress or egress and the type of device etc.
The AT_XXX provides that signal and dev->type fills in the other gap.
Such coders i hope will have enough knowledge. It is close to
someone writing netfilter hooks needing to know that something is
at post/pre-routing etc
> Moreover, we'd enforce user space to start programming with
> unintuitive negative offsets when accessing mac layer, and cls_bpf
> at least, since it's around for some time, would need to start
> differentiating between classic and native eBPF to keep compat
> with old BPF programs for the output path. That's pretty messy. :/
I agree that user facing usability issues need to be addressed but that
is not the same as someone writing ebpf code.
The negative offset presentation to the user does look ugly. You can
teach tc for the case of u32 to hide that from the user.
cheers,
jamal
next prev parent reply other threads:[~2015-04-10 12:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 23:26 [PATCH v3 net-next 1/2] net: introduce skb_postpush_rcsum() helper Alexei Starovoitov
2015-04-08 23:26 ` [PATCH v3 net-next 2/2] tc: add 'needs_l2' flag to ingress qdisc Alexei Starovoitov
2015-04-09 2:44 ` David Miller
2015-04-09 3:05 ` Alexei Starovoitov
2015-04-09 3:14 ` David Miller
2015-04-09 3:39 ` Alexei Starovoitov
2015-04-09 5:20 ` Alexei Starovoitov
2015-04-09 5:25 ` David Miller
2015-04-09 15:15 ` Daniel Borkmann
2015-04-09 15:36 ` Eric Dumazet
2015-04-09 17:20 ` Alexei Starovoitov
2015-04-09 10:49 ` Jamal Hadi Salim
2015-04-09 11:02 ` Jamal Hadi Salim
2015-04-09 15:38 ` Daniel Borkmann
2015-04-10 11:49 ` Jamal Hadi Salim [this message]
2015-04-09 17:03 ` Alexei Starovoitov
2015-04-10 12:48 ` Jamal Hadi Salim
2015-04-10 22:35 ` Alexei Starovoitov
2015-04-13 14:28 ` Jamal Hadi Salim
2015-04-13 16:13 ` Alexei Starovoitov
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=5527B8D9.6030606@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=ast@plumgrid.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.