From: Alexei Starovoitov <ast@plumgrid.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>
Cc: Thomas Graf <tgraf@suug.ch>,
linux-api@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net-next 1/2] bpf: allow extended BPF programs access skb fields
Date: Fri, 13 Mar 2015 21:59:43 -0700 [thread overview]
Message-ID: <5503C03F.8020903@plumgrid.com> (raw)
In-Reply-To: <55039C9D.6010602@plumgrid.com>
On 3/13/15 7:27 PM, Alexei Starovoitov wrote:
> On 3/13/15 7:16 PM, Daniel Borkmann wrote:
>> On 03/14/2015 03:08 AM, Alexei Starovoitov wrote:
>>> On 3/13/15 7:06 PM, Daniel Borkmann wrote:
>>>> On 03/14/2015 02:46 AM, Daniel Borkmann wrote:
>>>> ...
>>>>> Previously, it was much more consistent, which I like better. And only
>>>>> because of the simple BUILD_BUG_ON()? :/
>>>>
>>>> Alternative is to move all of them into a central place, something like
>>>> in twsk_build_assert() or __mld2_query_bugs[].
>>>
>>> nope. that defeats the purpose of bug_on.
>>
>> Well, it doesn't. ;) It throws a build error thus the user is forced to
>> investigate that further.
>
> according to this distorted logic all build_bug_on can be in one file
> across the whole tree, since 'user is forced to investigate' ?!
also note that this case and twsk_build_assert are different.
twsk_build_assert has no other choice then to have one function
that covers logic in the whole file, whereas in this patch:
+ BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, mark) != 4);
+ *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg,
+ offsetof(struct sk_buff, mark));
the build_bug_on protect the line directly below.
Separating them just doesn't make sense at all.
next prev parent reply other threads:[~2015-03-14 4:59 UTC|newest]
Thread overview: 22+ 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 ` 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
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: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 2:27 ` Alexei Starovoitov
2015-03-14 4:59 ` Alexei Starovoitov [this message]
2015-03-14 9:35 ` Daniel Borkmann
[not found] ` <550400D8.5060407-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-03-14 15:55 ` Alexei Starovoitov
2015-03-14 15:55 ` Alexei Starovoitov
[not found] ` <550459E4.1050808-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-03-14 23:51 ` Daniel Borkmann
2015-03-14 23:51 ` Daniel Borkmann
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
2015-03-16 2:03 ` 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=5503C03F.8020903@plumgrid.com \
--to=ast@plumgrid.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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.