On Wed, 02 Oct 2019 21:25:28 +0200 Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > Song Liu <songliubraving@xxxxxx> writes: > > >> On Oct 2, 2019, at 11:38 AM, Song Liu <songliubraving@xxxxxx> wrote: > >> > >>> On Oct 2, 2019, at 6:30 AM, Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > >>> > >>> This series adds support for executing multiple XDP programs on a single > >>> interface in sequence, through the use of chain calls, as discussed at the Linux > >>> Plumbers Conference last month: > >>> [1] https://linuxplumbersconf.org/event/4/contributions/460/ - [2] Slides: http://people.netfilter.org/hawk/presentations/LinuxPlumbers2019/xdp-distro-view.pdf - [3] Source: https://github.com/xdp-project/xdp-project/tree/master/conference/LinuxPlumbers2019 [...] > > > > Also, could you please share a real word example? I saw the example > > from LPC slides, but I am more curious about what does each program do > > in real use cases. > > The only concrete program that I have that needs this is xdpcap: > https://github.com/cloudflare/xdpcap > > Right now that needs to be integrated into the calling program to work; > I want to write a tool like it, but that can insert itself before or > after arbitrary XDP programs. The other real world use-case it Facebooks katran, you should be aware: https://github.com/facebookincubator/katran It might be important to understand that the patchset/intent is a hybrid that satisfy both xdpcap ([2] slide-26) and katran ([2] slide-27), see later slides how this is done. Notice there a requirement is that users don't (need to) modify the BPF ELF file, to make it cooperate with this system. The katran use-case is to chain several eBPF programs. The xdpcap use-case is to trap any XDP return action code (and tcpdump via perf event ring_buffer). For system administrators the xdpcap use-case is something we hear about all the time, so one of the missing features for XDP. As Toke also wrote, we want to extend this to ALSO be-able to see/dump the packet BEFORE a given XDP program. > Lorenz, can you say more about your use case? :) AFAIK Cloudflare also have a chaining eBPF program use-case for XDP. I could not find the blog post. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer