-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux内核如何支持xdp?? #4
Comments
Debian Gnu/Linux内核默认支持xdp、ebpf、mptcp、wireguard估计还有很长时间啊 |
XDP (eXpress Data Path) is an eBPF based high performance data path merged in the Linux kernel since version 4.8. |
Debian从9开始就支持了。 ref: https://en.wikipedia.org/wiki/Debian_version_history#Release_table |
我的意思是如何开启? |
不需要手动开启,默认就能用的(当然要是自己编译的内核另说) |
ip link set dev eth0 ip link set dev wlp2s0 xdp obj ./clean-dns.elf段错误 |
Oct 9 14:49:21 localhost kernel: [ 5677.121935] ip[12873]: segfault at 10 ip 00007ff3a0e82582 sp 00007ffc4814e560 error 4 in libbpf.so.0.3.0[7ff3a0e6c000+23000] |
ip -force link set dev wlan0 xdp object clean-dns.elf ver |
谢谢你的回复,编译会报如下错误: cargo bpf build clean-dnserror: no such subcommand:
找了互联网所有的帖子,发现没有和这个类似的。不知道具体是那里的问题。祝你开心. |
cargo install cargo-bpf |
manjaro(跟你 arch 差不多的) 5.13 的 kernel 编译时依然 SIGSEGV 确认 5.13 支持 CONFIG_XDP_SOCKETS
SIGSEGV 的 backtrace
|
确认了下直接装载 github release 的 elf 二进制文件是没啥问题的配上 8.8.8.8 的 DNS server,所以不是我 kernel 的问题 |
error: No suitable version of LLVM was found system-wide or pointed
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/llvm-sys-120.2.1/src/lib.rs:486:1 error: aborting due to previous error error: could not compile To learn more, run the command again with --verbose. |
用stable。nightly下会崩我也遇到了,可以看cargo-bpf repo的issue。 |
在另一个使用ebpf的实践中,我也发现不同kernel版本似乎出现了一定的不兼容。原因没有具体定位到,感觉可能是部分内核的BTF支持问题or bpf helper签名问题。 |
其实一直挺关注BPF的,就是不知道Gnu/Linux内核如何支持xdp.有没有Debian Gnu/Linux下的详细讲解
The text was updated successfully, but these errors were encountered: