3 ms·
There's not much to know! "XDP" is really just the Linux term of art for "BPF running directly off the network driver". Your BPF program --- ordinarily, just a
by tptacek 6y ago
There's not much to know! "XDP" is really just the Linux term of art for "BPF running directly off the network driver". Your BPF program --- ordinarily, just a C program you compiled with clang --- is given a struct with pointers to the beginning and end of a packet, and your program can return OK, DROP, or REDIRECT, in addition to modifying the packet.
The XDP project itself has a pretty excellent tutorial:
https://github.com/xdp-project/xdp-tutorial https://github.com/xdp-project/xdp-tutorial
- deleted 6y ago[deleted]