Linux XDP
- henderson
- Posts: 0
- Joined: Thu Jan 01, 2004 12:00 am
Linux XDP
It looks like there are some good examples at https://github.com/xdp-project/xdp-tutorial. There are some userspace interactions in the tracing*-* examples, example: https://github.com/xdp-project/xdp-tutorial/tree/master/tracing01-xdp-simple
-
steamed_hams
- Posts: 1
- Joined: Thu Jan 01, 2004 12:00 am
Linux XDP
I've messed around with it a bit, just experimenting really but it's pretty sweet. Regarding code examples from the XDP stack to user space, would Rust do? There's a great library for this at https://github.com/redsift/redbpf and a corresponding example at https://blog.redsift.com/labs/putting-rust-in-the-kernel-with-ebpf/, which filters HTTP requests and puts them in a map for a user space program to read. The example is a bit stale, using a different, alpha version of the redbpf library, but depending on your familiarity with Rust it's not too painful to update the example to the current stable version of the lib. If not familiar with Rust though then let me know and I can post up some code if desired.