xdp-project / xdp-tools

Utilities and example programs for use with XDP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unknown error 524

NirGeller18 opened this issue · comments

Hi there,

I'm trying to run a basic xdp drop program I found on

https://developers.redhat.com/blog/2021/04/01/get-started-with-xdp#task_1__write_and_run_a_simple_program_with_xdp

And I'm running into the following error:

# xdp-loader load -vv -m skb -s xdp_drop veth1 xdp_drop.o
...
...
libxdp: Loaded XDP program xdp_dispatcher, got fd 11
libxdp: Failed to attach test program to dispatcher: Unknown error 524
libxdp: Compatibility check for dispatcher program failed: Unknown error 524
libxdp: Falling back to loading single prog without dispatcher
libxdp: Loaded XDP program xdp_drop_prog, got fd 5
libxdp: Replacing XDP fd -1 with 6 on ifindex 6

I'm running kernel 5.10.109 on a imx8m+ based board.
I added all the required kernel configs I thought were missing.
I cloned xdp-tools, built libbpf 0.8.0, then configured and built xdp-tools:

root@r3pa-8cb4:~/xdp/xdp-tools# ./configure
Found clang binary 'clang' with version 12 (from 'clang version 12.0.0 (https://github.com/llvm/llvm-project d28af7c654d8db0b68c175db5ce212d74fb5e9bc)')
libbpf support: submodule v0.8.0
perf_buffer__consume support: yes (submodule)
btf__load_from_kernel_by_id support: yes (submodule)
btf__type_cnt support: yes (submodule)
bpf_object__next_map support: yes (submodule)
bpf_object__next_program support: yes (submodule)
bpf_program__insn_cnt support: yes (submodule)
bpf_map_create support: yes (submodule)
perf_buffer__new_raw support: yes (submodule)
bpf_xdp_attach support: yes (submodule)
zlib support: yes
ELF support: yes
pcap support: yes
secure_getenv support: yes

Can you give me a hint how to solve this error?

Thanks a lot,

Nir.

According to the example at
https://developers.redhat.com/blog/2021/04/01/get-started-with-xdp#task_1__write_and_run_a_simple_program_with_xdp
I was expecting to see xdp_dispatcher running, but I see only one program loaded:

root@r3pa-8cb4:~/xdp# xdp-tools/xdp-loader/xdp-loader status
CURRENT XDP PROGRAM STATUS:

Interface Prio Program name Mode ID Tag Chain actions

lo <No XDP program loaded!>
eth0 <No XDP program loaded!>
eth1 <No XDP program loaded!>
can0 <No XDP program loaded!>
can1 <No XDP program loaded!>
veth1 xdp_drop_prog skb 47 57cd311f2e27366b_

Does this mean I can still run a XDP program directly on a nic? (assuming it is supporting xdp of course...)

Thank you.