Re: [PATCH bpf-next 1/2] libbpf: Introduce bpf_map__resize

2019-02-14 Thread Yonghong Song
On 2/14/19 3:01 PM, Andrey Ignatov wrote: > Add bpf_map__resize() to change max_entries for a map. > > Quite often necessary map size is unknown at compile time and can be > calculated only at run time. > > Currently the following approach is used to do so: > * bpf_object__open_buffer() to open

[PATCH bpf-next 1/2] libbpf: Introduce bpf_map__resize

2019-02-14 Thread Andrey Ignatov
Add bpf_map__resize() to change max_entries for a map. Quite often necessary map size is unknown at compile time and can be calculated only at run time. Currently the following approach is used to do so: * bpf_object__open_buffer() to open Elf file from a buffer; * bpf_object__find_map_by_name()