BPFJIT(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

bpfjit β€” Just-In-Time compiler for Berkeley Packet Filter. Yes bestie, this is the BPFJIT(4) manual page, and we are gonna get through it together, no cap πŸ’–

πŸ› οΈ SYNOPSIS πŸ› οΈ

options BPFJIT
options SLJIT

πŸ’… DESCRIPTION πŸ’…

Okay so the bpfjit kernel interface adds Just-In-Time compilation for filter programs that get sent to a bpf(4) device. Instead of being interpreted for every packet, these filter programs are compiled into native code, and that code is being executed for every packet. It’s giving β€œmain character energy” for your packet path ✨

The implementation of bpfjit is based on the Stack-Less Just-In-Time library, or sljit for short. The library supports multiple platforms, including:

  • AMD-x86 64
  • ARM 32 (ARM-v5, ARM-v7 and Thumb2 instruction sets)
  • Intel-x86 32
  • MIPS 32 (III, R1)
  • MIPS 64 (III, R1)
  • PowerPC 32
  • PowerPC 64
  • SPARC 32

bpfjit supports all architectures listed above. Iconic behavior, honestly πŸ‘‘

bpfjit is also available as a module in modular kernels. So modular-kernel besties are included too 🫢

πŸŽ›οΈ SYSCTLS πŸŽ›οΈ

The following sysctl is available when bpfjit is enabled:

  • net.bpf.jit β€” Toggle Just-In-Time compilation of new filter programs. Changing a value of this sysctl doesn't affect existing filter programs.
Heads up, bestie: changing this sysctl only touches new filter programs β€” the existing ones stay exactly as they are, periodt πŸ’…

πŸ‘€ SEE ALSO πŸ‘€

🌸 HISTORY 🌸

The bpfjit interface first appeared in NetBSD 7.0. A whole little historical moment, fr fr πŸ¦‹

🫢 AUTHORS 🫢

The bpfjit code was written by Alexander Nasonov <alnsn@NetBSD.org>.

The sljit library was written by Zoltan Herczeg <hzmester@freemail.hu>.


Cute lil sign-off time: this page is from the Debian manual set, dated July 24, 2014, and it’s the BPFJIT(4) page β€” slay and goodbye, bestie πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from