The advantages of XDP are as follows:
- An eBPF program is executed before received packets reach the network stack.
- An eBPF program is executed before expensive socket memory allocations for received packets.
- Dropped packets incur low CPU overhead and do not consume packet socket buffers.