On Thu, Oct 3, 2019 at 12:35 AM Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > > Andrii Nakryiko <andriin@xxxxxx> writes: > > > +/* a helper structure used by eBPF C program > > + * to describe BPF map attributes to libbpf loader > > + */ > > +struct bpf_map_def { > > + unsigned int type; > > + unsigned int key_size; > > + unsigned int value_size; > > + unsigned int max_entries; > > + unsigned int map_flags; > > +}; > > Why is this still here? There's already an identical definition in libbpf.h... > It's a BPF (kernel) side vs userspace side difference. bpf_helpers.h are included from BPF program, while libbpf.h won't work on kernel side. So we have to have a duplicate of bpf_map_def. > -Toke >