[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190124105940.34425143@cakuba.netronome.com>
Date: Thu, 24 Jan 2019 10:59:40 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Maciej Fijałkowski
<maciejromanfijalkowski@...il.com>
Cc: Jesper Dangaard Brouer <brouer@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>, ast@...nel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 2/8] libbpf: Add a helper for retrieving a
prog via index
On Thu, 24 Jan 2019 19:27:35 +0100, Maciej Fijałkowski wrote:
> > > can live with this. In case of typo and program being not found it would be
> > > good to print out the section names to choose from in usage().
> >
> > Agree, might be nice as well via libbpf.
>
> Would it be acceptable to print them from within libbpf? Something as trivial
> as:
> void
> bpf_object__print_type_sections(struct bpf_object *obj,
> enum bpf_prog_type type)
> {
> struct bpf_program *prog;
>
> bpf_object__for_each_program(prog, obj) {
> if (bpf_program__is_type(prog, type))
> pr_info("section %s\n", prog->section_name);
> }
> }
Better not.
> Or do we want to add a accessor for section_name and go through programs in
> application?
bpf_program__title(), no?
Powered by blists - more mailing lists