]> git.kaiwu.me - nginx.git/commit
QUIC: support BPF reload and binary upgrade
authorSai Krishna Kumar Reddy YADAMAKANTI <s.yadamakanti@f5.com>
Tue, 29 Sep 2026 15:07:24 +0000 (15:07 +0000)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 29 Sep 2026 17:46:41 +0000 (21:46 +0400)
commit63af971a1ec5c6d5aac8660184c389e4a02633f0
tree984a3582cc328607d2069a70e97daa68d93219de
parentce6e7d6c12c1f21c0180805d031bb8042b19658a
QUIC: support BPF reload and binary upgrade

The SO_COOKIE dependency is removed.  QUIC BPF dispatching now uses
separate sockets for new and established connections: listener sockets
handle new connections, while per-worker sockets handle established
ones.  Server connection IDs encode a random worker key, which BPF
uses to route established packets directly to the correct worker
socket.  New connections are routed through listen keys using a
dual slot scheme that enables both reload and binary upgrade.

On reload, new workers register new sockets and keys while old workers
continue receiving established connections through their encoded keys.
On binary upgrade, the new master uses the opposite slot, and exiting
masters clear their entries so traffic shifts to the surviving
instance.

Co-authored-by: Roman Arutyunyan <arut@nginx.com>
17 files changed:
auto/modules
auto/options
auto/os/linux
src/core/ngx_bpf.c
src/core/ngx_connection.c
src/event/ngx_event.h
src/event/quic/bpf/makefile
src/event/quic/bpf/ngx_quic_reuseport_helper.c
src/event/quic/ngx_event_quic.h
src/event/quic/ngx_event_quic_bpf.c
src/event/quic/ngx_event_quic_bpf.h [new file with mode: 0644]
src/event/quic/ngx_event_quic_bpf_code.c
src/event/quic/ngx_event_quic_connection.h
src/event/quic/ngx_event_quic_connid.c
src/event/quic/ngx_event_quic_output.c
src/event/quic/ngx_event_quic_udp.c
src/os/unix/ngx_process_cycle.c