Subject: Re: [BUG] bpf is broken in net-next

From: Stephen Hemminger <[email-masked]>
Date: Mon, 2 Oct 2017 07:52:30 -0700

On Sun, 1 Oct 2017 18:34:25 -0700
Alexei Starovoitov <[email-masked]> wrote:

> On Sun, Oct 01, 2017 at 02:02:30PM -0700, Stephen Hemminger wrote:
> > Recent regression in net-next building bpf.c in samples/bpf now broken.
> > 
> > $ make samples/bpf/
> > 
> > 
> >   HOSTCC  samples/bpf/../../tools/lib/bpf/bpf.o
> > samples/bpf/../../tools/lib/bpf/bpf.c: In function ‘bpf_create_map_node’:
> > samples/bpf/../../tools/lib/bpf/bpf.c:76:13: error: ‘union bpf_attr’ has no member named ‘map_name’; did you mean ‘map_type’?
> >   memcpy(attr.map_name, name, min(name_len, BPF_OBJ_NAME_LEN - 1));
> >              ^
> > samples/bpf/../../tools/lib/bpf/bpf.c:76:44: error: ‘BPF_OBJ_NAME_LEN’ undeclared (first use in this function)
> >   memcpy(attr.map_name, name, min(name_len, BPF_OBJ_NAME_LEN - 1));  
> 
> everything works fine for me...
> did you do 'make headers_install' ?
> 

Yes, that was the problem. I had done make mrproper after changing branches.