Re: [RFC][PATCH bpf-next] libbpf: add bpf_object__open_{file,mem} w/ sized opts

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

 



Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> writes:

>> Sure, LGTM! Should we still keep the bit where it expands _opts in the
>> struct name as part of the macro, or does that become too obtuse?
>
> For me it's a question of code navigation. When I'll have a code
>
> LIBBPF_OPTS(bpf_object_open, <whatever>);
>
> I'll want to jump to the definition of "bpf_object_open" (e.g., w/
> cscope)... and will find nothing, because it's actually
> bpf_object_open_opts. So I prefer user to spell it out exactly and in
> full, this is more maintainable in the long run, IMO.

That's a good point; we shouldn't break cscope!

BTW, speaking of cscope, how about having a 'make cscope' target for
libbpf to generate the definition file? :)

-Toke





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux