[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5082193f-0b59-bc40-290f-4ef3709a1d26@fb.com>
Date: Mon, 2 Oct 2017 16:07:37 -0700
From: Alexei Starovoitov <ast@...com>
To: Craig Gallek <kraigatgoog@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <brouer@...hat.com>,
"David S . Miller" <davem@...emloft.net>
CC: Chonggang Li <chonggangli@...gle.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 1/2] libbpf: parse maps sections of varying
size
On 10/2/17 9:41 AM, Craig Gallek wrote:
> + /* Assume equally sized map definitions */
> + map_def_sz = data->d_size / nr_maps;
> + if (!data->d_size || (data->d_size % nr_maps) != 0) {
> + pr_warning("unable to determine map definition size "
> + "section %s, %d maps in %zd bytes\n",
> + obj->path, nr_maps, data->d_size);
> + return -EINVAL;
> + }
this approach is not as flexible as done by samples/bpf/bpf_load.c
where it looks at every map independently by walking symtab,
but I guess it's ok.
I'd like to hear what Daniel and Jesper say,
since we really want to move to libbpf.a in samples/bpf/
and loader has to get to parity with the one in samples.
Powered by blists - more mailing lists