[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZ6--Vy5=FHDC0EiFnwF79hBz=PXKd21nSdASpfG2y7pQ@mail.gmail.com>
Date: Wed, 2 Oct 2019 09:55:51 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>
Cc: Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...com>,
Daniel Borkmann <daniel@...earbox.net>,
KP Singh <kpsingh@...omium.org>,
Kernel Team <kernel-team@...com>
Subject: Re: [RFC][PATCH bpf-next] libbpf: add bpf_object__open_{file,mem} w/
sized opts
On Tue, Oct 1, 2019 at 11:56 PM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> Andrii Nakryiko <andrii.nakryiko@...il.com> 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? :)
I'm all for it, probably both `make cscope` and `make tags`, like
Linux's make has? Feel free to add them, I can also replicate it to
Github's Makefile after that.
>
> -Toke
>
Powered by blists - more mailing lists