Re: [PATCH bpf-next v6 03/11] bpf: Populate kfunc BTF ID sets in struct btf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 6, 2022 at 12:59 AM Kumar Kartikeya Dwivedi
<memxor@xxxxxxxxx> wrote:
>
> I'm not insisting, but for vmlinux we will have multiple
> register_btf_kfunc_id_set calls for same hook, so we have to concat multiple
> sets into one, which may result in an unsorted set. It's ok to not sort for
> modules where only one register call per hook is allowed.
>
> Unless we switch to linear search for now (which is ok by me), we have to
> re-sort for vmlinux BTF, to make btf_id_set_contains (in
> btf_kfunc_id_set_contains) work.

Could you give an example when it happens in vmlinux?
Is it when modules are built-in (like tcp_bbr.c, tcp_cubic.c) ?
But then they should go into struct btf of the module?
Or THIS_MODULE becomes vmlinux and everything goes there?
If that's the case then yeah, sorting is needed.
Please make it clear in the comment and the commit log.
It should be clear to reviewers without having to grill the author
with questions.
Would certainly save time for both author and reviewer. Agree?



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux