Open alenliu opened 11 months ago
alenliu @.***> writes:
@.***:~/xdp-tutorial/basic01-xdp-pass# uname -a Linux ubuntu20-04 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
A 5.4 kernel is too old to use the XDP dispatcher, so you can't attach multiple programs to a single interface...
Success: Loading XDP prog name:xdp_prog_simple(id:48) on device:lo(ifindex:1)
However, it looks like the fallback to loading a single program works, and you end up with the attachment working?
Hi, I have the same problem, but even though this happend, the example bpf code loaded successfully. My kernel version is 5.4, So if I just wanna to try single bpf program case, that means I can ignore this error msg? @tohojo
[root@VM-119-213-tencentos basic01-xdp-pass]# ls Makefile README.org xdp_pass_kern.c xdp_pass_kern.ll xdp_pass_kern.o xdp_pass_user xdp_pass_user.c [root@VM-119-213-tencentos basic01-xdp-pass]# ./xdp_pass_user --dev test libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: prog 'xdp_pass': BPF program load failed: Invalid argument libbpf: prog 'xdp_pass': failed to load: -22 libbpf: failed to load object 'xdp-dispatcher.o' libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: prog 'xdp_pass': BPF program load failed: Argument list too long libbpf: prog 'xdp_pass': failed to load: -7 libbpf: failed to load object 'xdp-dispatcher.o' libxdp: Compatibility check for dispatcher program failed: Argument list too long libxdp: Falling back to loading single prog without dispatcher libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: prog 'xdp_pass': BPF program load failed: Invalid argument libbpf: prog 'xdp_pass': failed to load: -22 libbpf: failed to load object 'xdp-dispatcher.o' Success: Loading XDP prog name:xdp_prog_simple(id:18) on device:test(ifindex:84) [root@VM-119-213-tencentos basic01-xdp-pass]# xdp-loader status test CURRENT XDP PROGRAM STATUS:
test xdp_prog_simple native 18 3b185187f1855c4c
Minglong Dai @.***> writes:
Hi, I have the same problem, but even though this happend, the example bpf code loaded successfully. My kernel version is 5.4, So if I just wanna to try single bpf program case, that means I can ignore this error msg? @tohojo
Yup, that should be fine :)
Minglong Dai @.***> writes: Hi, I have the same problem, but even though this happend, the example bpf code loaded successfully. My kernel version is 5.4, So if I just wanna to try single bpf program case, that means I can ignore this error msg? @tohojo Yup, that should be fine :)
thks, It works
root@ubuntu20-04:~/xdp-tutorial/basic01-xdp-pass# uname -a Linux ubuntu20-04 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
~/xdp-tutorial# ./configure clang: 11.0.0-2~ubuntu20.04.1 libbpf support: submodule ELF support: yes zlib support: yes libxdp support: submodule Configuring libxdp to use our libbpf submodule Found clang binary 'clang' with version 11 (from 'Ubuntu clang version 11.0.0-2~ubuntu20.04.1') not using emacs: using bpftool v7.3.0 libbpf support: custom v1.2.0 perf_bufferconsume support: yes btfload_from_kernel_by_id support: yes btftype_cnt support: yes bpf_objectnext_map support: yes bpf_objectnext_program support: yes bpf_programinsn_cnt support: yes bpf_programtype support: yes bpf_program__flags support: yes bpf_programexpected_attach_type support: yes bpf_map_create support: yes perf_buffernew_raw support: yes bpf_xdp_attach support: yes bpf_mapset_autocreate support: yes bpf_prog_test_run_opts support: yes bpf_xdp_query support: yes zlib support: yes ELF support: yes pcap support: yes secure_getenv support: yes
root@ubuntu20-04:~/xdp-tutorial/basic01-xdp-pass# ./xdp_pass_user --dev lo libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: prog 'xdp_pass': BPF program load failed: Invalid argument libbpf: prog 'xdp_pass': failed to load: -22 libbpf: failed to load object 'xdp-dispatcher.o' libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: prog 'xdp_pass': BPF program load failed: Argument list too long libbpf: prog 'xdp_pass': failed to load: -7 libbpf: failed to load object 'xdp-dispatcher.o' libxdp: Compatibility check for dispatcher program failed: Argument list too long libxdp: Falling back to loading single prog without dispatcher libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: prog 'xdp_pass': BPF program load failed: Invalid argument libbpf: prog 'xdp_pass': failed to load: -22 libbpf: failed to load object 'xdp-dispatcher.o' Success: Loading XDP prog name:xdp_prog_simple(id:48) on device:lo(ifindex:1)