xdp-project / bpf-examples

Making eBPF programming easier via build env and examples
424 stars 84 forks source link

Help about bpf-examples/AF_XDP-interaction,how to fix struct bpf_object_open_attr wrong(run make) #93

Closed xjj210130 closed 1 year ago

xjj210130 commented 1 year ago

HI all: My env is centos 7. core is 5.15.46 (build by myself) gcc 11.2.1 clang 14.0.6 llvm 14.0.6 bpftool is v5.15.46 I do as following: 1: git clone https://github.com/xdp-project/bpf-examples.git 2: cd bpf-examples/AF_XDP-interaction 3: make There is many wrong about struct bpf_object_open_attr error: variable ‘open_attr’ has initializer but incomplete type common_user_bpf_xdp.c:141:4: error: ‘struct bpf_object_open_attr’ has no member named ‘prog_type’

Is this code is too old? or libbpf is too new? How to fix it?Thanks

Tips : build AF_XDP-example/AF_XDP-forwarding is ok