From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: David Vernet <void@manifault.com>
Cc: Kumar Kartikeya Dwivedi <memxor@gmail.com>,
bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@meta.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Kernel Team <kernel-team@meta.com>
Subject: Re: [PATCH bpf-next 1/3] bpf: Add __bpf_kfunc tag for marking kernel functions as kfuncs
Date: Mon, 9 Jan 2023 18:21:45 -0800 [thread overview]
Message-ID: <CAADnVQ+FLARg_qFyJtqe7sMouc2rgZAh8Md4OC+MguU61uJzjA@mail.gmail.com> (raw)
In-Reply-To: <Y7xJZv6Ncw1JSoJy@maniforge.lan>
On Mon, Jan 9, 2023 at 9:05 AM David Vernet <void@manifault.com> wrote:
> > > Maybe 3 macroses then?
> > > bpf_kfunc_start to hide __diag
> > > bpf_kfunc on the proto line
> > > bpf_kfunc_end to finish __diag_pop
>
> Ah, I see. Hmm, I guess this is better than what we have now, but is
> still a lot of macros and boilerplate which IMO is a sign we're not
> going in quite the right direction. I don't really have a better
> suggestion at this point, though I do like Kumar's suggestion below.
>
> > There's also the option of doing this:
> >
> > #define BPF_KFUNC(proto) proto; __used noinline proto
> >
> > BPF_KFUNC(void kfunc(arg1, arg2)) {
> > ...
> > }
Fine by me.
Just put { on the new line.
next prev parent reply other threads:[~2023-01-10 2:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 19:51 [PATCH bpf-next 0/3] Annotate kfuncs with new __bpf_kfunc macro David Vernet
2023-01-06 19:51 ` [PATCH bpf-next 1/3] bpf: Add __bpf_kfunc tag for marking kernel functions as kfuncs David Vernet
2023-01-07 1:04 ` Alexei Starovoitov
2023-01-07 2:09 ` David Vernet
2023-01-08 23:17 ` Alexei Starovoitov
2023-01-09 12:08 ` Kumar Kartikeya Dwivedi
2023-01-09 17:05 ` David Vernet
2023-01-10 2:21 ` Alexei Starovoitov [this message]
2023-01-06 19:51 ` [PATCH bpf-next 2/3] bpf: Document usage of the new __bpf_kfunc macro David Vernet
2023-01-06 19:51 ` [PATCH bpf-next 3/3] bpf: Add __bpf_kfunc tag to all kfuncs David Vernet
2023-01-07 0:47 ` [PATCH bpf-next 0/3] Annotate kfuncs with new __bpf_kfunc macro Stanislav Fomichev
2023-01-07 5:27 ` David Vernet
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=CAADnVQ+FLARg_qFyJtqe7sMouc2rgZAh8Md4OC+MguU61uJzjA@mail.gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@meta.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=void@manifault.com \
--cc=yhs@meta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).