Subject: Re: [PATCH bpf-next] libbpf: add a bunch of attribute getters/setters for map definitions

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Mon, 22 Jun 2020 14:25:32 +0200

Andrii Nakryiko <[email-masked]> writes:

> Add a bunch of getter for various aspects of BPF map. Some of these attribute
> (e.g., key_size, value_size, type, etc) are available right now in struct
> bpf_map_def, but this patch adds getter allowing to fetch them individually.
> bpf_map_def approach isn't very scalable, when ABI stability requirements are
> taken into account. It's much easier to extend libbpf and add support for new
> features, when each aspect of BPF map has separate getter/setter.

+1, good idea!

Acked-by: Toke Høiland-Jørgensen <[email-masked]>