News for hackers. Stuff that matters.
Re:BPF, XDP, Packet Filters and UDP by tptacek on Wednesday October 21, 2020 @06:20PM (#24852878)
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

There are no comments on this comment yet.