___bpf_prog_run(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ___bpf_prog_run(9) β€” from the Kernel API Manual, bestie 🫢

okay so picture this: you've got an eBPF program just vibing there, fully loaded, ready to go, and somebody has to actually run it on a context. that someone is this function. she's the main character of the eBPF interpreter, no cap πŸ‘‘


✨ NAME ✨

___bpf_prog_run β€” run an eBPF program on a given context. that's it. that's the whole gig πŸ’–


🌸 SYNOPSIS 🌸

u64 ___bpf_prog_run (u64 *regs , const struct bpf_insn *insn );

look at her. three underscores in front because she's that girl. returns a u64, takes two pointers, zero notes πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • regs β€” the array of MAX_BPF_EXT_REG eBPF pseudo-registers. yes, MAX_BPF_EXT_REG of them, exactly that many, don't @ me. this is the register file, the whole cast of characters 🧚
  • insn β€” the array of eBPF instructions. this is the script, the choreography, the thing that's about to get decoded and executed fr fr πŸ¦‹

πŸ’« DESCRIPTION πŸ’«

Decode and execute eBPF instructions.

like. that's literally it. you hand her the registers, you hand her the instruction array, and she goes through them β€” decoding, executing, doing the absolute most β€” until the program is done. the way she just reads bytecode and runs it? iconic. lowkey the whole kernel depends on her 🌈


⭐ RETURN ⭐

whatever value is in BPF_R0 at program exit. not a metaphor, not a vibe, literally whatever ended up sitting in BPF_R0 when the program wrapped up. she doesn't editorialize, she just returns it πŸ“


πŸ”₯ SEE ALSO πŸ”₯

go read those too, i'm begging you, they're all in the same friend group πŸ™ˆ


ngl the synopsis line has some spicy spacing β€” u64 *regs , const struct bpf_insn *insn β€” that space before the comma is canon, do not come for her πŸ’€

okay that's the page!! source lives in ./kernel/bpf, version/date stamp is October 2026, and the manual is the Kernel API Manual β€” mwah, hope this helped, go run some eBPF bestie πŸ˜­πŸ’œπŸ‘‘

πŸ“¦ where this page comes from