Page 1 of 1
Linux XDP
Posted: Tue Feb 18, 2020 8:34 am
by bullero
Anyone have done experiments with Linux XDP (eXpress Data Path)?
Linux XDP
Posted: Thu Feb 20, 2020 3:04 pm
by henderson
It is on my short list to try out soon.
Linux XDP
Posted: Thu Feb 20, 2020 4:47 pm
by doomanx
Had a look at it a while back. If you weren't doing kernel bypass already it would be a big time-saver in terms of development time.
Linux XDP
Posted: Fri Feb 21, 2020 9:20 am
by bullero
@doomanx Do you happen to have any example code from XDP "stack" to user space memory?
edit: the only working examples seem to be ddos related msg filters Expressionless
Linux XDP
Posted: Fri Feb 21, 2020 3:39 pm
by henderson
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
Linux XDP
Posted: Fri Jul 03, 2020 12:54 pm
by steamed_hams
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.