From: Daniel Borkmann <daniel-FeC+5ew28dpmcu3hnIyYJQ@public•gmane.org>
To: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public•gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public•gmane.org>
Cc: Thomas Graf <tgraf-G/eBtMaohhA@public•gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
Subject: Re: [PATCH v2 net-next 1/2] bpf: allow extended BPF programs access skb fields
Date: Sun, 15 Mar 2015 00:51:37 +0100 [thread overview]
Message-ID: <5504C989.8000800@iogearbox.net> (raw)
In-Reply-To: <550459E4.1050808-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
On 03/14/2015 04:55 PM, Alexei Starovoitov wrote:
...
> so from there I saw two options: either copy paste all
> build_bug_on and have the same *insn=... and build_bug_on in
> two places or consolidate them in single helper function.
> Obviously single helper function is a preferred method.
> I'm not sure what are you still arguing about.
I'm repeating myself here, but fair enough. To me the v1
code in sk_filter_convert_ctx_access() was more sound. So
taking out the ifindex issue, that's 4 BUILD_BUG_ON()s in
addition.
I actually think the current filter code is in a reasonable
shape. convert_bpf_extensions() is full of BPF to eBPF
conversions, so going over convert_bpf_extensions() some of
them would now use convert_skb_access(), some other ``skb
accesses''use macros directly in place, the reading-flow of
this code now is inconsistent to me and it would have been
more sound if that's just left as is in convert_bpf_extensions().
I'm all for consolidating code, don't get me wrong, but I
think this exception would be better for above sake. That's
all I'm trying to say. I understand you're of exact opposite
opinion, so I guess it's pointless for me to comment any
further on this.
Thanks,
Daniel
next prev parent reply other threads:[~2015-03-14 23:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 18:57 [PATCH v2 net-next 0/2] bpf: allow eBPF access skb fields Alexei Starovoitov
2015-03-13 18:57 ` [PATCH v2 net-next 1/2] bpf: allow extended BPF programs " Alexei Starovoitov
[not found] ` <1426273064-4837-2-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-03-14 1:46 ` Daniel Borkmann
[not found] ` <550392F7.9040308-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-03-14 2:06 ` Daniel Borkmann
2015-03-14 2:08 ` Alexei Starovoitov
2015-03-14 2:16 ` Daniel Borkmann
[not found] ` <55039A0D.20000-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-03-14 2:27 ` Alexei Starovoitov
2015-03-14 4:59 ` Alexei Starovoitov
2015-03-14 9:35 ` Daniel Borkmann
[not found] ` <550400D8.5060407-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-03-14 15:55 ` Alexei Starovoitov
[not found] ` <550459E4.1050808-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-03-14 23:51 ` Daniel Borkmann [this message]
2015-03-15 2:02 ` Alexei Starovoitov
2015-03-14 2:07 ` Alexei Starovoitov
2015-03-13 18:57 ` [PATCH v2 net-next 2/2] samples: bpf: add skb->field examples and tests Alexei Starovoitov
[not found] ` <1426273064-4837-1-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-03-16 2:03 ` [PATCH v2 net-next 0/2] bpf: allow eBPF access skb fields 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=5504C989.8000800@iogearbox.net \
--to=daniel-fec+5ew28dpmcu3hniyyjq@public$(echo .)gmane.org \
--cc=ast-uqk4Ao+rVK5Wk0Htik3J/w@public$(echo .)gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public$(echo .)gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=tgraf-G/eBtMaohhA@public$(echo .)gmane.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