xdp-project / xdp-tools

Utilities and example programs for use with XDP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libbpf: failed to find BTF for extern 'clock_gettime' [66] section: -2

kolinfluence opened this issue · comments

how to resolve issues below?

./xdp-filter load ens3 -p deny -f tcp,ipv4,ipv6  -vv

libbpf: failed to find BTF for extern 'clock_gettime' [66] section: -2

it compiles with #include <time.h> but on my vps server it doesnt seem to run.

how to resolve?

Current rlimit 1048576000 already >= minimum 1048576
Couldn't open pin directory /sys/fs/bpf/xdp-filter/programs/ens3: No such file or directory
Looking for eBPF program with features tcp,ipv6,ipv4,deny
Found prog 'xdpfilt_dny_all.o' matching feature set to be loaded on interface 'ens3'.
libxdp: Looking for './xdpfilt_dny_all.o'
libxdp: Loading XDP program from './xdpfilt_dny_all.o' section '(unknown)'
libbpf: loading ./xdpfilt_dny_all.o
libbpf: elf: section(3) xdp, size 4792, link 0, flags 6, type=1
libbpf: sec 'xdp': found program 'xdpfilt_dny_all' at insn offset 0 (0 bytes), code size 599 insns (4792 bytes)
libbpf: elf: section(4) .relxdp, size 432, link 28, flags 40, type=9
libbpf: elf: section(5) license, size 4, link 0, flags 3, type=1
libbpf: license of ./xdpfilt_dny_all.o is GPL
libbpf: elf: section(6) features, size 4, link 0, flags 3, type=1
libbpf: elf: skipping unrecognized data section(6) features
libbpf: elf: section(7) .maps, size 200, link 0, flags 3, type=1
libbpf: elf: section(8) .xdp_run_config, size 16, link 0, flags 3, type=1
libbpf: elf: skipping unrecognized data section(8) .xdp_run_config
libbpf: elf: section(19) .BTF, size 4827, link 0, flags 0, type=1
libbpf: elf: section(21) .BTF.ext, size 3376, link 0, flags 0, type=1
libbpf: elf: section(28) .symtab, size 1776, link 1, flags 0, type=2
libbpf: looking for externs among 74 symbols...
libbpf: failed to find BTF for extern 'clock_gettime' [66] section: -2
libxdp: Couldn't load the eBPF program (libbpf said 'no such file').
Maybe the program was compiled with a too old version of LLVM (need v9.0+)?
Couldn't load BPF program: No such file or directory(-2)

Erm, there are no references to clock_gettime() in xdp-filter. Did you modify the code?

@tohojo yes i modified the code so how do i do this?

i used bpf....ns() now so this is quite obsolete but i have new problem.

can u help solve this now?
#261

As I told you before, please stop using this issue tracker as a support forum for writing BPF code...