Messages in this thread | | | From | Alexei Starovoitov <> | Date | Mon, 9 Jan 2023 18:21:45 -0800 | Subject | Re: [PATCH bpf-next 1/3] bpf: Add __bpf_kfunc tag for marking kernel functions as kfuncs |
| |
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.
| |