~/talk

Get start with XDP: write a network filter in 10m

Talkat DevConf.CZ 2021 · 2021-02-18..02-20· [linux-and-operating-systems, networking]
links:none on file
slides:none on file

Shows how to write a minimal XDP filter that drops IPv6 packets by parsing Ethernet headers, using bounds checks the BPF verifier requires, and returning XDP_DROP vs XDP_PASS; builds the BPF ELF with clang -> xdp_drop.o and inspects sections with llvm-objdump. Loads with ip link or xdp_loader (use XDP_GENERIC to avoid cutting off networking), uses a per-CPU array map to count drops (example output: CPU0=13, CPU1=7) and provides a libbpf/libxdp user-space program that polls the map every 2s and prints totals.

AI-written summary · about

  1. 0:00Start
  2. 0:16Agenda
  3. 0:38What and Why We Use Fdp
  4. 2:48Build the Object
  5. 4:08Load the Ftp Object
  6. 10:15Bpf Maps
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.