summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2024-09-24 14:53:45 +0400
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>2026-02-26 20:43:03 +0400
commitc4d3aed8c7e67e57da60940d1a19fe3c45a9433a (patch)
treee1045136591508baa203d779504214461cf1d174 /docs
parente6ffe8384ebf1972faac9b031b9ff6182e79cfd6 (diff)
downloadnginx-c4d3aed8c7e67e57da60940d1a19fe3c45a9433a.tar.gz
nginx-c4d3aed8c7e67e57da60940d1a19fe3c45a9433a.tar.bz2
QUIC: fixed bpf compilation with newer Linux kernels.
QUIC bpf program previously used struct bpf_map_def which was deprecated in [1] (kernel version 5.18) and removed in [2] (kernel 6.1). New-style BTF map definitions were added in [3] (linux kernel 5.3). Switching the program to BTF is however not necessary since nginx has its own relocation procedure which allows referencing the real map structure by its file descriptor allocated earlier. In particular, bpf instruction BPF_LD_IMM64 (0x18/0x0) is substituted with instruction BPF_LD_MAP_FD (0x18/0x1) and map_fd is stored in the imm field, see [4] and [5] for details. To fix compilation, struct bpf_map_def is changed to a known type (int) and "extern" is added to indicate external linkage and reduce object file size. [1] https://github.com/torvalds/linux/commit/93b8952d223af03c51fba0c6258173d2ffbd2cb7 [2] https://github.com/torvalds/linux/commit/dc567045f1590f6460d3e9a6ea6ad5e600b58b84 [3] https://github.com/torvalds/linux/commit/abd29c9314595b1ee5ec6c61d7c49a497ffb30a3 [4] https://github.com/torvalds/linux/blob/master/include/linux/filter.h [5] https://datatracker.ietf.org/doc/rfc9669/
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions