Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Save CPU cycles with eBPF

Avatar for Donia Chaiehloudj Donia Chaiehloudj
October 30, 2026
0

Save CPU cycles with eBPF

Avatar for Donia Chaiehloudj

Donia Chaiehloudj

October 30, 2026

More Decks by Donia Chaiehloudj

Transcript

  1. Overview of Userspace App Events: • File is opening •

    Network packet is received syscalls Linux Kernel event Program
  2. Different type of Networking hooks • • • • XDP:

    high-performance network packet processing TC: traffic control by redirecting, filtering, or shaping network traffic socket_filter: filter packets at the socket layer, enabling custom packet filtering and processing for specific applications and much more!
  3. TC: Traffic Control • • • • Packet filtering Ingress

    or Egress Attached to networking interface Local node processing: such as applying L3/L4 endpoint policy and redirecting traffic to endpoints.
  4. XDP (eXpress Data Path) • • • high-performance network packet

    processing framework in the Linux kernel Only ingress Runs on the packet data before any other processing can happen Filtering programs: drop malicious, unexpected traffic, DDOS protection mechanisms
  5. TC vs XDP: Saving CPU cycles Context: - virtio-net in

    a KVM guest (native XDP) - host over a tap: 1M UDP packets, plus a max-rate pktgen test
  6. TC vs XDP: Saving CPU cycles Context: - virtio-net in

    a KVM guest (native XDP) - host over a tap: 1M UDP packets, plus a max-rate pktgen test The BPF programs cost the same. The saving is the kernel work XDP skips.